Putting an app behind Caddy stays reliable when the site address, public DNS name, and ACME challenge path agree before first issuance. I keep one edge process owning :80 and :443, leave HTTP-01 on the plain listener without sending that path into reverse_proxy, and give each public hostname its own site block so a failed renew for one name does not rewrite the whole Caddyfile. Upstream dial timeouts stay explicit, backends stay on private ports, and Host plus X-Forwarded-Proto are preserved so absolute links never use the internal compose name.
After a reload I confirm the leaf SANs cover every advertised host, that the first plain HTTP hit becomes one HTTPS redirect to the canonical name, and that connect failures versus slow upstream reads are clear in the access log. For WebSocket or long-lived admin routes I raise only those read timeouts and turn off response buffering there; a trailing-slash or Host rewrite bug after a Caddyfile edit often looks like an app regression until you probe a static path and an API path through the same public name separately.
Edge Ops
Putting an app behind Caddy stays reliable when the site address, public DNS name, and ACME challenge path agree before first issuance. I keep one edge process owning :80 and :443, leave HTTP-01 on the plain listener without sending that path into reverse_proxy, and give each public hostname its own site block so a failed renew for one name does not rewrite the whole Caddyfile. Upstream dial timeouts stay explicit, backends stay on private ports, and Host plus X-Forwarded-Proto are preserved so absolute links never use the internal compose name.
After a reload I confirm the leaf SANs cover every advertised host, that the first plain HTTP hit becomes one HTTPS redirect to the canonical name, and that connect failures versus slow upstream reads are clear in the access log. For WebSocket or long-lived admin routes I raise only those read timeouts and turn off response buffering there; a trailing-slash or Host rewrite bug after a Caddyfile edit often looks like an app regression until you probe a static path and an API path through the same public name separately.