Menu Close

How to install Mautic on your own VPS without headache + video

In this tutorial you will learn in a few minutes how to properly setup VPS server not only for Mautic, but also WordPress and other applications. And it will not hurt your head.

Our goals

  • Install Mautic on own domain
  • Install Mautic on HTTPS
  • Budget 5$/month
  • Without headache
  • Mautic ready to use

1, Create 5$/month VPS

You can use any clean VPS with OS Ubuntu 16.04 x64 or Ubuntu 18.04 x64, but we highly recommend:

2. Setup RunCloud

  1. Create RunCloud account
  2. Click Connect a New server
  3. Add IP address of your VPS created in Step 1
  4. RunCloud will generate script for your server
  5. Connect to VPS with root password in console (see in Step 1)
  6. Run script in console
  7. Wait few minutes to RunCloud setup your VPS
  8. Then store MySQL and runcloud password displayed in console
  9. Now your server is ready to manage as hosting with RunCloud

3. Create Mautic app in RunCloud

  • create Web application on RunCloud
  • choose PHP 7.2

4. Create database

  • Create database user
  • Create database with utf8mb4_bin collation
  • Connect your database user to database

4. Target DNS A record of your Mautic domain to VPS IP address

Usually your domain provider allow your manage your DNS records.

4. Install free SSL certificate

This script https://github.com/rehmatworks/runcloud-letsencrypt add SSL certificate to your current apps and  auto create SSL certificate with any new APP create on RunCloud.

  • connect to server as root
  • run: pip install rcssl; rcssl -i all; rcssl -a enable;

5. Copy Mautic files to server

  • connect o server as runcloud
  • run: ssh runcloud@ipaddress (password from Step 2)
  • run: cd webapps/mautic
  • run this script in console (don’t forget change Mautic version on begin of script)
  • dont’ forget rewrite Mautic version in first line

[code language=”bash”]MTC=2.15.0;
URL=https://github.com/mautic/mautic/releases/download/${MTC}/${MTC}.zip;
wget “${URL}”;
unzip -o “${MTC}.zip”;
rm “${MTC}.zip”;[/code]

5. Install Mautic

  • Go to your Mautic URL – in my case https://mautic.mtcextendee.com
  • If everything OK should start standard Mautic install process

6. Install crons

This script install crons runs every minute for command:

  • mautic:segments:update
  • mautic:campaigns:update
  • mautic:campaigns:trigger

Don’t forget edit first line of directory name of your app.

[code language=”bash”]
DIR=”mautic”;
wget -N https://raw.githubusercontent.com/mtcextendee/mautic-crons-runcloud/master/crons.txt; (crontab -l; echo “$(< crons.txt)"|replace DIR "$DIR")| crontab -;unlink crons.txt;
[/code]

Now Mautic is ready to use.