Proxy Mailcow behind Nginx Proxy Manager the easy way

Posted on Sat 14 September 2024 in Technical

A quick one as no-one seems to have written it down properly.
Mailcow (https://mailcow.email) is a dockerized mail system. By default it will run on port 80 and port 443 of an IP address, so it occupies the web addresses of, say, a cheap VM.
Nginx Proxy Manager (https://www.nginxproxymanager.com) is a dockerized way of managing an nginx proxy.
The theoretical right way of connecting the two is by bridging or sharing the docker networks, but a more straightforward way is connecitng the exposed ports on the VM IP address. Not localhost or 0.0.0.0 because they're in the docker network, the IP address of the VM. Annoying simple but not necessarilly obvious.