curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Worried it'll affect your machine? ClawTank — cloud deploy in 60s, zero risk to your files.
Running OpenClaw behind a reverse proxy gives you HTTPS, custom domains, and the ability to run multiple services on one server. Here's how to set it up correctly with Caddy, Nginx, or Traefik.
Why Use a Reverse Proxy?
HTTPS with auto-TLS: Free SSL certificates via Let's Encrypt
Custom domain: Access OpenClaw at openclaw.yourdomain.com
Security: Hide the gateway port from the public internet
Multi-service: Run OpenClaw alongside other apps on the same server
The Trusted Proxies Setting
This is the most important step. Without it, OpenClaw can't tell the difference between a real local connection and a spoofed one.
openclaw config set gateway.trustedProxies '["127.0.0.1"]'
If you skip this, you'll see:
WARN gateway.trusted_proxies_missing
Reverse proxy headers are not trusted.
And OpenClaw's local-client checks won't work properly through the proxy.
What trustedProxies Does
When a request comes through a reverse proxy, the original client IP is lost. The proxy adds it back via X-Forwarded-For headers. But OpenClaw only trusts these headers from IPs in the trustedProxies list.
Without it:
OpenClaw sees all requests as coming from 127.0.0.1 (the proxy)
It can't enforce per-client access controls
The security audit will flag trusted_proxies_missing
Caddy Setup
Caddy is the easiest option — automatic HTTPS, minimal config.
Deploy your own AI assistant
ClawTank deploys OpenClaw for you — no servers, no Docker, no SSH. Free 14-day trial included.
Type: A
Name: openclaw (or subdomain of choice)
Value: YOUR_SERVER_IP
TTL: 300
Cloudflare users: If using Cloudflare's free plan with a wildcard subdomain, set the DNS record to DNS only (grey cloud), not Proxied (orange cloud). Cloudflare's free plan doesn't support proxied wildcard DNS records.
Security Audit
After setting up the proxy, run OpenClaw's security audit:
openclaw security audit
You should see:
OK gateway.trusted_proxies — reverse proxy headers are trusted
For a deeper analysis:
openclaw security audit --deep
This checks:
Trusted proxy configuration
Attack surface (open ports, enabled tools)
Webhook security
Browser control settings
Troubleshooting
"trusted_proxies_missing" Warning
openclaw config set gateway.trustedProxies '["127.0.0.1"]'
openclaw restart
Dashboard Loads But Can't Connect
WebSocket connections need special proxy config. Make sure your proxy passes Upgrade and Connection headers.
Certificate Errors
DNS must point to your server before requesting a cert
Port 80 must be open for HTTP-01 challenge (Let's Encrypt)
Cloudflare proxy must be disabled during initial cert issuance
502 Bad Gateway
OpenClaw isn't running or isn't on the expected port:
openclaw status
openclaw config get gateway.port
Pre-Configured Proxy
ClawTank handles reverse proxy, TLS certificates, and subdomain routing automatically. Each instance gets its own HTTPS subdomain — no proxy configuration needed.
Enjoyed this article?
Get notified when we publish new guides and tutorials.