This checklist builds off my writeup here.
This version is designed to improve security in minutes.
The more in-depth version is here.
Do not run npm start until you have verified these configurations. This checklist maps directly to OpenClaw’s documented security features and standard container hardening practices.
1. Configuration Hardening (openclaw.json)
-
[ ] Enable Sandboxing: Ensure your configuration explicitly sets
sandbox_mode: true. This restricts the agent's ability to execute arbitrary system binaries outside of its designated workspace. -
[ ] Strict DM Policy: In your
config.yamloropenclaw.json, set yourdm_policytoallowlist(neverpublicoropen). Explicitly list only your specific User ID for Telegram/Discord/Slack. -
[ ] Disable "Heartbeat" by Default: Unless you have a specific need for proactive behavior (the agent waking up on its own), disable the
heartbeator "autonomous loop" feature to prevent recursive spending loops or unprompted actions.
2. Infrastructure & Docker Flags
If you must use Docker (though a VM is safer), you must restrict the container's privileges.
-
[ ] Drop Capabilities: Run the container with
--cap-drop=ALL. Only add back specifically required capabilities (e.g.,NET_BIND_SERVICEif it needs to serve a webhook). -
[ ] Read-Only Root: Use the
--read-onlyflag for the container’s file system. Mount a specific, writable volume only for the agent’sworkspace/directory. -
[ ] No New Privileges: Always use
--security-opt=no-new-privilegesto prevent the agent from escalating its own permissions viasetuidbinaries.
3. MCP (Model Context Protocol) Hygiene
OpenClaw uses MCP to connect to tools. This is your primary attack surface.
-
[ ] Tool Allow-listing: Do not install the "default" skill bundle. Audit your
mcp_serverconfiguration and enable only the specific tools required for the task (e.g.,filesystem:read,browser:navigate). -
[ ] Block Dangerous Tools: Explicitly ensure the agent does not have access to
filesystem:writeon root directories orshell:executeunless absolutely necessary for a contained coding task.
4. Network & Identity
-
[ ] Gateway Authentication: Ensure
gateway.auth.tokenis set to a strong, high-entropy string. Never expose the control port (default3000or8080) to the public internet; tunnel it vialocalhostor a VPN (Tailscale/WireGuard). -
[ ] Burner Keys Only: In your
.envfile, ensureOPENAI_API_KEYandANTHROPIC_API_KEYare unique to this instance and have hard spend limits ($50/mo) set in the provider's console.