Skip to content

Install Mautic with Zero Linux Knowledge Required: AutoMautic

AutoMautic 511 is here!
The single-command Mautic installation script to install Mautic 5.1.1 in a jiffy, the right way…
That’s it, nothing more, nothing less… No Panels required, no hosting to buy, no DDEV, no Docker, no Composer, No nothing, just one command that will take care of everything for you…

Installs Apache, MariaDB, PHP, downloads and installs Mautic automatically, gets and installs an SSL certificate and does quite a bit of configuration for you, all automatically, like the Mautic cronjobs, Apache config, MySQL config and many other things…


Updated on September, 20 2024 to include the LTS Version of MariaDB and Mautic 5.1.1
.

I only do Mautic Installations, Mautic Maintenance and I run a Mautic cluster for a living, I create Bash, Dash and POSIX scripts day in and day out… So you know for a fact, this script is going to do things the right way and Mautic is going to be running properly.

TL;DR: Copy the following command and paste it into your VPS command line:
wget https://files.mktg.dev/pub/AutoMautic/AutoMautic511.txt && sh AutoMautic511.txt

Here are the specific versions of all the software that will be installed as of AutoMautic-511:

OS:              Ubuntu 24.04.4 LTS
Kernel:        Linux 6.8
MySQL:      MariaDB 11.4
Apache:       2.4
PHP:            8.2
Mautic:        5.1.1

This script aims to facilitate the lives of those who would attempt to use Bitnami, cPanel, Softaculous, Cloudron and similar tools to install Mautic, only to later find out, that those tools make it even harder to manage and troubleshoot their Mautic installation, and when Mautic breaks, it makes it a lot harder to fix things, or to find help, or to get professional help to get those things fixed…

While only Ubuntu 24.04 is officially supported, the script is a POSIX (Dash/sh) compliant script you can use in many other operating systems, Including Debian, but also any Linux distro with a POSIX compliant shell (which is all Linux distros), OpenBSD, Old Solaris, Mac, even Android! That is, Providing the OS has the required packages available, mostly Apache, MySQL and PHP.

Roadmap? Currently this is still mostly a proof of concept, right now I just want to see the acceptance and how much it breaks. I think we are doing pretty good on the smoothness of the script, but as soon as you deviate from the provided steps it will break on you, hence this should be one direction to work towards.
First priority should be improving security by hardening the system and randomizing passwords, adding checks and guardrails to some aspects of the installation.
After that, we should be adding more configuration options, then improve performance with caching, add a few management and troubleshooting tools and options, and then start over again… If you want something specific, ask for it in the comments!

That said, I have already found a few areas of improvement thanks to the comments in the comments section below, and the opinions of a few friends, so sooner or later, I might be adding some things, like:

– Either custom or most probably randomized MySQL password with password validation to avoid errors.
– Basic MySQL Hardening.
– Basic system hardening via firewall features with UFW.
– Error catching and reporting.
– A plugin or two, like the whitelabeler, reCAPTCHA, etailers and other classics. If you have some specific request, let me know below in the comments.
– An option to use this script without having to install an SSL certificate, for those using Cloudflare or some sort of reverse proxy, ingress, etc.
– AutoMauticUpgrade script for whoever needs to upgrade an AutoMautic installed Mautic.

4 steps to get Mautic 5 installed automatically, in 4 minutes.

Step 1:  Get a new VPS.
Step 2:  Create a subdomain for Mautic.
Step 3:  Log into your new server or VPS.
Step 4:  Run the AutoMautic command.

Let’s get started!

Step 1:  Get a new VPS.

The first and main thing you will need is a fresh new, and completely empty VPS for your new Mautic instance. Unless you are an experienced Linux Administrator, use a fresh new and empty VPS dedicated to AutoMautic alone. Do not mix with other apps, this is not yet supported.

Here are the requirements for your new VPS or server, don’t be cheap, buy a server reasonably sized for your requirements:
– 2 GB of RAM (4GB or more recommended)
– 2 vCPUs or threads (4 or more threads recommended)
– 10 GB Disk (20GB or more recommended)
– Operating System: Ubuntu 24.04 (Might work fine with 22.04 too, but it is not tested nor supported.)

