Quick Start
openclaw profile provides:
- Read-only access to the current working directory (Node.js requires this at startup)
- Read+write access to
~/.openclawand~/.config/openclaw(agent config and state) - Read+write access to
~/.local(OpenClaw data/state) - Read+write access to
$TMPDIR/openclaw-$UID(temporary files) - Network access enabled (required for messaging APIs)
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
nono has already proven capable of stopping some nasty reported CVEs from exploiting live systems, as its protections are impossible to overide
Custom Profile
If you need different permissions, create a custom profile at~/.config/nono/profiles/openclaw-strict.json:
Custom profiles override pack profiles of the same name. If you create
~/.config/nono/profiles/openclaw.json, it will be used instead of the pack-provided 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
$TELEGRAM_BOT_TOKEN and $OPENAI_API_KEY environment variables. OpenClaw reads these automatically.
Secrets are loaded before the sandbox is applied, then zeroized from nono’s memory after
exec(). The sandboxed process cannot access the keystore directly - it only receives the specific secrets you authorized.Limit Agent Filesystem Access
The profile grants access to OpenClaw’s config directories. To also grant access to a project directory: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)
Credential Injection (Recommended)
Instead of passing API keys directly to OpenClaw, use nono’s credential injection to keep secrets out of the agent’s memory entirely. Step 1: Store your API key in the system keyring- macOS
- Linux
*_BASE_URL environment variables, so you need to configure each provider’s baseUrl directly.
Provider settings can be configured in two locations:
- Global:
~/.openclaw/openclaw.json- applies to all agents - Per-agent:
~/.openclaw/agents/<agentId>/agent/models.json- overrides global for that agent
models.providers section with the proxy baseUrl:
- Google Gemini
- OpenAI
- Anthropic
baseUrl must include /v1beta because the SDK appends paths like /models/gemini-2.5-flash:streamGenerateContent directly.~/.openclaw/agents/main/agent/auth-profiles.json and ensure each profile uses envVar instead of a hardcoded key:
- Google Gemini
- OpenAI
- Anthropic
- Real API keys are stored in your system keyring (never in files)
- nono starts a proxy on port 19999 and sets provider-specific API key environment variables (e.g.,
GEMINI_API_KEY,OPENAI_API_KEY) to a session-specific phantom token - OpenClaw reads the phantom token and sends requests to the configured
baseUrl(e.g.,http://127.0.0.1:19999/gemini/v1beta) - The proxy validates the phantom token, swaps in the real API key, and forwards the request to the provider’s API
- The real API key never enters the sandboxed process
Server Apps and Port Binding
OpenClaw Gateway listens on a WebSocket port (default 18789) to accept connections from UI clients and nodes. In proxy mode, you must explicitly allow this with--listen-port:
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
$TELEGRAM_BOT_TOKENand$OPENAI_API_KEYfrom the system keystore
Already Using Containers?
If you’re running OpenClaw in Docker or Podman, you already have solid isolation. Containers provide process isolation, resource limits, and filesystem separation that protect your host system. That said, there are tradeoffs to consider:
When containers make more sense:
- You need CPU/memory limits to prevent runaway agents
- You want a reproducible environment across machines
- You’re already using container orchestration (Kubernetes, etc.)
- You need fast startup for interactive use
- You want to work directly on host files without volume mount complexity
- You want automatic credential protection without manual configuration
- You want protection from destructive commands like
rm -rf,dd, andchmod