Skip to content

Self-host Mailu

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Jul 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A simple, full-stack mail server as a set of Docker images — SMTP/IMAP, webmail, antispam, and an admin panel generated by a setup wizard. A lighter, MIT-licensed self-hosted alternative to Google Workspace for personal and small-team email. As with any self-hosted mail, expect to manage deliverability (SPF, DKIM, DMARC, and reverse DNS) so your mail reaches inboxes.

Key facts

CategoryMail Server
LicenseMIT
StackPython, Shell
Min RAM1024 MB
Official imageyes
Difficulty
Our recommendation

Pick Mailu when you want a full mail stack with a web admin and optional webmail (Roundcube or SnappyMail) on far less hardware than Mailcow: the compose requirements are 1 GB of RAM plus 1 GB of swap without antivirus, 3 GB with ClamAV enabled. It is MIT-licensed and assembled by a web wizard at setup.mailu.io that writes your `docker-compose.yml` and `mailu.env` — which is also its quirk: the documented install path is the wizard, and every upgrade goes back through it.

Follow the Mailu deploy guide →

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • About the better part of a day
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# Mailu has no one-line install. First complete the wizard at
#   https://setup.mailu.io
# and copy the docker-compose.yml + mailu.env it generates into this
# directory — the commands below fail without them.
docker compose up -d
docker compose exec admin flask mailu admin me example.net 'CHANGE_ME'

What you take on

Mailu's requirements page is short and strict; the things that break installs are all on it:

non-negotiableThe host must not listen on ports 25, 80, 110, 143, 443, 465, 587, 993, 995 or 4190, and should have a public IP configured; upstream highly recommends a dedicated IP and hostname with matching forward and reverse DNS. The docs also say that if you switched the host to nftables you will have to roll back until Docker supports it.
non-negotiableRAM is 1 GB + 1 GB swap without antivirus, 3 GB + 1 GB swap with it; the wizard itself says ClamAV needs at least 1 GB just to load its signature database. Our 1 GB floor is the no-antivirus figure.
non-negotiableVersions are named Year.Month.Minor (the wizard currently offers 2024.06) and the release notes say you can only go forward — downgrades work only between minors of the same release. Upgrading means regenerating both files through setup.mailu.io and reading the Upgrading section first; master is the development branch.
non-negotiableBehind a reverse proxy the FAQ calls REAL_IP_HEADER and REAL_IP_FROM vital, and before enabling IPv6 you must disable Docker's userland-proxy or, in the docs' words, create an open relay.
non-negotiableAfter docker compose up -d there are no accounts: create the first admin with docker compose exec admin flask mailu admin me example.net 'password', then generate SPF, DKIM and DMARC from the domain's admin page and add them at your registrar.

An alternative to

Head-to-head

More self-hosted tools

Mail Server

docker-mailserver

A production-ready, config-driven mail server in a single container — Postfix, Dovecot, and a choice of Amavis/SpamAssassin or Rspamd antispam, with no database and no web UI, configured entirely from plain files. A lightweight, MIT-licensed self-hosted alternative to Google Workspace email. As with any self-hosted mail, expect to manage deliverability (SPF, DKIM, DMARC, and reverse DNS) so your mail reaches inboxes.
Shell
hardRead guide →
Mail Server

Mailcow

A full-featured, Docker-based mail server suite — Postfix, Dovecot, SOGo webmail, ActiveSync, antispam, and a polished admin UI — the popular self-hosted alternative to Google Workspace and Microsoft 365 for small teams. It is a heavier, multi-container stack: 6 GB of RAM is the minimum, 8 GB recommended. As with any self-hosted mail, expect to manage deliverability (SPF, DKIM, DMARC, and reverse DNS) so your mail reaches inboxes.
PHPShell
hardRead guide →
Mail Server

Stalwart

An all-in-one, self-hosted mail server written in Rust — SMTP, IMAP, JMAP, and CalDAV/CardDAV in a single binary with a built-in admin UI. The modern, low-footprint way to run your own email instead of Google Workspace or Microsoft 365.
Rust
hardRead guide →
ERP

ERPNext

ERPNext is a GPL-3.0 open-source ERP from Frappe covering accounting, order management and inventory, manufacturing, asset management and projects, built on the MIT-licensed Frappe Framework. There is no paid edition of the software — Frappe sells managed hosting (Frappe Cloud), not features. HR and payroll live in a separate GPL-3.0 app, Frappe HR. It self-hosts through the official frappe_docker stack: MariaDB, two Redis instances, the web backend, background workers, a scheduler and a websocket service.
PythonFrappe FrameworkMariaDBRedis
hardRead guide →

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.