Security Configuration in OpenClaw
From the OpenClaw cheat sheet ยท Security & Access ยท verified Jul 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
# Set gateway mode
openclaw config set gateway.mode "local"๐ก Set gateway.bind to "loopback" to only accept local connections
โก Use "openclaw doctor --generate-gateway-token" to create a secure random token
๐ Without dmPolicy: "allowlist", anyone who finds your bot can pair and get full access
๐ข For remote access, use Tailscale instead of exposing the gateway port directly