FAQ for this step is available here.

Recommended Server specificationInstalled software
8 vCPU Cores
24 GB RAM
300 GB NVMe
Ubuntu 20.04, 22.04 or CentsOS7 (required by PowerMTA MC)
Control panel
Email Marketing Software
PowerMTA Management Console

Main Server Installation

DNS Records

NOTE: Kindly note that this is the most common step where users tend to encounter difficulties, resulting in lower email deliverability. It is essential to maintain precision and focus. I highly recommend using my DNS Creator Tool for optimal results.

Before you start with your main server install I suggest setting up all necessary DNS records. You can do it manually or use my DNS Creator Tool (suggested). DNS Creator Tool will create an import file with all required DNS records. All you have to do is import them with 2 clicks.

If you want to do it manually here are all the DNS records that must be created:

cloudflare CLOUDFLARE - DNS RECORDS

A Records

Name Content
HOSTNAME.YOUR-MAIN-DOMAIN.COMMAIN_IPV4
mail.YOUR-MAIN-DOMAIN.COMMAIN_IPV4
PANELNAME.YOUR-MAIN-DOMAIN.COMMAIN_IPV4
YOUR-MAIN-DOMAIN.COMMAIN_IPV4

AAAA Records

Name Content
HOSTNAME.YOUR-MAIN-DOMAIN.COMMAIN_IPV6
mail.YOUR-MAIN-DOMAIN.COMMAIN_IPV6
PANELNAME.YOUR-MAIN-DOMAIN.COMMAIN_IPV6
YOUR-MAIN-DOMAIN.COMMAIN_IPV6

MX Records


Content Locked

Login or sign up to see the MX records needed for the Main server.

TXT Records


Content Locked

Login or sign up to see the TXT records needed for the Main server.

DNS Creator Tool generates all these records for you in just a few clicks and eliminates any copy/paste errors.

rDNS or PTR Setup

It's always a smart idea to set up reverse DNS or rDNS (sometimes called PTR records) as soon as possible. It takes time for it to become visible to all computers connected to the internet. It's the same with DNS records.

IMPORTANT: Never start sending if you made major DNS or rDNS changes in the last 3 days!

It's a bit hard to write a guide on how to set up rDNS since each provider takes a bit different approach. With some providers, you set rDNS even before your server comes online, while others have dedicated sections in their dashboards. Typically rDNS settings are somewhere where your IPs are listed. Here are a few different ways to set rDNS.

VPS PROVIDER

rDNS Example 1

rDNS example 1

rDNS Example 2

rDNS example 2

rDNS Example 3

rDNS example 3

Hopefully, you will find a way to set rDNS with your VPS provider with ease. If you have problems try to ask their support for assistance.

IMPORTANT: Make sure your rDNS matches what you set for theMain server's hostname.

Enable IPv6


Content Locked

Login or sign up to see how to enable IPv6 on your main server.

Create swap

PowerMTA requires a swap so let's create a 1GB swap file. Just copy/paste the code below.


Content Locked

Login or create a free account to see this content.

Set hostname

Wait for your server to come back online. Now it's time to set the hostname. We already added A and AAAA records.

ssh SSH - MAIN SERVER

hostnamectl set-hostname sub.domain.com
reboot

Wait for your server to come back online and run this command

hostname

You should get what you set before if you don't follow the steps below.

Follow these steps to set your hostname. Click to expand.
nano /etc/hostname

Delete the old name and replace it with a new name

nano /etc/hosts

Replace any occurrence of the existing hostname with your new one.

nano /etc/hosts

Reboot

reboot

Install Control Panel

Your server is now ready to install the control panel so you can continue the installation of needed services and configuration of the server in a web browser.

ssh SSH - MAIN SERVER


Content Locked

Login or sign up to see how to install the control panel on your main server.

The installation process of the control panel shouldn't take more than 3 minutes. When it's done you will see something like this.

==================================================================
Congratulations! Installed successfully!
==================================================================
Internet Address: https://SUB.DOMAIN.COM:RANDOMPORT/RANDOMTEXT
username: randomuser
password: randompassword
==================================================================

Save this to your TXT file and using the info provided login to your newly installed control panel. If you are using NotePad++ you can double-click on the Internet Address.

aapanel CONTROL PANEL - MAIN SERVER

After a successful login install the following. Use the right column.


Content Locked

Login or sign up to see what needs to be installed so that later Email Marketing Software can be installed without any problems.

Since we plan on using this server for a long time you'll want to compile everything specifically for your server. Don't worry all it takes is a click of a button, but the process can take up to an hour to complete (depending on your server's hardware might take more). If you are testing and planning on doing an installation on a production server later it's ok to select "Fast" otherwise choose "Compile".


Content Locked

Login or sign up to see how to make changes to PHP so all requirements for Email Marketing Software installation will be met.

Use the left menu and navigate to "Install extensions". Here install fileinfo and imap. Still, in PHP Manager window click on "Configuration" and change these settings:

max_input_time=120
memory_limit=1024M
post_max_size=256M
upload_max_filesize=128M

Click "Save" at the bottom. Now go to "Configuration file". Search for (CTRL+F) "allow_url_include" and change it to "On".

Enable allow_url_include

Don't forget to save. Still, in PHP settings go to "Disabled functions" and press "Del" next to "exec", "shell_exec", "passthru", "putenv", and "proc_open" to enable these functions. Now click on "Service" and restart PHP.

Restart PHP

Your server is now ready for Email Marketing Software installation. In this guide, we use a custom software, but you can use any EMS you prefer (Mumara, Interspire, Mailwizz, ...). The reason why we are using a custom EMS is how it integrates with PowerMTA to process bounces. Mumara uses a similar solution. MailWizz and Interspire require additional thirtd-party addons for this. All mentioned EMS is available for download in Members area.

We will come back and tighten security, create some email addresses, and if needed make the server ready to host your other websites (WordPress, Joomla, Drupal, ...).

Install Email Marketing Software

Now we are going to install the Email Marketing Software. This is used to manage lists, recipients, sending servers, ...

aapanel CONTROL PANEL - MAIN SERVER

Add domain

In the controls panel left menu click on "Website" and now the green "Add site" button. In the "Domain name" field write your domain name and select the "HTTP redirects to HTTPS" checkbox. Since you already added A and AAAA records to Cloudflare before the SSL verification should pass without a problem. If it doesn't make sure your DNS records are correct and wait for them to propagate.


add domain to control panel

Login or sign up to see unblurred images.

Click the green "Submit" button at the bottom. Your web folder for the domain you just added is /www/wwwroot/yourdomain.com.

Create SQL database

In the controls panel left menu click on "Databases" and now the green "Add database" button. In the "DBName" field write "emsoftware", for "Username" enter "emsuser". Leave the password as it is or generate a new one. Copy the password to your TXT file. You can use "Force SSL".

Control panel create SQL database

Click the green "Submit" button at the bottom.

Upload Email Marketing Software

In the controls panel left menu click on "Files" and navigate to yourdomain.com. Click the "Upload" button and select or drag ems.zip (download it from the Members area, it's included in guide.zip). Click the green "Upload" button at the bottom and wait for the upload to complete.

aapanel CONTROL PANEL - MAIN SERVER

Control panel upload files

Close the upload window and right-click on ems.zip. Select "Unzip"

Control panel unzip files

In the window that pops up enter unzip password and press the green "Confirm" button.

Control panel path to unzip

Right-click ems.zip again and select "Delete" to remove it from your web folder. Confirm deletion with the green "confirm" button. Email Marketing Software is ready for installation.

ssh SSH - MAIN SERVER

Run the following commands.


Content Locked

Login or create a free account to see the steps needed to complete the EMS installation.

mumara EMS - MAIN SERVER

Point your web browser to https://yourdomain.com/install and enter the SQL database, username, and password. Enter your login email and choose a password (save both to your TXT file). Click "Install".

Ninja EMS installation

The installer should complete in a few seconds but in the meantime open your SSH client.

Ninja EMS installed

mumara EMS - MAIN SERVER

Login to EMS with the email and password you choose during installation.

Set cron tab for EMS

You can check your cron command in the last step of installation. Go back to your control panel.

aapanel CONTROL PANEL - MAIN SERVER

In the controls panel left menu click on "Cron" and use the command "/usr/bin/php /www/wwwroot/yourdomain.com/artisan schedule:run >/dev/null 2>&1". The execution cycle must be set to 1 minutes. Click the green "Add task" button.

Control panel set up cron

You will see your cron under "Task List" on the same page.

ssh SSH - MAIN SERVER

Now go back to your preferred SSH client and run the following to remove the "install" directory and enable Geo tracking.

cd /www/wwwroot/yourdomain.com
rm -rf install/
cd geo
wget https://mailcarry.com/downloads/GeoLite2-City.zip
unzip GeoLite2-City.zip && rm -f GeoLite2-City.zip

EMS installation is now complete. We'll come back to it to adjust a few settings, but let's move to the PowerMTA Management Console installation.

login screen

Install PowerMTA Management Console

We are almost finished with installations on our main server. Now it's time to install the PowerMTA Management Console. Open your SSH client.

ssh SSH - MAIN SERVER

Since we already set the hostname and created a swap file in previous steps there is no need for that. But if you are installing PowerMTA Management Console on a fresh server install you need to take care of that before you continue.

Run this commands

yum install nano bzip2 unzip ntp wget -y
yum update -y

Upload pmtamc.zip (download it in the Members area) to /root directory on your server. You can do it either in Bitvise SSH using the "New SFTP windows" button where your starting location will be /root so just drag the file in there or via the control panel. In the controls panel left menu click "Files" and navigate to /root. Upload pmtamc.zip the same way you uploaded before.


Content Locked

Login or sign up to see how to install the PowerMTA Management Console.

PowerMTA Management Console download

Login or sign up to see unblurred images.

PowerMTA Management Console is installed and running. But before you can connect to it you have to open some ports in your main server's firewall. Before we move to the control panel, run this set of commands in your SSH client to complete the PMTA MC install.


Content Locked

Login or create a free account to see this content.

Restart PowerMTA Management Console

Open ports

In the controls panel left menu click on "Security" and now the green "Add Rule" button. Allow connections to ports "8181, 8282, 4848, 3700, 7676, 8686" like in the image below.

aapanel CONTROL PANEL - MAIN SERVER


PowerMTA MC open ports

Login or sign up to see unblurred images.

Click the green "Confirm" button.

PowerMTA Management Console - MAIN SERVER

PowerMTA Management Console login screen

Change your password on your first login.

PowerMTA Management Console first login

PowerMTA Management Console is now up and running. But it's rather useless without a PowerMTA node.

Depending on your needs you now have a main server running Ubuntu or CentOS. There is a control panel for easier configuration and administration of the server. We installed Email Marketing Software and in the last part of this step PowerMTA Management Console.

Here are all the important URLs and other information. All of this should already be in your TXT file!

Control Panel

Your control panel is accessible at
https://sub.yourdomain.com:randomport/randomtext
username: in your TXT file
password: in your TXT file

Domain & SQL

Your domain is now accessible in the browser
https://yourdomain.com
Website Path: /www/wwwroot/yourdomain.com
SQL database: emssoftware
Username: emsuser
Password: in your TXT file

EMS

Our custom EMS is now accessible in the browser
https://yourdomain.com
Username: in your TXT file
Password: in your TXT file

PowerMTA Management Console

PowerMTA Management Console is now accessible in the browser
http://sub.yourdomain.com:8181
Username: admin
Password: admin

Congratulations! You finished Step 1!

Continue to Step 2 and Install PowerMTA or check the FAQ if you encounter any problems during installation.