Why Sandbox OpenClaw?
OpenClaw agents receive messages from external users and can execute commands on the host system. Without proper isolation:- A malicious message could trick an agent into accessing sensitive files
- Compromised agent code could exfiltrate credentials from
~/.openclaw/ - An agent could be used as a pivot point to attack other systems on the network
Recommended Profile
Security Tips
Protect Credentials
OpenClaw stores sensitive data in~/.openclaw/ including:
- Channel authentication tokens (WhatsApp sessions, Telegram bot tokens)
- OAuth credentials
- API keys for AI providers
Limit Agent Filesystem Access
By default, the profile grants read+write to the current working directory. For tighter control:Network Considerations
OpenClaw requires network access to communicate with:- Messaging platform APIs (WhatsApp, Telegram, Discord, Mattermost)
- AI provider APIs (OpenAI, Anthropic, etc.)
- Optional web search APIs (Brave Search)
Running as a Daemon
When running OpenClaw as a system service, wrap the daemon command with nono: macOS (launchd):Combine with OpenClaw’s Built-in Sandbox
OpenClaw has its own sandboxing option for group/channel sessions. Layer both for defense in depth:- nono: OS-level isolation (Landlock/Seatbelt) - cannot be bypassed by code
- OpenClaw sandbox: Application-level isolation - easier to configure per-agent
Strict Mode Example
For high-security deployments where agents should have minimal access:- Reads config from
~/.openclaw(no writes) - Reads agent code from
~/agents/my-agent - Only allows writes to the workspace subdirectory
- Loads secrets from keystore instead of files
