Deploy mailpit

Open-source utility for testing emails and SMTP delivery

Deploy mailpit

axllent/mailpit

axllent/mailpit

Just deployed

Deploy and Host mailpit on Railway

What is mailpit?

Mailpit is a lightweight email testing tool for developers. It runs an SMTP server that captures outbound mail and provides a clean web UI to view, search, and inspect messages, headers, attachments, and links. It also exposes an API for automation in integration tests. UI defaults to port 8025 and SMTP to 1025.

About Hosting mailpit

Hosting Mailpit on Railway is straightforward: deploy the official Docker image and expose the web UI as an HTTP service. The app is stateless by default, storing messages in an in-container SQLite database; for persistence across deploys, mount a Railway Volume and point MP_DATABASE to a file inside that volume (e.g., /data/mailpit.db).

Note: To expose this service publicly on Railway, use port 8025 (web UI). The SMTP port 1025 should remain internal/private.

Common Use Cases

  • Inspect emails from dev/staging environments before sending to real inboxes.
  • Automate end-to-end tests that assert email content via the Mailpit API.
  • Debug templates, headers, attachments, and password reset/verification flows.

Dependencies for mailpit Hosting

  • A Railway account with a project and one service to host the container.
  • A Dockerfile (or direct deploy from the official image axllent/mailpit).

Deployment Dependencies

None

Railway configuration

  1. Networking → set Service Port = 8025 for public traffic.

Why Deploy mailpit 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 mailpit 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

axllent/mailpit

axllent/mailpit

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

View Template
peppermint
Docker-compose port for peppermint.sh