On this site, you will find a step-by-step guide on how to run the mail server Mailcow on CloudPanel.
The mail server Mailcow is a dockerized application that is addressed via Reverse Proxy.
Login via SSH as root and stop and disable the postfix service:
systemctl stop postfix && systemctl disable postfix
Login via SSH as root:
ssh root@instance-ip-address
curl -sSL https://get.docker.com/ | CHANNEL=stable sh && apt install docker-compose-plugin
Clone the Mailcow Git Repository to /opt/mailcow-dockerized:
git clone https://github.com/mailcow/mailcow-dockerized /opt/mailcow-dockerized
Initialize Mailcow by executing the generate_config.sh script:
cd /opt/mailcow-dockerized/ && ./generate_config.sh
Set the Mail server hostname (FQDN), e.g., mail.domain.com.
nano /opt/mailcow-dockerized/mailcow.conf
HTTP_PORT=7080 HTTP_BIND=127.0.0.1 HTTPS_PORT=7443 HTTPS_BIND=127.0.0.1
cd /opt/mailcow-dockerized/ && docker compose pull && docker compose up -d
Go to your Reverse Proxy and issue an SSL/TLS Certificate.
Done. You can now login https://mail.domain.com with the username admin and password moohoo.