---
title: "Deploy Inbucket"
description: "Disposable email testing: catch SMTP mail and read it in a web UI"
category: "Other"
url: https://railway.com/deploy/inbucket
---

# Deploy Inbucket

Disposable email testing: catch SMTP mail and read it in a web UI

**[Deploy Inbucket on Railway](https://railway.com/template/inbucket)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/inbucket/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other
- **Total deploys:** 2

## Template content

### Inbucket https://raw.githubusercontent.com/inbucket/inbucket/v3.2.0/ui/src/favicon.png

- **Source:** https://github.com/aalfath/inbucket-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# 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/inbucket` image, 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` (default `admin`) and the generated `INBUCKET_PASSWORD` from the Variables tab. The REST API uses the same login, for example `curl -u admin:YOUR-PASSWORD https://YOUR-DOMAIN/api/v1/mailbox/alice`.
* **Send mail from another Railway service:** host `${{Inbucket.RAILWAY_PRIVATE_DOMAIN}}`, port `2500`, 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_RETENTIONPERIOD` and `INBUCKET_STORAGE_MAILBOXMSGCAP`. Any other Inbucket setting can be added as an `INBUCKET_*` 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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/inbucket
