Ask AI about this page

Install on Raspberry Pi

SubsiMail also ships as a plain arm64 download (the program plus a lib/ folder for its built-in database — keep lib/ next to the executable, nothing to install) for a Raspberry Pi 4/5 or any other 64-bit ARM board -- no Docker needed, which matters on a Pi's limited RAM. It needs a 64-bit OS with glibc 2.34 or newer, such as Raspberry Pi OS Bookworm (64-bit), and must run as a normal user, not root.

On a regular Intel/AMD server instead? Use the Linux (x86_64) install guide -- same steps, different binary. Not sure which you have? Run uname -m: aarch64 or arm64 means this page, x86_64 means the other one.

Download for Raspberry Pi / ARM64

Run it

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

tar xzf subsimail-*-linux-aarch64.tar.gz
cd subsimail-*-linux-aarch64
./subsimail
Terminal running the subsimail binary on a Raspberry Pi
./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-pi: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]
WorkingDirectory=/opt/subsimail
ExecStart=/opt/subsimail/subsimail
Environment=PORT=3000
Restart=on-failure

[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.