built with claude referral only running on claude + openclaw
← BACK TO THE BLOG

// BLOG

SETTING UP OPENCLAW SAFELY

agent → [ sandbox ] → your files

THE AGENT, SANDBOXED

A chatbot talks. An agent acts. That's the whole shift OpenClaw represents, and it's why "just install it and go" is the wrong instinct. Once you give something the ability to read your files, run commands, browse the web, and message people on your behalf, you've handed it real power. Real power needs real guardrails.

This isn't a fear piece. OpenClaw is genuinely useful, and it's part of how I run this business now. But there's a real gap between "it works" and "it's set up safely," and most setup guides skip straight past the second part.

The default is more open than you'd think

Out of the box, OpenClaw can execute almost any command with your full user permissions. No restrictions, no approval prompts, no walls by default. That's fine for a five-minute demo and genuinely risky for anything you'd actually rely on. If an agent gets fed a bad instruction, whether through a sketchy email, a compromised webpage, or anything else it reads, it can act on that instruction with the same access you have.

This isn't speculation. It's stated directly in OpenClaw's own documentation: tools run on the host for the main session unless you configure sandboxing. In other words, sandboxing isn't on by default. You have to turn it on.

The one setting that matters most: sandboxing

Think of a sandbox as a walled-off room the agent operates inside. It can still get its work done, but if something goes wrong, the damage stays inside the walls instead of spreading to your whole computer. Turning sandboxing on is the single highest-leverage thing you can do before anything else.

Start restrictive, expand slowly

Don't try to lock everything down perfectly on day one, and don't hand over full access on day one either. A staged approach works better in practice:

  • At first: read-only. Let it look at things, summarize, and suggest, but nothing that changes anything yet.
  • Once you trust it: writes require your approval first, every time.
  • Later: let it handle low-risk, repetitive actions on its own, and check in with a summary.

If something feels off at any stage, drop back a level and figure out why before moving forward again.

A short, practical checklist

  1. Turn sandboxing on before you do anything else.
  2. Explicitly block the folders that actually matter, such as SSH keys, password stores, and credential files. Don't assume they're protected by default.
  3. Restrict what it's allowed to talk to online. An allowlist of known destinations beats leaving the whole internet open.
  4. Require your approval for anything destructive, such as deleting files, running scripts you didn't write, or anything with "delete" or "install this script" energy.
  5. Keep a log. If something unexpected happens, you want to be able to see exactly what it did and when.
  6. If you connect messaging channels (Slack, Discord, WhatsApp, etc.), don't leave pairing on autopilot. OpenClaw requires unknown senders to be paired and approved before they can reach your agent. Don't approve a pairing request you don't recognize, even if it looks routine.
  7. If your setup includes a built-in security check, run it. Most people skip this step entirely.
REAL COMMANDS, FROM OPENCLAW'S OFFICIAL DOCS, NOT INVENTED
# install curl -fsSL https://openclaw.ai/install.sh | bash # check the gateway is actually running openclaw gateway status # approve a pairing request, only for senders you recognize openclaw pairing approve <channel> <code>

Sourced from OpenClaw's official GitHub repo (github.com/openclaw/openclaw). The exact output you'll see when running these will vary by version. This shows the commands themselves, not a simulated result.

One thing that trips people up

If a tool that used to work suddenly stops, like the agent silently failing at a web search it could do a minute ago, it's usually not broken. Sandboxed agents often have permissions set in more than one place at once (the agent's own settings, and the sandbox's separate settings), and both have to agree before something's allowed. If in doubt, check both layers, not just one.

Exact settings and command syntax vary by version. Always check OpenClaw's current official docs for the specifics. This post covers the concepts that don't change version to version.

None of this is complicated once you've done it once. But if it feels like more setup than you want to own yourself, figuring out sandbox configs, permission layers, and what to allow and what to block, that's genuinely the kind of work I do. This site runs on the same tools this post is about.

GET IN TOUCH →