OpenClaw is powerful because it can reach your messages, files and shell, and that is also why its defaults deserve attention. This checklist turns OpenClaw's own security documentation into eight plain-English steps, in order of impact. Settings and commands come from the OpenClaw docs as of November 2026; option names can change between releases, so check the gateway security docs for your version.
Your config lives at ~/.openclaw/openclaw.json. Before you start, run a baseline check:
openclaw doctor
openclaw security audit
openclaw health
The checklist at a glance
- Keep the gateway privateLeave gateway.bind on loopback and use Tailscale Serve or an SSH tunnel.
- Set a strong tokenUse a long random gateway token and never leave auth blank.
- Turn on the sandboxRun agents in Docker or Podman with minimal workspace access.
- Tighten exec and elevated toolsRequire approval for commands and keep elevated access off.
- Lock down messagingUse DM pairing or an allowlist, never open DMs.
- Vet and pin skillsTreat third-party skills as untrusted code.
- Limit what the machine can reachLow-privilege OS user, scoped API keys, mDNS minimal.
- Update and auditPatch promptly and re-run the deep audit after changes.
1. Keep the gateway private
The gateway listens on port 18789 by default. On a normal host, gateway.bind defaults to "loopback", which means only your own machine can connect. Inside a detected container the default is "auto", which resolves to 0.0.0.0 (all interfaces), so check this carefully if you use Docker.
For remote access, the network exposure docs recommend Tailscale Serve over binding to your LAN. An SSH tunnel also works. Avoid port-forwarding 18789 on your router and avoid public tunnels such as Tailscale Funnel for the gateway.
If you must use "lan", "tailnet" or "custom" binds, OpenClaw requires authentication and the docs say you also need a firewall. If you put the gateway behind a reverse proxy, set gateway.trustedProxies so it does not trust spoofed headers.
2. Set a strong gateway token
{ "gateway": { "auth": { "mode": "token", "token": "<long random value>" } } }
Generate the value with openclaw doctor --generate-gateway-token or openssl rand -hex 32. Password mode is also available via the OPENCLAW_GATEWAY_PASSWORD environment variable. openclaw security audit flags a blank token as critical and warns on tokens shorter than 24 characters. Rotate the token if it may have been seen by anyone else.
If you use Tailscale identity for auth, set gateway.auth.allowTailscale to false on any host where untrusted local code might run. Also avoid ["*"] in gateway.controlUi.allowedOrigins.
3. Turn on the sandbox
The sandbox is off by default in OpenClaw 2.0. Enable it under agents.defaults.sandbox with Docker or Podman. Per the tool permissions docs:
| Setting | Default | Safer choice |
|---|---|---|
| Sandbox mode | Off | On for all agents (mode: "all") |
scope |
"agent" |
"agent" or the stricter "session"; avoid "shared" |
workspaceAccess |
"none" |
Keep "none", or "ro" for read-only |
sandbox.docker.binds |
Denylist of dangerous paths | Mount only what the agent needs |
tools.fs.workspaceOnly |
Varies | Restrict file tools to the workspace |
As of November 2026. A read-only agent profile looks like sandbox: { mode: "all", scope: "agent", workspaceAccess: "ro" } combined with tool deny lists, set per agent under agents.entries.<id>. More detail is in OpenClaw sandbox and exec approvals.
4. Tighten exec approvals and elevated tools
The trusted-operator default (security="full" with ask="off") lets the agent run shell commands without asking. For most personal setups that is more than needed. Configure exec approvals so commands require your approval, and use gateway.nodes.commands.allow and deny lists to restrict what can run.
Keep elevated tools off unless you need them, and if you do, keep tools.elevated.allowFrom as tight as possible. If something goes wrong, the exposure runbook suggests a lockdown baseline of tools.exec: { security: "deny", ask: "always" } and tools.elevated.enabled: false.
5. Lock down messaging channels
Each channel has a DM policy: pairing, allowlist, open or disabled. Use pairing or an allowlist so only people you approve can message your agent, because anyone who can message it can attempt prompt injection. Never use open on an agent with tools.
Use a separate phone number for messaging channels. OpenClaw's WhatsApp channel uses the unofficial Baileys bridge, which breaks WhatsApp's terms and can get the number banned; our sister site covers OpenClaw messaging setup.
Use one gateway per trust boundary. The docs say OpenClaw "is not a hostile multi-tenant security boundary".
6. Vet and pin skills
The skills docs say to "Treat third-party skills as untrusted code. Read them before enabling." In practice:
- Install by owner-qualified name (
@owner/<slug>) and runopenclaw skills verify @owner/<slug>. - Check the VirusTotal, ClawScan and static-analysis results on the ClawHub page.
- Pin Git installs with
git:owner/repo@ref, ideally to a commit. - Consider a
security.installPolicyfor local install checks.
Background on why this matters is in malicious agent skills and ClawHavoc.
7. Limit what the machine can reach
- Run OpenClaw as a dedicated low-privilege OS user, not your main account or root.
- Use scoped API keys with spending limits for your model provider and other services.
- Set mDNS discovery to minimal or off (
discovery.mdns.mode: "minimal"or"off", orOPENCLAW_DISABLE_BONJOUR=1) so the gateway does not advertise itself on your network. - Give the agent only the connectors it needs. See least privilege for AI agents.
8. Update and audit
OpenClaw has published hundreds of security advisories, and fixes such as the patch for CVE-2026-25253 (one-click remote code execution) only help if you update. Re-run openclaw security audit --deep after every config change and every upgrade. Report vulnerabilities through a GitHub Security Advisory or security@openclaw.ai, per the security policy.
Bottom line
Most OpenClaw security incidents in 2026 came from exposure, weak auth, unvetted skills and permissive defaults, all of which this checklist addresses. Do steps 1 to 3 today, the rest this week, and re-audit after every change. Then confirm nothing is reachable from outside with our OpenClaw exposed gateway check. If this feels like more maintenance than you want, read is self-hosting an AI agent safe before going further.



