Serve the site through a Cloudflare tunnel
A cloudflared container dials out to Cloudflare and forwards the site's hostnames to nginx on :443, so the router's 80/443 forwards can close. nginx takes the visitor's address from CF-Connecting-IP, trusted only from cloudflared's fixed IP, so rate limits stay per visitor. certbot can now validate over DNS-01 through the Cloudflare API when CLOUDFLARE_DNS_API_TOKEN is set, so renewal needs no inbound port; without it, it falls back to the webroot as before. DEPLOYMENT.md covers setup and what stays off the tunnel: registry traffic on the Pi (pin the apex to 127.0.0.1 to dodge the 100 MB body cap), Gitea SSH and the radio harbor (Tailscale). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
{"name": "SILVERBULLET_GIT_INTERVAL", "group": "Backend", "purpose": "Seconds between notes commit/push cycles (default 300)", "kind": "number", "editable": true, "services": ["silverbullet-git"]},
|
||||
|
||||
{"name": "DOMAIN", "group": "Infrastructure", "purpose": "Apex domain: TLS certificate, cookie domain, nginx server name", "kind": "text", "editable": false, "lockedReason": "Changing the domain needs a new certificate and a full restart."},
|
||||
{"name": "CLOUDFLARE_TUNNEL_TOKEN", "group": "Infrastructure", "purpose": "Cloudflare Tunnel the cloudflared container connects (hostnames are set in the Cloudflare dashboard)", "kind": "secret", "editable": true, "services": ["cloudflared"], "docsUrl": "https://one.dash.cloudflare.com/", "warning": "A wrong token takes the site offline for anyone reaching it through Cloudflare."},
|
||||
{"name": "CLOUDFLARE_DNS_API_TOKEN", "group": "Infrastructure", "purpose": "Lets certbot renew the TLS certificate over DNS instead of port 80 (Cloudflare API token, Zone: DNS: Edit). Blank uses the port-80 method", "kind": "secret", "editable": true, "services": ["certbot"], "docsUrl": "https://dash.cloudflare.com/profile/api-tokens"},
|
||||
{"name": "EMAIL", "group": "Infrastructure", "purpose": "Let's Encrypt account address", "kind": "text", "editable": false, "lockedReason": "Only read by certbot when it registers the account."},
|
||||
{"name": "OBSIDIAN_DIR", "group": "Infrastructure", "purpose": "Host path of the notes vault", "kind": "text", "editable": false, "lockedReason": "A bind-mount path: a wrong value stops the stack from starting."},
|
||||
{"name": "SEED_DB", "group": "Infrastructure", "purpose": "Development-only test data switch", "kind": "bool", "editable": false, "lockedReason": "Would inject test data into the live site."},
|
||||
|
||||
Reference in New Issue
Block a user