Ask AI about this page

Install the Linux binary

SubsiMail also ships as a plain download (the program plus a lib/ folder holding the libraries its built-in database needs — nothing to install) if you'd rather not run Docker. Keep lib/ next to the executable. It needs a 64-bit Linux with glibc 2.34 or newer (Ubuntu 22.04+, Debian 12+, Fedora, Rocky/Alma 9+, Amazon Linux 2023); on older systems or Alpine, use the Docker image. Run it as a normal user — the built-in database refuses to start as root. This page covers the x86_64 build, for regular Intel/AMD servers and desktops.

On a Raspberry Pi or other 64-bit ARM board? Use the Raspberry Pi install guide instead -- same steps, different binary.

Download for Linux (x86_64)

Run it

Extract the download, then run it from the directory where you want its data/ folder created:

tar xzf subsimail-*-linux-x86_64.tar.gz
cd subsimail-*-linux-x86_64
./subsimail
Terminal running the subsimail binary
./subsimail starting up and logging its listening address

By default it listens on port 3000 and keeps its database (a bundled PostgreSQL) in data/pgdata, relative to wherever you launched it from. Open http://your-server:3000 to continue with first-run setup.

Environment variables

PORTPort to listen on (default 3000)
DATABASE_URLOptional. Point SubsiMail at your own PostgreSQL server instead of the built-in database, e.g. postgres://user:password@db-host:5432/subsimail. Leave it unset (the default) and SubsiMail runs its own bundled PostgreSQL — nothing to install or configure.
RUST_LOGLog verbosity, e.g. info
ACME_DOMAIN / ACME_EMAIL / ACME_PRODUCTIONOptional, same automatic-HTTPS behavior as the Docker install
TRUSTED_PROXYSet to true only if you put Nginx, Apache, Caddy, or another reverse proxy in front (see Reverse proxy & SSL). Leave unset when SubsiMail is reachable directly.
PORT=3000 RUST_LOG=info ./subsimail

Running as a service

For anything beyond a quick test, run it under systemd so it survives reboots and crashes restart it automatically:

[Unit]
Description=SubsiMail
After=network.target

[Service]
User=subsimail
WorkingDirectory=/opt/subsimail
ExecStart=/opt/subsimail/subsimail
Environment=PORT=3000
Restart=on-failure
# Give the built-in database time to shut down cleanly
TimeoutStopSec=40

[Install]
WantedBy=multi-user.target

Save that as /etc/systemd/system/subsimail.service, then:

sudo systemctl enable --now subsimail

Adding Nginx or Apache in front of this later? Add Environment=TRUSTED_PROXY=true to the [Service] block above and sudo systemctl daemon-reload && sudo systemctl restart subsimail — otherwise SubsiMail logs every visitor as your proxy's own IP instead of the real one, which silently breaks login-history, audit-trail, and open/click geolocation. See Reverse proxy & SSL.