Postal with docker on Nethserver

Part 1: Configure External Dns

1. Config A record on external dns ie


⇒ public ip of


2. Config second A record on external dns ie


⇒ public ip of


3. Config MX record on external dns ie


⇒ public ip of




Part 2: Configure Nethserver through Cockpit

1. On the Dashboard set Hostname to FQDN ie


and add an ALIAS with


2. Set dns resolvers

3. In DNS settings (in system on dashboard) set


⇒ Public IP of


4. In Certificates (in system on dashboard) set Lets Encrypt with both




, generate and make sure its set to default

5. In Software Center install Reverse Proxy (apache proxypass) and Docker Community

Step 3: Install Prerequisites and create the database in Terminal

1. In terminal install Prerequisites

yum -y install git curl jq

2. Clone the Postal installation helper repository

git clone /opt/postal/install
sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal

3. Install Docker Compose from terminal

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

4. Apply executable permissions to the binary

sudo chmod +x /usr/local/bin/docker-compose

5. Create a symbolic link to /usr/bin

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

6. Create the Postal DB

mysql -e "create database postal; grant all on postal.* to postal@localhost identified by 'strongpassw00rd'"

Step 4: Install RabbitMQ in Terminal

1. Install a RabbitMQ instance and have it listen on port

docker run -d \ --name postal-rabbitmq \ -p \ --restart always \ -e RABBITMQ_DEFAULT_USER=postal \ -e RABBITMQ_DEFAULT_PASS=differentstrongpassw00d \ -e RABBITMQ_DEFAULT_VHOST=postal \ rabbitmq:3.8

* *Be sure to choose a secure password. You'll need to put this in your Postal configuration when you install it so be sure to make a (secure) note of it.*

Step 5: Configuration

1. Run the command and replace


with the actual hostname you want to access your Postal web interface at.

*This will generate three files in

* *<code>postal.yml`` is the main postal configuration file*
* *<code>signing.key`` is the private key used to sign various things in Postal*
* *<code>Caddyfile`` ignore this as we don't use it*

*Once generated, you should open up /opt/postal/config/postal.yml and add all the appropriate values for your installation (database passwords etc...).*

><div style="font-family: 'Apple Color Emoji', EmptyFont2">ℹ </div>Note that the docker setup mounts <code>/opt/postal/config



so any full directory paths mentioned in


will likely need to start with


and not


Step 6: Initialising the database

1. Initialise your database by adding all the appropriate tables. Run the following commands to create the schema

postal initialise

2. Then create your first admin user.

postal make-user

Step 7: Running postal

1. You're now ready to actually run Postal itself. You can go ahead and do this by running

postal start

Step 8: Reverse Proxy

1. Setup the reverse proxy in Cockpit as follows


and select the first three options with ssl and save

  • userguide/postal.txt
  • Last modified: 2022/01/13 05:26
  • by Shane Treweek