Set up EmailEngine

Installation instructions

All the following examples run EmailEngine with the default configuration. In most cases, you probably want to use specific settings, e.g., to change the Redis connection string. You can read about all the possible configuration options from the configuration page.

MacOS

1. Redis

Install Redis using Homebrew

$ brew update
$ brew install redis
$ brew services start redis

2. EmailEngine

Download and run the installer for the Intel processor or Apple silicon. emailengine executable is installed to the /usr/local/bin folder.

3. Start the app

$ emailengine --dbs.redis="redis://127.0.0.1:6379/0"

If you want to upgrade EmailEngine to the latest version, download the emailengine.pkg and run the installer.

To uninstall, delete the executable file from /usr/local/bin/emailengine

Linux

1. Redis

Install Redis from the RedisLabs repository

These specific instructions apply to Ubuntu. See other options from the Redis homepage.

$ sudo apt-add-repository -y ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get -q -y install redis-server
$ sudo systemctl enable redis-server
$ sudo systemctl start redis-server

2. EmailEngine

Download the compressed executable, extract it and store it in a suitable location.

$ wget https://github.com/postalsys/emailengine/releases/latest/download/emailengine.tar.gz
$ tar xzf emailengine.tar.gz
$ rm -rf emailengine.tar.gz
$ sudo mv emailengine /usr/local/bin

3. Start the app

$ emailengine --dbs.redis="redis://127.0.0.1:6379/0"

If you want to upgrade EmailEngine to the latest version, re-run the commands listed in Step 2. and restart EmailEngine.

Ubuntu / Debian

You can use the included install script to set up:

  • EmailEngine as a SystemD service
  • Redis server
  • Caddy reverse proxy
  • Upgrade script to upgrade EmailEngine in the future (/opt/upgrade-emailengine.sh)

Important Notice: Please refrain from running the installer on an Ubuntu machine currently in use for other applications. The installer configures multiple components that may potentially conflict with your existing setup. In such case use the general Linux instructions above.

First, download the installer script.

$ wget https://go.emailengine.app -O install.sh

or

$ curl -L https://go.emailengine.app -o install.sh

And then

$ chmod +x install.sh
$ sudo su
$ ./install.sh example.com

Where

  • example.com is an optional domain name for EmailEngine. If you do not provide this value, then the install script will ask for it or generate a default domain name itself.

NB! Tested with Ubuntu 20.04 and Debian 11. Might not work with other OS versions. Must be run as root.
If the installation process gets stuck in random places, the instance size is usually too small.

Windows

1. Redis

There is no official build of Redis for Windows. You can install a compatible alternative like Memurai or configure EmailEngine to use a remote Redis instance.

2. EmailEngine

Download emailengine.exe executable and store it in a suitable location.

3. Start the app

In PowerShell, run the executable:

PS C:\Users\user\Downloads> emailengine.exe --dbs.redis="redis://127.0.0.1:6379/0"

If you want to upgrade EmailEngine to the latest version, download and replace emailengine.exe.

DigitalOcean

EmailEngine is available on the DigitalOcean Marketplace as a 1-Click Application. When spinning up the application, you can choose either the included Redis instance or the managed DB option. If you do not choose the managed option, you are responsible for backups yourself.

The following link is a referral link that gives you free credit if you are not yet a DigitalOcean customer.

NB! Use an instance with at least 2GB RAM


If you want to upgrade EmailEngine to the latest version, log into the server with ssh and run the following command:

$ sudo /opt/upgrade-emailengine.sh

Heroku

Use the "Deploy to Heroku" button to set up and run EmailEngine on Heroku. You only have to set the name value on the application configuration form; other fields can be left as is.

Deploy

NB! Heroku, as a platform provider, has unique quirks. Like killing long-running connections by default. This might or might not have an effect on how EmailEngine is able to operate. It is suggested to use Heroku only if you already use it for everything else, so it would make little sense to use an alternative host. And probably over-provision. If you need 2GB, you better get 4 GB.
Heroku also has Redis connection limits other providers do not have. Each EmailEngine worker thread opens a bunch of Redis connections, and if you are using a low-end Redis dyno, the available connections will be exchausted quite soon.

Render

Use the "Deploy to Render" button to set up and run EmailEngine on Render.

Deploy to Render

See manual installation instructions for Render.com here.

CapRover

CapRover has native support for EmailEngine. To install it, open the "One-click apps" gallery in your CapRover installation and search for EmailEngine.

  1. From the setup form, fill in the app's name. Set it, for example, to "emailengine".

  2. Once EmailEngine has been installed, make sure to enable HTTPS. Additionally, check the "Force HTTPS by redirecting all HTTP traffic to HTTPS" checkbox.

  3. Next, click on the application URL to open EmailEngine.


If you want to upgrade EmailEngine to the latest version, log into the CapRover admin page. On the Apps page, select your EmailEngine app and navigate to the Deployment tab.

Find the Method 6: Deploy via ImageName input field and enter the following image name:

andris9/emailengine:v2

Next, click on the Deploy now button.

Other platforms

Run EmailEngine on other platforms like the ARM-based Raspberry Pi.

Step 1. Install Node.js runtime

Get Node.js runtime for your platform from here.

Step 2. Install Redis

Install Redis for your platform as documented here.

Step 3. Download and run EmailEngine

Download and extract application files

$ mkdir emailengine
$ cd emailengine
$ wget https://github.com/postalsys/emailengine/releases/latest/download/source-dist.tar.gz
$ tar xzf source-dist.tar.gz
$ rm source-dist.tar.gz

Prepare configuration by creating a dotenv file with example values (see all configuration options here).

$ echo 'EENGINE_WORKERS=2
EENGINE_REDIS="redis://127.0.0.1:6379/8"' > .env

Start the app. Configuration is loaded from the dotenv file

$ node server.js