Deploy Inbucket
Disposable email testing: catch SMTP mail and read it in a web UI
Just deployed
/storage
Deploy and Host Inbucket on Railway
Inbucket is an open-source disposable email testing service. It runs an SMTP server that accepts mail for any address, stores it without delivering it, and shows it in a web UI. Developers and testers use it to check sign-up, password-reset and notification emails, through the browser, its REST API or POP3.
About Hosting Inbucket
Inbucket is a single Go binary with a web UI on one port, SMTP on 2500 and POP3 on 1100. Hosting it means keeping its mail store on persistent disk, exposing the web UI over HTTPS, and making the SMTP port reachable by the apps you test. Inbucket has no login of its own, so anyone who finds the web UI can read every captured email. This template runs Inbucket 3.2.0 behind a small Caddy proxy that adds a password to the web UI and REST API, stores mail on a Railway volume, gives SMTP a private-network address and a TCP proxy, and checks health without login.
Common Use Cases
- Catch the emails a staging or preview app sends (sign-up, password reset, invoices) without reaching real inboxes
- Read test emails from end-to-end tests (Cypress, Playwright) through the REST API
- Give QA and designers a shared inbox to review email content and HTML rendering
Dependencies for Inbucket Hosting
- Inbucket 3.2.0 (official
inbucket/inbucketimage, pinned by digest) - Caddy 2.11.9 for the password-protected web entry point
- A Railway volume for stored mail
Deployment Dependencies
- Inbucket: https://github.com/inbucket/inbucket
- Inbucket 3.2.0 release: https://github.com/inbucket/inbucket/releases/tag/v3.2.0
- Configuration reference: https://github.com/inbucket/inbucket/blob/main/doc/config.md
- Template repo: https://github.com/aalfath/inbucket-railway-template
Implementation Details
The template deploys one service built from aalfath/inbucket-railway-template, so merges to its main branch reach you as Railway update notices.
- Log in: open the service domain and use
INBUCKET_USERNAME(defaultadmin) and the generatedINBUCKET_PASSWORDfrom the Variables tab. The REST API uses the same login, for examplecurl -u admin:YOUR-PASSWORD https://YOUR-DOMAIN/api/v1/mailbox/alice. - Send mail from another Railway service: host
${{Inbucket.RAILWAY_PRIVATE_DOMAIN}}, port2500, no TLS, no SMTP auth (any user and password are accepted). - Send mail from outside Railway: use the TCP proxy address shown under the service's Networking settings. It accepts mail from anyone who knows the address, so remove it if you only send from inside Railway.
- Read mail: type a mailbox name (the part before
@) in the UI, or open Monitor to see everything as it arrives. POP3 is on port 1100 over the private network. - Retention: mail is kept for 72 hours and up to 300 messages per mailbox. Change this with
INBUCKET_STORAGE_RETENTIONPERIODandINBUCKET_STORAGE_MAILBOXMSGCAP. Any other Inbucket setting can be added as anINBUCKET_*variable.
Inbucket never delivers mail to real recipients.
Why Deploy Inbucket 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 Inbucket 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
