sitehelper.online
FAQ: Self-hosted HTTPS
← Back to FAQ overview
1) Is Caddy required for self-hosted HTTPS?
No. Caddy is the simplest option because it provisions and renews certificates automatically via ACME. You can use nginx + certbot or Traefik if you prefer, but Caddy gives the fastest first-run experience.
2) Why do I need ports 80 and 443 open?
Port 80 is used for ACME HTTP-01 or redirects, and 443 serves HTTPS clients. If 80 isn’t open, renewal and initial validation fail. If 443 isn’t open, clients can’t reach the site over TLS.
3) I get “permission denied” reading /var/www/...
Make sure the directory exists and the user running Caddy can read it. Use `mkdir -p /var/www/example.com && chown -R caddy:caddy /var/www/example.com`. If you use a systemd-managed Caddy, check `User=caddy` in the unit.
4) How do I validate my Caddyfile safely?
Run `caddy validate --config /etc/caddy/Caddyfile` before reloading. If validation fails, Caddy keeps serving the previous config on production; on first load with no previous config it won’t start.
5) My site returns 502 / Bad Gateway.
This means Caddy can’t reach the origin. Check that the upstream is up and reachable, the Host header is correct, and any origin TLS chain is trusted. Use `curl -I http://127.0.0.1:8080` to confirm the backend itself works.
6) Should I put Caddy behind another reverse proxy?
Avoid it unless required. Chaining proxies complicates H2, client IP, cert renewal, and timeouts. If you must, terminate TLS at the first proxy and pass clear traffic to Caddy on loopback with proper Host headers.