MailFlow is a self-hosted, open-source webmail client. Connect Gmail, iCloud, Outlook, and any IMAP account — then read, search, and reply from one fast, clean browser interface you control completely.
Works with your favourite email providers
Built for people who want a beautiful webmail experience without handing their inbox to a third party.
Every account in a single, chronological feed. Stop switching tabs and start reading.
Gmail, iCloud, Outlook, Fastmail, or your own mail server. If it speaks IMAP, it works.
TOTP 2FA with Google Authenticator, Authy, or any compatible app. Your accounts stay yours.
Your webmail runs on your own server. No third-party clouds, no data harvesting, no subscriptions.
Dark mode, light mode, multiple color schemes, typography controls, and flexible layouts.
Instant search across every connected account simultaneously, powered by PostgreSQL.
New mail appears the instant it arrives via WebSocket. No polling, no manual refresh.
Docker Compose gets you from zero to a running inbox in under five minutes.
Full WYSIWYG editor with font controls, text and highlight color, tables, emoji, links, and file attachments.
Messages grouped into reply chains. Sent replies appear inline so you never lose context.
Install MailFlow as an app on desktop or mobile. Push notifications work out of the box.
Full shortcut set for compose, navigation, and actions — all remappable per user. Plus a Cmd+K command palette.
MailFlow ships quality over velocity. This reflects what's in focus — updated as things move.
No dates, no commitments — priorities shift as the community's needs become clear. Suggest something →
Flexible themes, layouts, and typography — all from one clean, fast interface.
Theme
Theme
Theme
Compose
Interface
Settings
Interface
Settings
Settings
No complex configuration. No ops expertise required.
Grab the compose file and fill in four secrets. No cloning or building required — pre-built images are pulled automatically.
# Download compose file and config template
curl -o docker-compose.yml https://raw.githubusercontent.com/maathimself/mailflow/main/docker-compose.ghcr.yml
curl -o .env https://raw.githubusercontent.com/maathimself/mailflow/main/.env.example
# Fill in APP_URL, SESSION_SECRET, DB_PASSWORD, ENCRYPTION_KEY
One command starts everything — the app, database, Redis, and nginx. Available on port 443 (self-signed HTTPS) and port 80 by default.
# Pull images and start all services
docker compose up -d
# Serves HTTPS:443 (self-signed) and HTTP:80 by default
Register the first user — they become admin automatically. Then connect your email accounts from the settings panel.
# Supported providers
Gmail → App Password
iCloud Mail → App-Specific Password
Outlook → OAuth2 / App Password
Custom IMAP → Any server
Standard hardening out of the box — bcrypt passwords, rate-limited auth, HttpOnly session cookies, HTML email sanitization, and TLS via self-signed cert or automatic Let's Encrypt with the built-in Caddy profile.
It's open source, so nothing is hidden. Read the code if you want to verify any of it.
View source →A server with Docker installed is all you need. Works with a reverse proxy, or add automatic Let's Encrypt HTTPS with one extra flag.
# 1. Download compose file and config template
curl -o docker-compose.yml https://raw.githubusercontent.com/maathimself/mailflow/main/docker-compose.ghcr.yml
curl -o .env https://raw.githubusercontent.com/maathimself/mailflow/main/.env.example
# 2. Configure — four required values in .env:
# APP_URL → https://your-domain-or-ip
# SESSION_SECRET → openssl rand -hex 32
# DB_PASSWORD → openssl rand -hex 16
# ENCRYPTION_KEY → openssl rand -hex 32
# 3. Launch (pre-built images, no build step)
docker compose up -d
Then open your server's address in a browser. The first account registered becomes admin.
MailFlow is and always will be free for personal use. Commercial deployments require a one-time license.
Self-host for yourself, your family, or any non-commercial purpose under the AGPL-3.0 license.
For businesses, managed hosting, or any deployment where AGPL obligations cannot be met.
Why the change? MailFlow has always been free for individuals and always will be. This dual-license model protects the project from commercial exploitation — if a business wants to build on MailFlow, a small license fee helps fund continued development for everyone. Questions? Open an issue, get in touch, or read the full license.
No server required. We handle the infrastructure so you can focus on your inbox. Join the waitlist and be first to know when it launches.
No spam. One email when it launches.
MailFlow is free to self-host, forever. If it saves you time or money, consider supporting continued development.