Frontier Mail

Self-hosting guide

This guide takes you from an empty Linux server to a working mail server, in order. Every command is run exactly as written by the installer's own test, on a clean machine, against mail clients we did not write. If a step does not behave as described, run ./doctor (step 6) and it will tell you what is wrong.

1. What you need

2. Get the installer

Self-hosting is offered by arrangement for now: write to contact@frontier-labs.in and we will send you the installer with its SHA-256. Check the file against it before you extract it:

sha256sum frontier-mail-install-<version>.tar.gz
tar xzf frontier-mail-install-<version>.tar.gz && cd frontier-mail-install-<version>

3. Point the name at the server

Before installing, create an A record for the host name pointing at the server's public IP address, and wait until it resolves.

4. Install

./install.sh --host mail.example.com --domain example.com --acme-email you@example.com --public-ip <the server's address>

The installer checks the bundle, runs a preflight that names exactly what it could not check, loads the server image and refuses to run any image other than the one the bundle pins, makes every secret and key, and starts three services. It prints paths, never a secret. Running it again is safe: every secret that exists is kept. All options, and what each does, are on the Configuration reference.

For a trial on a machine with no public name, add --tls-mode internal: it issues its own certificate, which browsers and mail clients will not trust.

5. Publish your DNS records

Open config/dns-records.txt. It lists the records for your domain: the A record (fill in the address), MX, SPF, DMARC and the two DKIM keys. Publish them at your DNS host. A DKIM value over 255 characters may need splitting into 255-character pieces if your DNS host asks.

6. Check everything

./doctor

doctor changes nothing and prints no secret. It checks that the services are healthy, that each mail port answers with its protocol's greeting, that the web certificate names your host and is not near its end, and each DNS record against what a public resolver says. For every problem it names the record or service and what to do. Its exit status is 0 when nothing failed, so it can run from cron. DNS changes can take a while to spread: run it again later.

7. Sign in and make mailboxes

Read the first password as root, from secrets/platform-password. Open https://mail.example.com, sign in as admin@example.com, and change the password under Settings ▸ Security. Under Administration ▸ Accounts create the mailboxes for your people. To host more domains, use Administration ▸ Customer domains: it shows each DNS record to publish and checks it live.

8. Connect devices

People can use the web mail, or any IMAP and SMTP client with the host name, port 993 (IMAP) and 465 or 587 (sending). Under Settings ▸ Devices the web mail builds a profile for iPhone and Mac.

To let phones and mail programs find the settings from just an address, turn on device setup: ./features on device-setup, then docker compose --env-file config/install.env up -d mail && docker compose --env-file config/install.env restart edge. It adds two more records to config/dns-records.txt: autoconfig.<your domain> (Thunderbird) and autodiscover.<your domain> (Outlook), each an A record pointing where the mail host points, or a CNAME to the mail host. Publish them, wait a minute for the edge to get a certificate for each name, and run ./doctor: it checks that both names answer with the right document. Turning it off again (./features off device-setup) removes the two sites and the two lines.

9. Optional features

./features list shows the switches and ./features on campaigns (or push, sharing) turns one on; then docker compose --env-file config/install.env up -d mail. Details are on the Configuration reference. Campaigns have their own guides: Sending campaigns and Set up a campaign sending domain.

10. Keep it healthy

What this is and is not

One server on one machine. A cluster of three nodes is built and tested but set up by hand, not by the installer. There is no graphical installer.