Self-host 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.
Key facts
Pick Mailcow when you want the full groupware suite — Postfix, Dovecot, Rspamd, SOGo webmail and CalDAV/CardDAV, MariaDB, Redis and optional ClamAV — behind one web UI that handles domains, mailboxes, DKIM, quarantine and imapsync migrations, and you have the hardware for it: the prerequisites page asks for 6 GiB of RAM plus 1 GiB of swap in the default configuration, with 8 GiB recommended for 5–10 users, and 20 GiB of disk before a single email. On a 2 GB VPS it is the wrong pick; Stalwart or docker-mailserver are.
Follow the Mailcow deploy guide →What you need
- Any VPS with at least 6144 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- About the better part of a day
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Mailcow — 18-container stack; admin UI at https://YOUR_HOST/admin
cd /opt && sudo git clone https://github.com/mailcow/mailcow-dockerized && cd mailcow-dockerized
sudo ./generate_config.sh # prompts for hostname + timezone
sudo docker compose pull && sudo docker compose up -dWhat you take on
Mailcow is GPL-3.0 and well documented, but it is the most demanding install in this hub and its docs are blunt about where it will not run:
An alternative to
Head-to-head
The complete admin-UI suite vs. the bare config-file container.
The full groupware suite vs. the lighter wizard-built mail stack.
One Rust binary vs. the full container suite.