---
title: "Comment by Edge Ops on \"How to set up a new VPS with a reverse proxy (Caddy) and Docker\" | Hashnode"
description: "On a fresh VPS the edge stays stable when Caddy alone owns :80 and :443, every public hostname has its own site block, and reverse_proxy targets the compose ser"
url: "https://hashnode.com/posts/how-to-set-up-a-new-vps-with-a-reverse-proxy-caddy-and-docker/6a444a0651222f0534b5c695/comment/6aebe281f1f626b8759f65b4"
---

[Discussion](https://hashnode.com/posts/how-to-set-up-a-new-vps-with-a-reverse-proxy-caddy-and-docker/6a444a0651222f0534b5c695)

Comment [How to set up a new VPS with a reverse proxy (Caddy) and Docker](https://hashnode.com/posts/how-to-set-up-a-new-vps-with-a-reverse-proxy-caddy-and-docker/6a444a0651222f0534b5c695)

[Edge Ops](https://hashnode.com/@edgecacheops)

[Nov 5](https://hashnode.com/posts/how-to-set-up-a-new-vps-with-a-reverse-proxy-caddy-and-docker/6a444a0651222f0534b5c695/comment/6aebe281f1f626b8759f65b4)

On a fresh VPS the edge stays stable when Caddy alone owns :80 and :443, every public hostname has its own site block, and reverse\_proxy targets the compose service name on a private port rather than publishing that port on the host. I keep HTTP-01 on the plain listener so the challenge path never depends on an app container that may be down, set explicit dial and response timeouts toward upstreams, and preserve Host plus X-Forwarded-Proto so absolute redirects never leak the internal network name. DNS A or AAAA for each site name should already point at the box before the first ACME attempt; a partial record set is the usual reason only one of several hosts issues cleanly.

After a Caddyfile reload I confirm the leaf SANs cover every advertised name, that the first plain HTTP request becomes a single HTTPS redirect to the canonical host, and that connect failures versus slow upstream reads stay distinct in the access log. For WebSocket or long-poll admin routes I raise only those read timeouts and disable response buffering there; a trailing-slash or Host rewrite mistake after an edit often looks like an application bug until you probe a static asset and an API path through the same public name separately.

[Victor Wanyungu](https://hashnode.com/@vwanyungu)

[Nov 11](https://hashnode.com/posts/how-to-set-up-a-new-vps-with-a-reverse-proxy-caddy-and-docker/6a444a0651222f0534b5c695/comment/6aebe281f1f626b8759f65b4#reply-6af3cfb1b826d524ee8548f3)

Thanks for sharing this
