• Home
  • |
  • Blog
  • |
  • Install Mautic 3.2.X on your VPS – Easiest Setup Ever!

Install Mautic 3.2.X on your VPS – Easiest Setup Ever!

February 8, 2021

Hello All,

This is a rewrite of what I wrote before on my previous blog website. Just a quick intro about Mautic- If you don’t know it yet.

Mautic is an open-source complete Automation package developed by the Mautic.org community. DB Hurley was the founder member of the Mautic Team and since then Mautic is known who’ve achieved success like no one else.

What can Mautic let you do?

Well, Mautic can pretty well handle almost everything you need from a Marketing and Sales Perspective. However, Mautic is young opensource and improving every day.

Why People Prefer Mautic?

Well the primary reason we can say here is
1. Email Marketing.
2. Auto Responder.
3. Landing Pages, Forms, Automated Campaigns.
3. Pixel/Analytics Tracking from Emails. Landing Pages.
4. Mautic reduces the cost of Email marketing or Funnels because of its self-hosted nature.

What is Mautic and how can we benefit from it?

As explained earlier, Mautic is a self-hosted complete marketing solution for organizations and people. Making use of globally renowned SMTP providers or our own SMTP we can run our own Newsletter Business instead of depending on ridiculously overpriced applications present in the market. You know Email Marketing can become very expensive once you have grown to have a large subscriber base as the other applications start to charge you based on the number of subscribers. Well, Good news is not anymore once you start using Mautic.

A normal calculation when working with Mautic and AWS SES Smtp is below for your reference where you will spend roughly about 10$ on sending 10000 emails which is pretty cool right?

Alright, now coming to the point. Since I said Mautic is self-hosted. How to and where to install Mautic?

Since Mautic is a very versatile application, Hosting it with any Cpanel hosting provider can cause the application to run slow and not perform as intended. Hence, I would always recommend you to have a VPS provider.

VPS is nowadays inexpensive and here a few VPS Provider where you can get a VPS for real cheap.

  1. Contabo.com
  2. Digital Ocean.
  3. Hostwinds.com
  4. AWS (Amazon Web Services)
  5. Linode.com

Now let’s assume you already have bought a VPS Subscription. However, you are not tech-savvy and would like to install the application yourself. How do you do that?

Well, This is a broad question. If you are terminal friendly, You will be able to install it yourself by installing MySQL and Apache on your VPS.

What if you want a simpler setup? This is what I will be explaining to you here.

We will make use of something called AAPanel which has a CPANEL like GUI(Graphics User Interface and at the same time doesn’t overload your CPU)

AAPanel is the English/Global Version of BTPanel and is very lightweight making it one of the fastest Cloud Server Panel Manager. Installing it is one step and is dead easy.

Depending on the operating system you have, You would like to install the AAPanel by following this article here.

Once you have installed AAPanel Its now time to install Mautic 3.2.X . Let’s assume you have got the 3.2.5 downloaded from mautic.org

We will go ahead and upload it to AAPanel and then unzip the Mautic Application. Then We will go ahead and create a Database for Mautic. Then we will need to go ahead and Issue our domain an SSL.

Once done follow the steps below.

How to install Mautic 3.0 on AApanel.

Step1. We need to download Mautic 3.0.2 from Mautic.org/download.
Step2. Prepare the domain/subdomain we are hosting it. (Ensure the A records are pointing and SSL is issued)
Step3. Minimum Requirements: https://www.mautic.org/blog/community/mautic-3-is-coming
Step4: Upload 3.2.5 zip on the website/subdomain we created.
step1 - Biswajit Pradhan
Step5: Go to domain/subdomain on a browser and you should see the installer.
Step 6. Run the installer (Since, It’s a new installation, I am not backing up the DB)
stp2 - Biswajit Pradhan
Step 7: After giving your DB info. There is a high chance to get a 500 server error. If you come across any such errors. Its solely due to the file permissions. Ensure you have the permissions correct.
An easy command that you can use on the terminal to fix it would be

Ensure you cd to the website folder wwwroot/domain.com first and then type.

chmod -R g+w app
chmod -R g+w media/files/ media/images/ translations/

Once you do that, it should work fine.

Step7: You should now be able to refresh and reach the next page.
stp3 - Biswajit Pradhan
You will need to give your Admin username and password.
Your first name and last name and email address and should take you to the next page /3

stp4 - Biswajit Pradhan

Here you would be asked to configure your email SMTP. I use AWS SES here.

Then Hit NEXT> You should redirect to the login page and should be able to log in.

Next is to setup PHP cron jobs for the Mautic to work properly.

Once you log in go to the settings gear icon on the top right.

1596893072 925134 stp5 - Biswajit Pradhan

You will need to click on configuration and check the patch to the installation and cache directory.

You also have to note that with Mautic 3.0.2 you have to cron using bin/console and not app/console.

You will need to go ahead to cron on AApanel and set up shell crons

This will be the syntax for the same considering you are using PHP 7.3
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:segments:update
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:email:fetch
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:campaigns:trigger

You should be ready to send out emails from campaigns now.

Next, We will make use of AWS SES on this Mautic install which is really cost-effective and at the same time not compromising the quality. There are few ways to connect Mautic and AWS SES explained below.

  1. AWS SES Smtp

We will make use of AWS SES API as it helps us manage bounces and complaints more effectively using SNS which is another AWS Offering for managing/handling of our bounces and complaints.

Once Mautic is installed. We will need to set up few Cron Jobs. Due to its self hosted nature, Mautic heavily relies on Cron Jobs.

Below are the Cron Jobs that we should be selecting.

/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:segments:update
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:email:fetch
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:campaigns:trigger

There are many other cron jobs which can be installed on case to case basis.

Done! As they say, With Great Power comes Great Responsibility. Be Responsible and Don’t Spam. Feel free to ask questions if any.

About the author 

Biswajit Pradhan

I work as a Security and Vulnerability Remediation Specialist on Windows and Linux and I work for a Finance Technology Company based in India, I am building this blog to share my opinion with the world. I write mostly on Mautic, WordPress, Hosting, and Technological tips and Product reviews.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}