# Reverse proxy + LAN landing + automatic HTTPS (Let's Encrypt HTTP-01). # # Prerequisites: # 1. cloudflare-ddns points A records at this host's public IPv4 # 2. Router port-forwards WAN :80 and :443 → this host # 3. DNS-only (grey cloud) for names used here — orange-cloud breaks HTTP-01 to origin # 4. Domain is devopshomelab.com (Cloudflare zone). If you meant .org, change all hostnames. # # Email for ACME registration (set in compose): CADDY_EMAIL { email {$CADDY_EMAIL} } # --- HTTPS reverse proxies --------------------------------------------------- forgejo.devopshomelab.com { encode gzip reverse_proxy forgejo:3000 } jellyfin.devopshomelab.com { encode gzip reverse_proxy jellyfin:8096 } # Info page only — RustDesk clients use TCP/UDP 21115–21119, not this site rustdesk.devopshomelab.com { encode gzip header Content-Type "text/html; charset=utf-8" respond `RustDesk

RustDesk server

ID / rendezvous server: rustdesk.devopshomelab.com

Relay server: rustdesk.devopshomelab.com (port 21117)

In the RustDesk client: Network → ID server = hostname above. Paste the server public key from the host admin.

Open ports on the router/firewall: 21115–21119 TCP and 21116 UDP.

` 200 } www.devopshomelab.com { redir https://devopshomelab.com{uri} permanent } devopshomelab.com { encode gzip root * /srv file_server try_files {path} /index.html } # --- HTTP :80 (ACME + LAN IP landing) ---------------------------------------- :80 { @lan { host 192.168.8.123 localhost 127.0.0.1 } handle @lan { root * /srv encode gzip file_server try_files {path} /index.html } @acme_hosts { host devopshomelab.com www.devopshomelab.com forgejo.devopshomelab.com jellyfin.devopshomelab.com rustdesk.devopshomelab.com } handle @acme_hosts { redir https://{host}{uri} permanent } # Default: still serve the map (LAN hostname / other access) handle { root * /srv encode gzip file_server try_files {path} /index.html } }