You can get such a VPS from AWS, Google Cloud, Azure, Oracle, Linode, DigitalOcean or any other provider.
If you get your VPS using this link, you get $200 in credits to use on Digital Ocean and I will get $25 worth of credits for myself too.
Once your new VPS or server has been created, take note of its IP, we will need it in the next step.

Step 2:  Create a subdomain for Mautic.

It is recommended to install Mautic on a subdomain at the same domain your main website currently lives in, this helps with email deliverability, custom email domains and allows for proper user tracking, email tracking and website traffic tracking.
The most common case is to create a “mautic” subdomain on your main domain, for example: mautic.yourcompany.com, but you can name your subdomain anything you want.
What you need to do in order to create this subdomain is go to your DNS provider, which is usually the same company / website that you brought your domain from.
They will have a DNS panel to configure the domain they sold you, go there, and add a new “A record” to your DNS.
The new A record, for example “mautic”, has to point to the IP of your new VPS, that is the IP you took note of in the previous step.

If you need help with it, here is a video about how to create a new A record on your DNS: https://www.youtube.com/watch?v=QcNBLSSn8Vg

Step 3:  Log into your new server or VPS.

SSH into your server or VPS using your SSH terminal or Linux console, if you are on Windows, you can use Putty, but there are also browser plugins which allow you to make ssh connections from any kind of OS. If you are on Mac, you know what to do…

Using any of the following shell / terminal tools, you can connect to your new VPS, if you do not know which one would work best for you, try the Chrome plugin first, it makes it piece of cake to connect to any remote Linux server, from any computer, or tablet or from your phone, you can install Mautic during your next commute…

– Chrome Secure Shell (Recommended): The guys from Google have created this Shell terminal. Works on any computer and OS capable of running the Chrome browser, pretty neat!
Get it from the Chrome Web Store: https://chromewebstore.google.com/detail/secure-shell/iodihamcpbpeioajjeobimgagajmlibd
Here’s a good video about how to install and use: https://www.youtube.com/watch?v=nHVptUyHcyE

– Putty: Most famous tool for SSH connections from a Windows PCs.
Download: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Video: https://www.youtube.com/watch?v=pWDHUlvcAsg

– Linux Terminal: Comes pre-installed with all Linux distros, there are many flavors and countless shells. Definitely the most advanced and powerful method.
Install: No, need, comes pre-installed on all Linux distros and many UNIX OSs too.
Video: https://www.youtube.com/watch?v=jgcXclSXnVo

Step 4: Run the AutoMautic Mautic installation script.

Once you are logged into your new VPS, use the following command, it will download and self-execute the AutoMautic script:

wget https://files.mktg.dev/pub/AutoMautic/AutoMautic511.txt && sh AutoMautic511.txt

On certain cloud providers, like AWS, you might want to become root before starting the script, you can do so with:
sudo su
The script will guide you through the rest of the process… Just follow any instructions that appear on the screen!
The AutoMautic script will first make sure the requirements are met, then it will do everything for you.

This script was inspired by 3 previous projects, I always thought it would be nice to have a super simple way to install Mautic, a method that would allow even a non-techie to get a well configured Mautic installation with ease, so I’ve been observant of any projects providing simplified or even automatic Mautic setup over the years. A few weeks ago, I created a Mautic 5 Upgrade script, so I could upgrade the Mautic 5 demo fast, it took me so little time that I decided to take on this (I thought simple and easy, at the time) project. Reality is it took me several days of non-stop debugging to accomplish it, because it turns out bash scripting works quite differently from the CLI and from a script, so I had to re-learn a few things that I thought I already mastered, but really didn’t.

If you want to take a peek at some previous projects dealing with Mautic automatic installs, here they are:
– Katzueno, mautic-install-shell: https://github.com/katzueno/mautic-install-shell
– Matthias Reich, 1 command install script: https://www.youtube.com/watch?v=35SHI2iKqTc
– Frazras, Mautic-Installer: https://github.com/frazras/Mautic-Installer/tree/master

Yosu Cadilla

My name is Yosu Cadilla, a Linux Systems Administrator since year 2000.
I discovered Mautic in 2017 and since have specialized in:
– Running Mautic for Marketing Agencies.
– Running large Mautic instances, sometimes
with millions of contacts.

If you are planning on deploying Mautic for your Marketing Agency, or you have a large Mautic Instance…
Let’s have a chat! yosu.cadilla@gmail.com