SH SelfHostAlt
Sponsored Self-host any open-source app on Hostinger KVM VPS from $4.99/mo (1-Click Docker) →
Mailcow logo

Mailcow

GPL-3.0 Docker Ready ★ 13,887 Stars Active · 2026-11-26

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

Category
Communication - Email - Complete Solutions
Tech Stack / Runtime
Docker/PHP
Open-Source License
GPL-3.0
GitHub Health
★ 13,887 · 1,881 forks
#mailcow#mailserver#groupware#sogo#rspamd
Official docker-compose.yml

Quick Docker Compose Reference for Mailcow

# Version of the database schema
x-db-version: &db_version DB_VERSION=02112026_1600

services:

    unbound-mailcow:
      image: ghcr.io/mailcow/unbound:1.26.2-1
      environment:
        - TZ=${TZ}
        - SKIP_UNBOUND_HEALTHCHECK=${SKIP_UNBOUND_HEALTHCHECK:-n}
      volumes:
        - ./data/hooks/unbound:/hooks:Z
        - ./data/conf/unbound/unbound.conf:/etc/unbound/unbound.conf:ro,Z
      restart: always
      tty: true
      networks:
        mailcow-network:
          ipv4_address: ${IPV4_NETWORK:-172.22.1}.254
          aliases:
            - unbound

    mysql-mailcow:
      image: mariadb:10.11
      depends_on:
        - unbound-mailcow
        - netfilter-mailcow
      stop_grace_period: 45s
      volumes:
        - mysql-vol-1:/var/lib/mysql/
        - mysql-socket-vol-1:/var/run/mysqld/:z
        - ./data/conf/mysql/:/etc/mysql/conf.d/:ro,Z
      environment:
        - TZ=${TZ}
        - MYSQL_ROOT_PASSWORD=${DBROOT}
        - MYSQL_DATABASE=${DBNAME}
        - MYSQL_USER=${DBUSER}
        - MYSQL_PASSWORD=${DBPASS}
        - MYSQL_INITDB_SKIP_TZINFO=1
      restart: always
      ports:
        - "${SQL_PORT:-127.0.0.1:13306}:3306"
      networks:
        mailcow-network:
          aliases:
            - mysql

    redis-mailcow:
      image: redis:7.4.12-alpine
      entrypoint: ["/bin/sh","/redis-conf.sh"]
      volumes:
        - redis-vol-1:/data/
        - ./data/conf/redis/redis-conf.sh:/redis-conf.sh:z
      restart: always
      depends_on:
        - netfilter-mailcow
      ports:
        - "${REDIS_PORT:-127.0.0.1:7654}:6379"
      environment:
        - TZ=${TZ}
        - REDISPASS=${REDISPASS}
        - REDISMASTERPASS=${REDISMASTERPASS:-}
      sysctls:
        - net.core.somaxconn=4096
      networks:
        mailcow-network:
          ipv4_address: ${IPV4_NETWORK:-172.22.1}.249
          aliases:
            - redis

    clamd-mailcow:
      image: ghcr.io/mailcow/clamd:1.4.7-1
      restart: always
      depends_on:
        unbound-mailcow:
          condition: service_healthy
      dns:
        - ${IPV4_NETWORK:-172.22.1}.254
      environment:
        - TZ=${TZ}
        - SKIP_CLAMD=${SKIP_CLAMD:-n}
      volumes:
        - ./data/conf/clamav/:/etc/clamav/:Z
        - clamd-db-vol-1:/var/lib/clamav
      networks:
        mailcow-network:
# ... (see full file in official GitHub repository)

Mailcow System Requirements & Self-Hosting Guide

Deploy Mailcow (4 GB+ RAM) →

Recommended VPS

4 GB+ RAM

2 – 4 vCPU · $6 – $12/mo VPS

Deployment Method

Intermediate

Docker / Docker Compose (Recommended)

Commercial Use (GPL-3.0)

Yes — free to self-host commercially for your team without per-seat fees.

Maintenance Status

Active

Last commit: 2026-11-26

Frequently Asked Questions about Mailcow

Is Mailcow free to self-host for commercial use?

Mailcow is released under the GPL-3.0 license. Yes — free to self-host commercially for your team without per-seat fees. It has 13,887 GitHub stars and was last updated on 2026-11-26.

What VPS specifications do I need to self-host Mailcow?

Based on its Docker/PHP runtime and Communication - Email - Complete Solutions workload, we recommend at least 4 GB+ RAM and 2 – 4 vCPU (typically $6 – $12/mo VPS).

Does Mailcow support Docker deployment?

Yes — Mailcow supports Docker / Docker Compose (Recommended), making it intermediate to spin up on any Linux VPS.

More Open-Source Communication - Email - Complete Solutions

View all →
★ 19.8k Docker

Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container. Only configuration files, no SQL database. ).

MIT Docker
Details →
★ 17k Docker

Complete and fully featured mail server for use by websites & web servers. .

Replaces: Mailchimp SendGrid
MIT Docker/Ruby
Details →
★ 16.5k Docker

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

Replaces: SendGrid Google Workspace Mail
AGPL-3.0 Rust/Docker
Details →
★ 7.6k Docker

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

Replaces: SendGrid Google Workspace Mail
MIT Docker/Python
Details →
★ 7.2k Docker

Email alias solution to protect your email address. Comes with browser extensions and mobile apps. .

MIT Docker/Python
Details →