Free, open-source alternatives to Gmail
Google's email service. 8 apps you can run yourself instead of Gmail, sorted by how well they replace it. Each one is open source, so your data stays with you.
MailcowBest match
Mail server suite based on Dovecot, Postfix and other open source software, that provides a modern Web UI for administration.
Stalwart Mail Server
All-in-one mail server with JMAP, IMAP4, and SMTP support and a wide range of modern features.
Mail-in-a-Box
Turns any Ubuntu server into a fully functional mail server with one command.
Mailu
Simple yet full-featured mail server as a set of Docker images.
docker-mailserver
Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container. Only configuration files, no SQL database.
Mox
Complete e-mail solution with IMAP4, SMTP, SPF, DKIM, DMARC, MTA-STS, DANE and DNSSEC, reputation-based and content-based junk filtering, Internationalization (IDNA), automatic TLS with ACME and Let's Encrypt, account autoconfiguration, and webmail.
Maddy Mail Server
All-in-one mail server that implements SMTP (both MTA and MX) and IMAP. Replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC with single daemon.
Modoboa
Mail hosting and management platform including a modern and simplified web user interface.
Side by side
| App | Stars | License | Activity | Runs on |
|---|---|---|---|---|
| Mailcow | 13,600 | GPL-3.0 | Docker, PHP | |
| Stalwart Mail Server | 15,074 | AGPL-3.0 | Rust, Docker | |
| Mail-in-a-Box | 15,438 | CC0-1.0 | Shell | |
| Mailu | 7,551 | MIT | Docker, Python | |
| docker-mailserver | 19,511 | MIT | Docker | |
| Mox | 5,896 | MIT | Go | |
| Maddy Mail Server | 6,108 | GPL-3.0 | Go | |
| Modoboa | 3,542 | ISC | Python |
Why replace Gmail?
Gmail works, but your data lives in someone else's account, the price can change at any time, and features can disappear. An open-source app you run yourself is yours: you choose where it runs, who can see the data, and when to update.
Questions
What is the best free alternative to Gmail?
Mailcow is the closest open-source replacement for Gmail in our list. Stalwart Mail Server and Mail-in-a-Box are worth a look too, depending on what you need.
Can I self-host an alternative to Gmail?
Yes. All 8 apps on this page are open source and can run on your own server, usually with Docker, or on a managed host that installs them for you.