Docker: Установка Mailcow

Редактировал(а) Алексей Александрович Иванов 2025/12/11 13:34

Debian/Ubuntu:
1. apt update apt install -y git openssl curl gawk coreutils grep jq

2. apt update apt install docker-compose-plugin

Installing mailcow

  1. Clone the repository:

    su
    

    umask 0022

    cd /opt

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

  2. Generate the configuration file:

    ./generate_config.sh
  3. Adjust the configuration if necessary:

     

    nano mailcow.conf

     

Starting mailcow

docker compose pull docker compose up -d

You can now access https://${MAILCOW_HOSTNAME}/admin using the default credentials admin and the password moohoo.

Перенос почтового хранилища

cd /opt/mailcow-dockerized
docker compose down

mkdir -p /mnt/vmail/vmail_data

rsync -aHAX --info=progress2 /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/ /mnt/vmail/vmail_data/

chown -R 5000:5000 /mnt/vmail/vmail_data
chmod -R 700 /mnt/vmail/vmail_data