Mautic is a free open source, web-based and leading marketing automation tool that enables you to understand, manage, and grow your business or organization conveniently. It is highly customizable and extensible, to meet your business requirements.
It is still a very young project at the time of writing this article. It runs on most standard hosting environments and it is easy to install and setup. In this article, we will show how to install Mautic in Linux distributions.
1. First, install LEMP stack (Nginx, MySQL or MariaDB and PHP) on your respective Linux distributions using the default package manager as shown.
2. Once LEMP stack installed, you can start Nginx, PHP-fpm and MariaDB services, enable them and check if these services are up and running.
3. If your system has a firewall enabled by default, you need to open the port 80 in the firewall to allow client requests to the Nginx web server, as follows.
4. By default, the MariaDB database installation is unsecure. To secure it, run the security script which comes with the binary package.
You will be asked to set a root password, remove anonymous users, disable root login remotely and remove the test database. After creating a root password, and answer
yes/y to the rest of the questions.
5. Then log in to MariaDB database and create a database for Mautic.
Run these commands to create the database; use your own values here, and set a more secure password in a production environment.
6. The latest release (version 2.16 at the time of this writing) of Mautic is available as a zip file, go to the download page, then provide your details in a short form and click on the download link.
7. Once you have downloaded, create a directory for storing the Mautic files for your site under your web server document root (this will be your application base or root directory).
Then unzip the archive file into your application root directory, and define correct permissions on the root directory and mautic files, as follows:
8. In this step, you need to configure the date.timezone setting in your PHP configuration, set it to a value applicable to your current location (for example “Africa/Kampala”), as shown in the screenshot.
9. Then restart the php-fpm service to effect the changes.
10. Next, create and configure an Nginx server block for serving the Mautic application, under /etc/nginx/conf.d/.
Add the following configuration in the above file, for the purpose of this guide, we will use a dummy domain called mautic.tecmint.lan (you may use your own test or full registered domain):
11. Save the file and then restart the Nginx web server for the above changes to work.
12. Because we are using a dummy domain, we need to set up a local DNS using the hosts’ file (/etc/hosts), for it to work, as shown in the following screenshot.
13. Then use the following URL to access the Mautic web installer. It will, first of all, check your system to ensure that all requirements are met (if you see any error or warning, correct them before proceeding, especially in a production environment).
If your environment is ready for mautic, click on the Next Step.
14. Next, provide your database server connection parameters and click on the Next Step. The installer will be verifying the connection settings and create the database.
Note at this stage, if you get a “504 Gateway Timeout Error”, it is because Nginx is failing to get any response from PHP-FPM while the database is being created; it times out.
To fix this, add the following highlighted line in the PHP location block inside the mautic server block configuration file /etc/nginx/conf.d/mautic.conf.
15. Then restart Nginx and php-fpm services for the recent change to take effect.
16. Next, create your mautic application admin user account and click Next Step.
17. As a final step, configure your email services as shown in the following screenshot and click Next Step.
17. Now log into your mautic application using the admin account credentials.
18. At this point, you can start automating your business marketing from the admin control panel, as shown in the following screenshot.
Mautic is a leading marketing automation platform. It is still a very young project and many features, that you can think of, are yet to be added. If you encountered any issues while installing it, let us know via the feedback form below. Also share your thoughts about it with us, especially concerning features you would like it to have.