CloudLinux.ro
Email

How to install a full mail server with Mailcow

Updated 7/20/2026

Mailcow packages everything you need for email (Postfix, Dovecot, Rspamd, webmail) into Docker containers, with a simple admin interface.

Requirements

  • A server with at least 6 GB RAM.
  • Docker installed, see getting started with Docker.
  • A subdomain, for example mail.example.com, with an A record.

1. Download Mailcow

cd /opt
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized
./generate_config.sh

When prompted, enter the hostname: mail.example.com.

2. Start

docker compose pull
docker compose up -d

3. Configure DNS

Mailcow shows you in the interface exactly which records to add: MX, SPF, DKIM, DMARC. See also the SPF, DKIM and DMARC guide.

4. Reverse DNS

Request the PTR for the server IP to point to mail.example.com, see reverse DNS.

5. Enter the panel

Go to https://mail.example.com, create the domains and mailboxes. Do not forget a backup for the Docker volumes.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials