diff --git a/docs/reverse-proxy.md b/docs/reverse-proxy.md index 1c7e5804..faadeb92 100644 --- a/docs/reverse-proxy.md +++ b/docs/reverse-proxy.md @@ -98,3 +98,17 @@ spec: upgrade_configs: - upgrade_type: tailscale-control-protocol ``` + +## Caddy + +The following Caddyfile is all that is necessary to use Caddy as a reverse proxy for headscale, in combination with the `config.yaml` specifications above to disable headscale's built in TLS. Replace values as necessary - `` should be the FQDN at which headscale will be served, and `` should be the IP address and port where headscale is running. In most cases, this will be `localhost:8080`. + +``` + { + reverse_proxy +} +``` + +Caddy v2 will [automatically](https://caddyserver.com/docs/automatic-https) provision a certficate for your domain/subdomain, force HTTPS, and proxy websockets - no further configuration is necessary. + +For a slightly more complex configuration which utilizes Docker containers to manage Caddy, Headscale, and Headscale-UI, [Guru Computing's guide](https://blog.gurucomputing.com.au/smart-vpns-with-headscale/) is an excellent reference.