Deploy SnappyMail
Fast open-source webmail for your IMAP/SMTP server, data on a volume
SnappyMail
Just deployed
/var/lib/snappymail
Deploy and Host SnappyMail on Railway
SnappyMail is a fast, lightweight open-source webmail client, a maintained fork of RainLoop. It connects to any IMAP and SMTP server and gives users a modern web inbox with threads, search, contacts, Sieve filters and built-in PGP. It stores no mail itself: messages stay on your mail server.
About Hosting SnappyMail
SnappyMail is a PHP application served by nginx and PHP-FPM. It needs no database: configuration, mail domain settings, user preferences and contacts live in files (contacts in SQLite), so the only state to keep is one data folder. This template builds the official djmaze/snappymail image (3.0.1, pinned by digest) from a small GitHub wrapper, puts the data folder on a Railway volume and generates the admin panel password as a Railway secret, so no default or file-only password exists. After deploying, you sign in to the admin panel, add your mail domain's IMAP and SMTP servers, and users sign in with their own mail address and password.
Common Use Cases
- A private webmail front end for a self-hosted mail server (Postfix/Dovecot, Mailcow, Stalwart, Mailu)
- Browser access to an existing provider's mailbox (IMAP/SMTP) from any device
- A shared team or family webmail with per-user settings, contacts and PGP
Dependencies for SnappyMail Hosting
- An IMAP server (and an SMTP server for sending) that the users' accounts live on
- A Railway volume for SnappyMail's data folder (included)
Deployment Dependencies
- SnappyMail: https://snappymail.eu
- Source and releases: https://github.com/the-djmaze/snappymail/releases
- Docker image: https://hub.docker.com/r/djmaze/snappymail
- Template wrapper: https://github.com/aalfath/snappymail-railway-template
Implementation Details
After the deploy finishes:
- Open
https://YOUR-DOMAIN/?adminand sign in with loginadminand theSNAPPYMAIL_ADMIN_PASSWORDvalue from the service's Variables tab. - Under Domains, add your mail domain with its IMAP and SMTP host, port and TLS settings.
- Users sign in at
https://YOUR-DOMAIN/with their mail address and password.
The admin password is reapplied from SNAPPYMAIL_ADMIN_PASSWORD on every start: change the variable and redeploy to rotate it. Updates arrive as changes to the template repo's main branch, and the repo's CHANGELOG.md lists what changed.
Why Deploy SnappyMail on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying SnappyMail on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
SnappyMail
aalfath/snappymail-railway-template