Skip to content
appsgit

7 self-hosted options

Open-source alternatives to Gmail

The best open-source alternative to Gmail is docker-mailserver (MIT, 19,681 GitHub stars, Docker image). Mail-in-a-Box stands out for a permissive CC0-1.0 license, and Stalwart Mail Server stands out for the most commits in the last 12 months (715).

About Gmail: Google's email service with web and mobile apps.

Updated · data from GitHub, refreshed daily

At a glance

Gmail alternatives compared

Open-source apps come first, then source-available ones and apps whose license appsgit could not verify; within each group, projects with at least 12 commits in the last 12 months come before less active or archived ones, then by GitHub stars.

Gmail alternatives compared, data as of 2026-10-26
AppStands out forLicenseGitHub starsCommits (12 mo)Last commitDocker image
docker-mailserverthe most GitHub starsMIT19,681121Oct 25, 2026Yes
Mail-in-a-Boxa permissive CC0-1.0 licenseCC0-1.015,45023Oct 22, 2026No
Stalwart Mail Serverthe most commits in the last 12 months (715)AGPL-3.015,298715Oct 20, 2026Yes
Mailcowits JavaScript codebaseGPL-3.013,696354Oct 25, 2026Yes
Mailua permissive MIT licenseMIT7,592259Oct 25, 2026Yes
Roundcube–GPL-3.07,242315Oct 25, 2026No
SnappyMail–AGPL-3.01,71788Oct 24, 2026No

Full list

All 7 Gmail alternatives

Open any app for live stats, license details and a deploy option.

  1. 1

    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.

    Stands out for the most GitHub stars. docker-mailserver has 19,681 GitHub stars, uses the MIT license, ships a Docker image and had 121 commits in the last year.

  2. 2

    Mail-in-a-Box

    Turns any Ubuntu server into a fully functional mail server with one command.

    Stands out for a permissive CC0-1.0 license. Mail-in-a-Box has 15,450 GitHub stars, uses the CC0-1.0 license and had 23 commits in the last year.

  3. 3

    Stalwart Mail Server

    All-in-one mail server with JMAP, IMAP4, and SMTP support and a wide range of modern features.

    Stands out for the most commits in the last 12 months (715). Stalwart Mail Server has 15,298 GitHub stars, uses the AGPL-3.0 license, ships a Docker image and had 715 commits in the last year.

  4. 4

    Mailcow

    Mail server suite based on Dovecot, Postfix and other open source software, that provides a modern Web UI for administration.

    Stands out for its JavaScript codebase. Mailcow has 13,696 GitHub stars, uses the GPL-3.0 license, ships a Docker image and had 354 commits in the last year.

  5. 5

    Mailu

    Simple yet full-featured mail server as a set of Docker images.

    Stands out for a permissive MIT license. Mailu has 7,592 GitHub stars, uses the MIT license, ships a Docker image and had 259 commits in the last year.

  6. 6

    Roundcube

    Browser-based IMAP client with an application-like user interface.

    Roundcube has 7,242 GitHub stars, uses the GPL-3.0 license and had 315 commits in the last year.

  7. 7

    SnappyMail

    Simple, modern, lightweight & fast web-based email client (fork of RainLoop).

    SnappyMail has 1,717 GitHub stars, uses the AGPL-3.0 license and had 88 commits in the last year.

FAQ

Gmail alternatives: FAQ

Still curious? Email info@appsgit.com.

Is there a free alternative to Gmail?

Yes. All 7 apps on this page are open source and free to self-host, so you can replace Gmail without per-user fees. You pay only for the server.

Can I self-host an alternative to Gmail with Docker?

Yes. 4 of the 7 apps here publish a Docker image, including docker-mailserver, Stalwart Mail Server and Mailcow, so you can run them on a home server or VPS with Docker Compose.

Which Gmail alternative is the most actively developed?

Stalwart Mail Server (AGPL-3.0), with 715 commits in the last 12 months. Activity is a good sign that bugs and security issues get fixed.

How is this list ranked?

Open-source apps come first, then source-available ones and apps whose license appsgit could not verify; within each group, projects with at least 12 commits in the last 12 months come before less active or archived ones, then by GitHub stars.