Dev.to
7/24/2026

The original title is: "Reverse Proxy Your Containers with Caddy and Docker Compose on Ubuntu 26.04"
Original: Reverse Proxy Your Containers with Caddy and Docker Compose on Ubuntu 26.04
Short summary
A practical guide to setting up Caddy as a reverse proxy for Docker containers on Ubuntu 26.04. Key principles: run Caddy in the same Compose project as your apps on a shared Docker network, proxy to container names instead of localhost, and use real hostnames in the Caddyfile to trigger automatic HTTPS via Let's Encrypt. Includes a complete working docker-compose.yml and Caddyfile with tips on avoiding common pitfalls like file inode issues and certificate rate limits.
- •Run Caddy and apps on a shared Docker network; proxy to container names, not localhost
- •Real hostnames in Caddyfile trigger automatic HTTPS via Let's Encrypt
- •Includes complete docker-compose.yml and Caddyfile with staging endpoint tip for testing
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



