How to Use Caddy and Docker Compose as a Reverse Proxy on Ubuntu 26.04
Running multiple Docker containers on random ports without HTTPS is a common pain point for self-hosters, and Caddy offers a streamlined solution. By placing Caddy and all app containers on a shared Docker network, Caddy can route traffic to each container using its service name rather than localhost or host ports. A Caddyfile entry with a real domain name automatically triggers Let's Encrypt certificate issuance and renewal via ACME, eliminating the need for manual Certbot configuration. Only Caddy needs to expose ports 80 and 443 to the host, keeping all backend containers private. Prerequisites include Ubuntu 26.04 with Docker installed, a domain with DNS pointing to the server, and ports 80 and 443 open and reachable from the internet.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in