Deploy mailstead
Resend-backed self-hosted email portal with inbox and admin.
mailstead
Just deployed
/data
Deploy and Host Mailstead on Railway
Self-hosted email portal for small teams, backed by Resend for delivery and inbound mail.
About Hosting
Mailstead runs as a single Docker service with a persistent volume at /data (SQLite database and mail blobs). A background worker process handles inbound webhooks, outbound sends, and scheduled jobs. Attach a Railway public domain; PUBLIC_URL is set from RAILWAY_PUBLIC_DOMAIN.
Why Deploy
- Own your mail UI without running a full mail stack (Postfix, Dovecot, etc.)
- Resend handles deliverability and inbound receiving; Mailstead stores and presents mail
- Admin + per-user mailboxes for 10–50 users
- Ops dashboard at
/ops/for storage and worker health
Common Use Cases
- Team shared hosting on your domain via Resend
- Internal notifications inbox with a simple web client
- Staging or production portal next to your app on Railway
Dependencies for
Deployment Dependencies
| You provide | Purpose |
|---|---|
RESEND_API_KEY | Resend API (send + receive APIs) |
MAIL_DOMAIN | Domain verified in Resend |
ADMIN_RECOVERY_EMAIL | Password reset delivery |
Generated at deploy: SECRET_KEY, APP_ENCRYPTION_KEY, BOOTSTRAP_TOKEN. Optional: DATABASE_URL for Postgres instead of SQLite on /data.
First deploy
- Deploy and wait until healthcheck passes (
/healthzrecommended on Railway). - Open
https:///setup/once (token is in service variables). - Create users and mailboxes in Admin (
/admin/). - Configure Resend DNS for
MAIL_DOMAINand register webhooks (scheduled job or admin).
Volume
Do not remove the /data volume unless you intend to wipe mail storage.
Health
- Liveness:
/healthz - Readiness:
/readyz(includes worker heartbeat)
Source
Template Content
mailstead
mabounassif/mailsteadDATA_ROOT
MAIL_DOMAIN
RESEND_API_KEY
ADMIN_RECOVERY_EMAIL
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
