Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # You need Docker: https://pastebin.com/YTQNMvJw
- # For TLS support you need setup acme.sh: https://pastebin.com/VCVxg5uE (certbot is also possible, but you need Python for this! What i hate 😅)
- // To install
- mkdir /home/mailcow
- cd /home/mailcow
- git init
- git remote add origin https://github.com/mailcow/mailcow-dockerized.git
- git pull origin master
- bash generate_config.sh
- rm -r .* *.md LICENSE
- ln -s mailcow.conf .env
- chmod -R 777 .
- # Now remove automatic generated certs and copy your real certs
- # Replace MY_DOMAIN with your real domain
- rm -r data/assets/ssl/cert.pem
- rm -r data/assets/ssl/key.pem
- ## Apache, Nginx and co
- cp /etc/letsencrypt/live/MY_DOMAIN/cert.pem data/assets/ssl/cert.pem
- cp /etc/letsencrypt/live/MY_DOMAIN/privkey.pem data/assets/ssl/key.pem
- ## Caddy
- cp /root/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/MY_DOMAIN/MY_DOMAIN.crt data/assets/ssl/cert.pem
- cp /root/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/MY_DOMAIN/MY_DOMAIN.key data/assets/ssl/key.pem
- # Start Mailcow
- docker compose up -d
- // To restart services
- # If you need restart service (to restart Unbound*, for example), run this
- # Replace service_name with the real service name! Like nginx
- docker compose kill service_name-mailcow
- docker compose start service_name-mailcow
- docker compose kill sogo-mailcow
- docker compose start sogo-mailcow
- docker compose kill unbound-mailcow
- docker compose start unbound-mailcow
- // To uninstall
- cd /home/mailcow
- docker compose kill
- docker compose down --volume --rmi all
- rm -r .* *
- * = Unbound is responsible for the DNS check and action!
- Unbound checks the respective domains for their records and whether they are set correctly!
- However, sometimes one need to restart it to have the record check run again
Advertisement
Comments
-
- You are aware that mailcow has built-in letsencrypt support?
-
- Maybe, but perhaps one would prefer to deal with this externally
Add Comment
Please, Sign In to add comment
Advertisement