Reverse Proxy & TLS
Never expose port 3080 directly to the public internet over plain HTTP. Keep GatherGate bound to 127.0.0.1:3080 and terminate TLS at a reverse proxy.
Required GatherGate Settings
Section titled “Required GatherGate Settings”Set these two variables in .env whenever GatherGate sits behind a reverse proxy:
BASE_URL=https://intake.yourfirm.com.auTRUST_PROXY=trueBASE_URLstarting withhttps://instructs GatherGate to markgg_sessionand client OTP cookiesSecureand generate HTTPS magic links.TRUST_PROXY=trueallows per-IP rate limiting on/api/login, OTP, and uploads to inspect the client IP forwarded by your proxy.
Proxy Configurations
Section titled “Proxy Configurations”Caddy provisions and renews Let’s Encrypt TLS certificates automatically:
intake.yourfirm.com.au { request_body { max_size 64MB } reverse_proxy 127.0.0.1:3080}Ensure client_max_body_size is at least 60m so GatherGate’s 50 MB per-upload limit is not cut off by Nginx’s default 1 MB cap:
server { listen 443 ssl http2; server_name intake.yourfirm.com.au;
ssl_certificate /etc/letsencrypt/live/intake.yourfirm.com.au/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/intake.yourfirm.com.au/privkey.pem;
client_max_body_size 64m;
location / { proxy_pass http://127.0.0.1:3080; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 120s; }}Cloudflare Tunnel (cloudflared) exposes 127.0.0.1:3080 without opening inbound firewall ports:
tunnel: <your-tunnel-id>credentials-file: /etc/cloudflared/<your-tunnel-id>.json
ingress: - hostname: intake.yourfirm.com.au service: http://127.0.0.1:3080 - service: http_status:404Remember to set BASE_URL=https://intake.yourfirm.com.au and TRUST_PROXY=true in GatherGate’s .env.
Post-Proxy Checklist
Section titled “Post-Proxy Checklist”- Verify
https://intake.yourfirm.com.au/healthzreturns200 OK. - Open DevTools > Application > Cookies after signing in and confirm
gg_sessionhasHttpOnly,Secure, andSameSite=Lax. - Upload a multi-megabyte PDF to confirm your proxy body size limit allows files up to 50 MB.