Mautic install icon

Mautic Installation & Configuration

There are many ways to set up a Mautic instance. We recommend you configure using a virtual private server that are run by CentOS, Ubuntu operating systems.

To install Mautic, access the VPS via SSH (Secure Shell). Be sure to follow the guidelines to create a secure database and firewall. If you are unsure how to get started, refer to our guide. We will give you an overview on how to install and setup the cron jobs inside your Mautic instance. That way, you can launch campaigns, send emails, and connect to webhooks to integrate apps.

Here’s how we can do this.

  • Sign up for a Linode, Digital Ocean or consider UpCloud if you wish to host the data in Europe.
  • Spin up a virtual private server
  • Install updates and dependencies on an operating system
  • Install Mautic, and unzip package
  • Create database, user account, and setup permissions
  • Create crontab and schedule cron jobs for campaign trigger, email sending, webhooks etc.
  • Install Firewall
  • Open up port 22, 443, and 80 on the firewall
  • Enable firewall
  • Use Certbot to validate your domain, fetch certificates, and automatically configure Apache and Nginx
  • Once the SSL certificate has been granted, you should be able to access your domain for Mautic via https://

As an example, we are using Digital Ocean Ubuntu 2GB 1 CPU instance to set up Mautic. Here are the basic commands for Mautic install in Ubuntu.

Step 1: Install all required packages  required to run Mautic 3

Get started installing Mautic 3 on VPS, gain sudo privileges so you have the right to issue commands:

sudo su

Update your server for the latest Ubuntu edition

apt-get update && apt-get upgrade -y

Install PHP

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update && apt upgrade -y

Install all required packages

apt install mariadb-server apache2 libapache2-mod-php7.3 php7.3 unzip php7.3-xml php7.3-mysql 
php7.3-imap php7.3-zip php7.3-intl php7.3-curl ntp -y

Activate any Apache modules that are not active by default after installation.

a2enmod rewrite

Configure Apache

mv 000-default.txt /etc/apache2/sites-available/000-default.conf

Create a database for Mautic

mysql -u [new username]
MariaDB [(none)]> CREATE DATABASE mautic DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
MariaDB [(none)]> GRANT ALL ON mautic.* TO 'yourusername'@'localhost' IDENTIFIED BY 'w5dsih!#';
MariaDB [(none)]> EXIT;
w5dsih!# is a sample password. Please set your own to something else.


Step 2: Install Mautic 3 and run the Mautic Configuration Wizard

cd /var/www/html
cd /var/www/html

Make sure Apache and Mautic, have ownership and write access to the files.

chown -R www-data:www-data /var/www/html
chmod -R 775 /var/www/html

Then let’s reload Apache configuration to apply our changes.

service apache2 reload

Run the Mautic 3 Configuration Wizard

  • Database driver: MySQL PDO
  • Database Host: localhost
  • Database port: 3306
  • DB name: Mautic
  • Database Table Prefix: Leave empty
  • DB User: root
  • DB Password: password
  • Backup existing tables: No

Step 3: Install the Mautic 3 Cron Jobs

Check if cron package is installed

dpkg -l cron

Install the cron package on Ubuntu

apt-get install cron

Verify if cron service is running

systemctl status cron

Configure cron jobs on Ubuntu

To set up Mautic cron jobs, you need to find the path to Mautic.

nano /etc/crontab
0,15,30,45 * * * * <UserName> php /path/to/mautic/app/console mautic:segments:update
5,20,35,50 * * * * <UserName> php /path/to/mautic/app/console mautic:campaigns:update
10,25,40,55 * * * * <UserName> php /path/to/mautic/app/console mautic:campaigns:trigger
10,25,40,55 * * * * <UserName> php /path/to/mautic/app/console mautic:messages:send
0,15,30,45 * * * * <UserName> php /path/to/mautic/app/console mautic:emails:send