Docker Deployment¶
Mount a certs/ directory containing cert.pem and key.pem (see Manual install to generate test certs), then run the relay on port 8025.
Runs as non-root
The image runs as the unprivileged user smtp-relay with a pinned UID/GID 10001. Mounted certificates must be readable by that UID, e.g. chown -R 10001:10001 certs or chmod o+r certs/*.pem. Because the process is unprivileged it cannot bind ports below 1024 inside the container — publish a privileged host port instead (-p 587:8025).
See the configuration reference for all environment variables.
Change the UID/GID
The user is created at build time from the UID/GID build arguments:
With the prebuilt image you can override the runtime user instead — the relay needs no write access, only read access to the certificates: