How to Install Mautic on a VPS: Step-by-Step Setup Guide
A complete walkthrough for installing Mautic on your own VPS using Vultr, covering everything from SSH keys and firewalls to SSL certificates and cron jobs.
Why Self-Host Mautic on a VPS?
Mautic is an open-source marketing automation platform that gives you full control over your email marketing without the hefty monthly fees of tools like ActiveCampaign or HubSpot. The trade-off? You're responsible for running your own server, keeping it online, secure, and up to date.
This is very much a DIY approach to email marketing. You'll be working with the command line, managing a database, and configuring server software. It's not for everyone, but if you're comfortable getting your hands a little dirty — or just want to learn — it's entirely doable even without a developer background.
One important note: don't try to run Mautic on cheap shared hosting through something like Softaculous. Mautic is resource-intensive, and a $2.99/month shared plan will leave you frustrated and convinced the software is broken. You need a proper cloud hosting platform — Vultr, AWS, DigitalOcean, or Google Cloud are all solid choices.
Spinning Up Your Vultr VPS
Start by creating a new server instance on Vultr. The high-frequency VPS plans are a great fit for Mautic since they offer solid performance for the price. Choose a server location close to you or your audience, select Ubuntu 18.04 as the operating system, and pick a plan with enough resources — the mid-tier option at around $12/month is a good starting point. You can always scale up later as your contact list grows.
Enable auto backups for an additional $2.40/month. It's a small price for peace of mind knowing your entire installation can be restored if something goes wrong. You'll also want to enable IPv6, though it's not strictly required.
Generating and Adding Your SSH Key
Before deploying the server, you need to set up SSH key authentication. This is more secure than password-only access and is considered best practice for any server you manage. Create a unique SSH key for each server you spin up — it makes key management much cleaner if you ever need to revoke access to a specific machine.
On macOS, open Terminal (Command + Space, type "Terminal") and run the ssh-keygen command. When it asks where to save the key, customize the filename to something memorable like `id_rsa_pt_mautic` so you can easily identify which server it belongs to. You'll end up with two files: a private key (no extension) that you never share, and a public key (.pub) that you'll provide to Vultr.
Open the .pub file in a text editor, copy the contents, and paste it into Vultr's SSH key field during server setup. Make sure there are no trailing line breaks or extra spaces — these will cause authentication failures. Windows users will need to download PuTTY and use PuTTYgen to create their keys instead.
Connecting to Your Server via SSH
Once your server is deployed and you can see its IP address on the Vultr dashboard, it's time to connect. Before you SSH in, head to your DNS provider — GoDaddy, Namecheap, or wherever you manage your domain — and create a new A record. Point a subdomain (like go.yourdomain.com) to the server's IP address. This gives you a clean URL for your Mautic installation.
Back in Terminal, connect using `ssh -i /path/to/your/key root@your-server-ip`. A quick tip for Mac users: you can drag and drop the key file from Finder directly into the Terminal window to paste the full path. On first connection, you'll be asked to verify the host's authenticity — type "yes" to continue, then enter the root password from your Vultr dashboard.
Configuring Firewalls for Security
Security should be your first priority once you're connected. You'll want to set up two layers of firewall protection: an internal firewall running on the server itself, and an external firewall through Vultr's dashboard.
For the internal firewall, use Ubuntu's UFW (Uncomplicated Firewall). Start by allowing port 22 for SSH access — this is critical, as blocking it would lock you out of your own server. Then enable the firewall. Later you'll also open ports 80 (HTTP) and 443 (HTTPS) for web traffic.
On Vultr's side, navigate to Settings > Firewall and create a new firewall group. Add rules to allow ports 22, 80, and 443 for both IPv4 and IPv6. Apply the group to your server. This dual-layer approach means even if one firewall is misconfigured, the other provides a safety net.
Installing the Web Server and Mautic
With your server secured, it's time to install the software stack. Run the system update command first to make sure all packages are current, then install the required dependencies — this includes Apache as the web server and MariaDB as the database.
Activate the necessary Apache modules and restart the service to apply the new configuration. Then navigate to the web root directory and download Mautic. The guide from mauteam.org recommends version 2.15.3 rather than the absolute latest release, as it's the most stable. This is solid advice — newer versions can sometimes introduce bugs that haven't been fully ironed out yet.
Unzip the downloaded file, clean up the archive, and set the proper file permissions. Then download the Apache configuration file from mauteam.org, which saves you from having to write the virtual host configuration manually.
Setting Up the MariaDB Database
Mautic needs a database to store contacts, campaigns, and all your marketing data. Enter the MariaDB console and create a new database — you can keep the default name "mautic" or rename it for a small extra layer of security.
Grant the root user full permissions on the new database and set a strong password. Run the flush privileges command, then exit the MariaDB console. After that, run the MySQL secure installation script, which walks you through a series of yes/no questions to lock down your database server. Accept the defaults for most of these — they remove test databases, disable remote root login, and clean up anonymous accounts.
Installing Your SSL Certificate
An SSL certificate is essential — it encrypts traffic between your users and your server, and modern browsers will flag your site as insecure without one. Install Certbot, the free tool from Let's Encrypt, and run it against your domain.
Make sure your DNS A record has fully propagated before running Certbot, otherwise the domain verification will fail. You can check propagation status at whatsmydns.net. Once the certificate is issued, choose the option to redirect all HTTP traffic to HTTPS.
Finally, run the certificate renewal dry-run command to set up automatic renewal. SSL certificates from Let's Encrypt expire every 90 days, but with auto-renewal configured, you'll never have to think about it again.
Running the Mautic Configuration Wizard
Open your browser and navigate to the domain you set up. You should see the Mautic installation wizard. The first step may flag a timezone configuration recommendation — you can safely skip this and set it from within Mautic later.
On the database configuration screen, enter the database name, username (root), and the password you set during the MariaDB setup. Leave the other settings at their defaults. Next, create your administrator account with your name, email, and a strong password.
The final setup screen lets you configure your email sending settings. While Amazon SES is the recommended mailer transport for production use, you can leave it set to PHP Mail for now and configure a proper email service later. Once you complete the wizard, you'll land on the Mautic dashboard — your self-hosted marketing automation platform is live.
Installing Cron Jobs (Don't Skip This)
Your Mautic installation isn't truly complete without cron jobs. These are scheduled tasks that run at the server level to keep your installation functioning properly. The three essential cron jobs handle contact segment updates, campaign action processing, and scheduled email sending. Without them, your contacts won't move between segments based on their behavior, and your scheduled campaigns simply won't go out.
The mauteam.org guide makes this incredibly easy. A single command downloads a pre-configured cron job file from their site, and a second command loads those jobs into your server's cron scheduler. That's it — no manual editing of crontab files required. There are additional optional cron jobs you can configure later for things like email queue processing and webhook handling, but the three essentials are all you need to get started.
With cron jobs in place, your Mautic installation is fully operational. You've got a self-hosted marketing automation platform running on a dedicated VPS with proper security, SSL encryption, and automated maintenance — all for around $14/month instead of hundreds for a comparable hosted solution.
Watch the Full Video
Prefer watching to reading? Check out the full video on YouTube for a complete walkthrough with live demos and commentary.