Notes on self-hosting behind a tunnel
The shape of this setup, briefly:
- Origin — Caddy binds
127.0.0.1only and serves plain HTTP; it is not reachable from the LAN or the tailnet. - Edge —
cloudflaredholds outbound connections to Cloudflare; TLS terminates there, and HSTS is set at the edge. - Deploys — a self-hosted GitHub Actions runner on the Pi builds the site
and copies the output into the web root with
rsync.
The useful property is that nothing listens on the public internet. If the tunnel is down, the site is down, and the blast radius of a mistake is a directory of static files.