Mailcow "variable is not set" troubleshooting

I faced issue after running the update. I am using docker compose installation method with modifications of volumes so all stays in root folder of Mailcow instead of using docker volumes for sake of easing of backups.

I messed the docker-compose.yml file after update and needed to roolback. So I loaded backup, pruned docker (docker system prune -a) and started over. During docker compose up -d I faced errors that lot of environmental variables were not set so Mailcow used default.

I found that there was missing link between .env a mailcow.cong file. So solution was to run

docker compose down 
ln -s mailcow.conf .env #It made the link again
docker compose up -d

You might need to run docker system prune -a (run carefully, only if you know) to prune stuff which block containers for startup.

My approach with volumes mapped

You shall update Mailcow by running ./update.sh should you use docker compose installation method . That will also update your docker-compose.yml. I do want to keep data except cache saved under root directory of my compose stack (for sake of backup as I wrote above) so I am rewriting volumes which is originally docker volumes (persistent) to be mapped to folder. That has to be rechecked every update before running stack up. Always do the a backup prior updated.

Subscribe to Lipown's thoughs

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe