Security Configuration in OpenClaw
From the OpenClaw cheat sheet · Security & Access · verified Nov 2026
Security Configuration
Secure your Gateway with auth, allowlists, and remote access
json5
# Set loopback binding (local only)
openclaw config set gateway.bind loopback
# Enable token auth
openclaw config set gateway.auth.mode token
# Generate a secure Gateway token
openclaw doctor --generate-gateway-token
# Audit the setup
openclaw security audit --deep💡 Set gateway.bind to "loopback" to only accept local connections; auth is required even then
⚡ Use "openclaw doctor --generate-gateway-token" to create a secure random token
📌 Unknown senders are ignored until you approve their pairing code; the risky setting is dmPolicy "open" with allowFrom ["*"]
🟢 For remote access, use Tailscale Serve or an SSH tunnel; never expose port 18789 to the public internet
Continue with OpenClaw
Save the full cheat sheet or work through every related task.