Cant Load Domain?

Are you still getting your router’s web page when you type in your domain, or is it simply not loading (i.e. timeout)?

Caddy doesn’t care whether it’s run in Docker or on the host itself. The same Caddyfile applies. You just need to ensure that Docker has ports 80/443 forwarded to Caddy’s container (the exact same concept as applies to forwarding 80/443 from your router to your server).

The only things that might need adjusting are webroots if you have those in relatively different locations inside the container, and upstreams (you’ll need to point those at adjacent containers and/or the host since localhost etc won’t work; looks like you use 192.168 addresses for upstreams, though, so this should probably be fine).

1 Like