How to host Mautic on AWS Lightsail VM Instance - ServerAvatar

Published : Mar 22, 2023

Share This Post


AWS Lightsail

AWS Lightsail is a simplified and cost-effective way to launch and manage virtual private servers (VPS) in the cloud. It provides a user-friendly interface for deploying and scaling VPS instances with pre-configured options for operating systems, applications, and storage. Additionally, it offers a predictable pricing model that includes a flat monthly fee based on the instance size and data transfer limits.

Get started with AWS Lightsail


Mautic is an open-source marketing automation tool that helps you automate the marketing tasks including lead management, campaign management, etc. With Mautic, converting and managing leads is lot easier.

More info

Create VM Instance in AWS Lightsail

To create a server in AWS Lightsail, First log in to the AWS Lightsail console. Once you are there, Follow the steps given below.

Step 1: Go to Instance Creation Form

To access the instance creation form, Go to AWS Lightsail dashboard and click on the orange button with Create Instance text. See the following image for reference.

Create VM Instance in AWS Lightsail - Step 1

Step 2: Select the Location of your Instance

First of all, You have to select the location for your instance. It is always better to select a location closest to your major traffic source. It will decrease the latency for majority of your website visitors.

Create VM Instance in AWS Lightsail - Step 2

If you want to change the location of your server, You can simply update the current region in your AWS account.

Step 3: Select the OS for your Instance

After selecting the location, Select the operating system for your instance. In this case, First click on OS Only and then select Ubuntu 20.04 as an operating system just like the following image.

Create VM Instance in AWS Lightsail - Step 3

Step 4: Select SSH Key and Launch Script (Optional/Advanced)

This is an optional step. Here you can set the Launch script and the main SSH key for your server. If you don't understand launch script and SSH keys, Just ignore this step.

Create VM Instance in AWS Lightsail - Step 4

Step 5: Select the Plan

In this step, select the size of your VM instance. AWS Lightsail provides lots of different options when it comes to plans and pricing. The plan and pricing selection completely depends on the requirements of your site(s). So, select the plan based on the complexity and traffic of your sites.

Create VM Instance in AWS Lightsail - Step 5

Step 6: Verify and Create the Instance

Finally, Enter the name of your instance, number of instances you want to create and assign the tags accordingly for identification. Once done, click on the Create Instance button to start the instance creation process.

Create VM Instance in AWS Lightsail - Step 6

It might take a few minutes to deploy the instance. Once done, follow the below given step to update the firewall rules for the VM instance.

Step 7: Update Firewall Rules

ServerAvatar requires 43210 port open. In total, You need to keep the following ports open on the instance.

  • 22 (SSH): To access your server via SSH.
  • 80 (HTTP): To access your sites on HTTP.
  • 443 (HTTPS): To access your sites on HTTPS.
  • 43210 (ServerAvatar): To allow communication between ServerAvatar and your instance.

To update the firewall rules for a specific instance, Go to the AWS Lightsail dashboard and click on the name of the instance you want to update. Then go to the Networking section and add the missing firewall rules. After updating the firewall rules, the networking section of your Instance should look like the following image.

Create VM Instance in AWS Lightsail - Step 7

Initial Server Configuration

The Initial server configuration includes installation and configuration of various packages required to host your website. Usually, You have to write commands and modify configuration files. Luckily, With ServerAvatar, Your full server configuration and optimisation can be automated.

Here are the three ways to automatically configure your server with ServerAvatar.

Auto-install Mautic with ServerAvatar

Step-1 Create a PHP application

Once you are on the server panel, access the Application tab from the sidebar.

Create application

Now by clicking the Create button, you’ll see the application creation form as the below image. Fill in the required details to create an application, including the Application Name, Primary Domain, and other PHP Settings.

application creation form

Click the Create Application button.

Note that:

If you want to host Mautic CRM on your domain, then make sure to point your domain to the current IP address of your server, and for that:

  1. Log in to your hosting provider site, where you buy your domain. You can check your domain information with one click.

  2. Access DNS Manager to edit your DNS records(contact the support team if you don’t find them)

  3. Change the IP address of A Record of your website to the current server’s IP address.

Step-2 Auto-install Mautic application

From your application panel, access the Auto deploy tab from the sidebar. Now click the Mautic Auto install card like the below image.

Mautic Auto-install

It asks to enter Mautic application details in the form. The details include the following-

Admin credential

These details are used for logging in to your Mautic panel as an admin.

  • First Name: Enter admin first name
  • Last Name: Enter admin last name
  • Username: Enter admin username
  • Email:You will use this email if you forget your password or want to reset the password.
  • Password: Enter admin password

PHP Settings

PHP Version: You can here change the PHP version for your Mautic installation.

Email Configuration

Mail from Name: The name seen when you send an email. Mail from email: The email address from which you send an email. Mail Username: Username of chosen SMTP credential Mail password: Password of chosen SMTP credential Mail port: 25 or 465, or 587 would be recommended for sending an email. Mail Host: Chosen SMTP hostname. For example,

Auto deploy form

After filling up all the details, click the Install Now button.

Step-3. Install SSL Certificate

You can install SSL for your website using just one click. On the application panel, click on the SSL Certificates tab from the sidebar.

Install SSL

You can also use a custom installation method to install SSL certificates. After installing the SSL, check the box of Force HTTP to HTTPS to secure the communication between your browser and website.

Once you are done, access the Application URL on your browser. It redirects to the admin login page. Enter admin credentials to log in to your Mautic admin panel.

And that’s it. You can now use Mautic to create a strong marketing strategy for your business.