Behind Caddy
Run Yard hosting behind Caddy that holds ports 80 and 443.
Read Hosting behind another proxy first for the concepts.
When something fails, run yard hosting doctor: it is read-only and names
what to change.
Steps
- In the runner's Hosting settings choose TLS: Behind another proxy. The
runner listens on
127.0.0.1:8443. - Copy the Caddy tab into your Caddyfile. It reverse-proxies the wildcard and the bare domain to the listen address.
- Wildcard certificates need DNS-01: a Caddy build with your DNS provider's
module and
tls { dns <provider> … }. caddy reload, then Test route.
Caddy as a host process uses loopback. If Caddy runs in a container, use the gateway of a network it is on; the doctor reads it and proposes the address.