Using Mautic Automated Marketing on an Alibaba Cloud Instance with DirectMail

Step 1. Open Security Group Ports

If you have created your instance, you should be viewing it in your Alibaba Cloud ECS Management Console. Locate ‘Security Groups’ from the left horizontal navigation bar and click it to go to your Instance’s Security Group:

Inbound Rules

Webinoly Requires the following inbound Ports open:

Outbound Rules

Webinoly and Mautic require the following outbound Ports open:

Step 2. Configure Alibaba Cloud DNS

Now we need to go to the Alibaba Cloud DNS management section of your console, you can find this in the left horizontal main menu. Inside the Basic DNS section, click the blue ‘Add Domain’ button in the top right to add your domain:

Step 3. Configure Alibaba Cloud Direct Mail

In your Alibaba Cloud Console Home, locate ‘Direct Mail’ and click it:

Add an Email Domain

In the Direct Mail overview panel, first click on Email Domains in the left horizontal navigation:

Add Sender Address and Set SMTP Password

Now open the Sender Addresses panel and click Create Sender Address:

<Sender Account Name>@<Email Subdomain>

Step 4. Install Webinoly LEMP Stack

Webinoly is an excellent tool that automates the installation of an optimized LEMP web server stack on any Ubuntu 16.04 Instance. It installs Nginx, MariaDB (MySql) and PHP7, alongside command line tools to automate the provisioning of Let’s Encrypt SSL Certificates, FastCGI Static Caching, Redis and Memcached Object Caching servers, and logging tools to help manage your server stack.

# wget -qO weby && bash weby 3

Step 5. Create Virtual Host & Root Directory

With Webinoly it is incredibly easy to configure your Nginx Virtual Host for your site.

# site -php
# nano /etc/nginx/sites-available/

Step 6. Obtain an SSL Certificate with Webinoly

To obtain a Let’s Encrypt SSL certificate and enable HTTPS on your domain with Webinoly, issue the following command:

# site -ssl-on

Step 7. Create your Mautic Database

Login to your MariaDB (MySQL) using your the root password provided earlier (when Webinoly completed installation):

# mysql -u root -p
GRANT ALL ON mastic.* TO 'new_user'@'localhost' IDENTIFIED BY 'new_users_password';

Step 8. Download Mautic Files

Change directory into your site’s root directory, and download the latest Mautic ZIP archive:

# cd /var/www/
# wget -O
# unzip

Step 9. Prepare Mautic Directory permissions

First, from within the root directory, delete the ‘’ archive, and then list out the directory with ownership and permissions:

# rm
# ls -l
# chown -R www-data:www-data /var/www/
# ls -l

Step 10. Install and Configure Mautic

We have prepared everything we need, now we just need to run the Mautic installer, to do that just visit your domain:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: