Some of the features provided by Mailtrain include list management, custom field, encryption, template editor, and automation. This app has everything you’d find in a paid list service and it’s free. For more about Mailtrain, please check its homepage. To get started with installing Mailtrain on Ubuntu, follow the steps below:

Install Node.js

Mailtrain is built on top of Node.js and Node.js is easy to install in Ubuntu. Before installing the latest version of Node.js, you must add its PPA to Ubuntu. This repository is provided by the official package maintainer. To add the repository, run the commands below. There are two repositories you can install. one repository contains the latest Node.js packages and the other has the LTS or (Long Term Support) packages. if you need the latest and greatest, then install the first repository. On the other hand, if you need a more stable and tested Node.js package, then install the LTS repository. Then for the Latest release, add this PPA. To install the LTS release, use this PPA After that, you can now install the latest version of Node.js from the particular repository you choose. If you add both repositories, the latest version of Node.js will be installed and not the LTS. To install, run the commands below After installing, both Node.js and NPM modules should be installed and ready to use. You can use the commands below to view the version number installed. To test whether the web server is properly installed, run the commands below to create a test file called http_server.js in your home folder. Then copy and paste the content below into the file and save it. After that save the file and run the commands below to start the server. You should see an output that reads: Server running at http://127.0.0.1:3000/ Now open your browser and browse to the server hostname or IP address followed by port 3000. and you should see a default page with Hello World

Install MariaDB

Now that Node.js is installed, continue below to install MariaDB. To install MariaDB run the commands below: After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service to always start up when the server boots. Run these on Ubuntu 16.04 LTS Run these on Ubuntu 18.10 and 18.04 LTS Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation. When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]:  Y Reload privilege tables now? [Y/n]:  Y

Now that MariaDB is installed, to test whether the database server was successfully installed, run the commands below. type the root password when prompted. If you see a similar screen as shown above, then the server was successfully installed. Next, log on to the MariaDB database server, and run the commands below. Then create a database called mailtrain Create a database user called mailtrainuser with a new password Then grant the user full access to the database. Finally, save your changes and exit.

Download and Install Mailtrain

At this point, both Node.js and MariaDB should be installed and configured. For this tutorial, I’m going to install Mailtrain in my home directory. Change into the current user home folder and download Mailtrain. Copy ~/mail train/config/default.toml as ~/mailtrain/config/production.toml and update MySQL and any other settings in it. Then edit the highlighted lines and save the file. After that, run the commands below to install all dependencies. After that, run the commands below to start the server You should see similar lines below: Open your browser and browse to the server hostname or IP address followed by port #3000 You should see Mailtrain’s default homepage. Installation should be complete. Log in with the username admin and the password test. Once logged in, update the user information and password via the Mailtrain web interface. Default username and password: Congratulations! You have successfully installed and configured Mailtrain on Ubuntu 16.04 | 18.04. You may also like the post below: