Skip to content

Commit a292cbf

Browse files
committed
docs: clarify optional Docker sandboxing
1 parent 434e3d8 commit a292cbf

10 files changed

Lines changed: 28 additions & 22 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ Run `openclaw doctor` to surface risky/misconfigured DM policies.
157157
## Security model (important)
158158

159159
- Default: tools run on the host for the `main` session, so the agent has full access when it is just you.
160-
- Group/channel safety: set `agents.defaults.sandbox.mode: "non-main"` to run non-`main` sessions inside per-session Docker sandboxes.
160+
- Group/channel safety: set `agents.defaults.sandbox.mode: "non-main"` to run non-`main` sessions inside sandboxes. Docker is the default sandbox backend; SSH and OpenShell backends are also available.
161161
- Typical sandbox default: allow `bash`, `process`, `read`, `write`, `edit`, `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`; deny `browser`, `canvas`, `nodes`, `cron`, `discord`, `gateway`.
162-
- Before exposing anything remotely, read [Security](https://docs.openclaw.ai/gateway/security), [Docker sandboxing](https://docs.openclaw.ai/install/docker), and [Configuration](https://docs.openclaw.ai/gateway/configuration).
162+
- Before exposing anything remotely, read [Security](https://docs.openclaw.ai/gateway/security), [Sandboxing](https://docs.openclaw.ai/gateway/sandboxing), and [Configuration](https://docs.openclaw.ai/gateway/configuration).
163163

164164
## Operator quick refs
165165

@@ -173,7 +173,7 @@ Run `openclaw doctor` to surface risky/misconfigured DM policies.
173173
- New here: [Getting started](https://docs.openclaw.ai/start/getting-started), [Onboarding](https://docs.openclaw.ai/start/wizard), [Updating](https://docs.openclaw.ai/install/updating)
174174
- Channel setup: [Channels index](https://docs.openclaw.ai/channels), [WhatsApp](https://docs.openclaw.ai/channels/whatsapp), [Telegram](https://docs.openclaw.ai/channels/telegram), [Discord](https://docs.openclaw.ai/channels/discord), [Slack](https://docs.openclaw.ai/channels/slack)
175175
- Apps + nodes: [macOS](https://docs.openclaw.ai/platforms/macos), [iOS](https://docs.openclaw.ai/platforms/ios), [Android](https://docs.openclaw.ai/platforms/android), [Nodes](https://docs.openclaw.ai/nodes)
176-
- Config + security: [Configuration](https://docs.openclaw.ai/gateway/configuration), [Security](https://docs.openclaw.ai/gateway/security), [Docker sandboxing](https://docs.openclaw.ai/install/docker)
176+
- Config + security: [Configuration](https://docs.openclaw.ai/gateway/configuration), [Security](https://docs.openclaw.ai/gateway/security), [Sandboxing](https://docs.openclaw.ai/gateway/sandboxing)
177177
- Remote + web: [Gateway](https://docs.openclaw.ai/gateway), [Remote access](https://docs.openclaw.ai/gateway/remote), [Tailscale](https://docs.openclaw.ai/gateway/tailscale), [Web surfaces](https://docs.openclaw.ai/web)
178178
- Tools + automation: [Tools](https://docs.openclaw.ai/tools), [Skills](https://docs.openclaw.ai/tools/skills), [Cron jobs](https://docs.openclaw.ai/automation/cron-jobs), [Webhooks](https://docs.openclaw.ai/automation/webhook), [Gmail Pub/Sub](https://docs.openclaw.ai/automation/gmail-pubsub)
179179
- Internals: [Architecture](https://docs.openclaw.ai/concepts/architecture), [Agent](https://docs.openclaw.ai/concepts/agent), [Session model](https://docs.openclaw.ai/concepts/session), [Gateway protocol](https://docs.openclaw.ai/reference/rpc)

docs/channels/groups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ If you want...
8282

8383
Yes — this works well if your “personal” traffic is **DMs** and your “public” traffic is **groups**.
8484

85-
Why: in single-agent mode, DMs typically land in the **main** session key (`agent:main:main`), while groups always use **non-main** session keys (`agent:main:<channel>:group:<id>`). If you enable sandboxing with `mode: "non-main"`, those group sessions run in Docker while your main DM session stays on-host.
85+
Why: in single-agent mode, DMs typically land in the **main** session key (`agent:main:main`), while groups always use **non-main** session keys (`agent:main:<channel>:group:<id>`). If you enable sandboxing with `mode: "non-main"`, those group sessions run in the configured sandbox backend while your main DM session stays on-host. Docker is the default backend if you do not choose one.
8686

8787
This gives you one agent “brain” (shared workspace + memory), but two execution postures:
8888

8989
- **DMs**: full tools (host)
90-
- **Groups**: sandbox + restricted tools (Docker)
90+
- **Groups**: sandbox + restricted tools
9191

9292
> If you need truly separate workspaces/personas (“personal” and “public” must never mix), use a second agent + bindings. See [Multi-Agent Routing](/concepts/multi-agent).
9393

docs/gateway/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ placeholders such as `***` or shortened token values.
298298
</Accordion>
299299

300300
<Accordion title="Enable sandboxing">
301-
Run agent sessions in isolated Docker containers:
301+
Run agent sessions in isolated sandbox runtimes:
302302

303303
```json5
304304
{

docs/gateway/sandbox-vs-tool-policy-vs-elevated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ status: active
99

1010
OpenClaw has three related (but different) controls:
1111

12-
1. **Sandbox** (`agents.defaults.sandbox.*` / `agents.list[].sandbox.*`) decides **where tools run** (Docker vs host).
12+
1. **Sandbox** (`agents.defaults.sandbox.*` / `agents.list[].sandbox.*`) decides **where tools run** (sandbox backend vs host).
1313
2. **Tool policy** (`tools.*`, `tools.sandbox.tools.*`, `agents.list[].tools.*`) decides **which tools are available/allowed**.
1414
3. **Elevated** (`tools.elevated.*`, `agents.list[].tools.elevated.*`) is an **exec-only escape hatch** to run outside the sandbox when you’re sandboxed (`gateway` by default, or `node` when the exec target is configured to `node`).
1515

docs/gateway/sandboxing.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Not sandboxed:
5858

5959
`agents.defaults.sandbox.backend` controls **which runtime** provides the sandbox:
6060

61-
- `"docker"` (default): local Docker-backed sandbox runtime.
61+
- `"docker"` (default when sandboxing is enabled): local Docker-backed sandbox runtime.
6262
- `"ssh"`: generic SSH-backed remote sandbox runtime.
6363
- `"openshell"`: OpenShell-backed sandbox runtime.
6464

@@ -79,7 +79,10 @@ OpenShell-specific config lives under `plugins.entries.openshell.config`.
7979

8080
### Docker backend
8181

82-
The Docker backend is the default runtime, executing tools and sandbox browsers locally via the Docker daemon socket (`/var/run/docker.sock`). Sandbox container isolation is determined by Docker namespaces.
82+
Sandboxing is off by default. If you enable sandboxing and do not choose a
83+
backend, OpenClaw uses the Docker backend. It executes tools and sandbox browsers
84+
locally via the Docker daemon socket (`/var/run/docker.sock`). Sandbox container
85+
isolation is determined by Docker namespaces.
8386

8487
**Docker-out-of-Docker (DooD) Constraints**:
8588
If you deploy the OpenClaw Gateway itself as a Docker container, it orchestrates sibling sandbox containers using the host's Docker socket (DooD). This introduces a specific path mapping constraint:

docs/gateway/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ Dedicated doc: [Sandboxing](/gateway/sandboxing)
11091109
Two complementary approaches:
11101110

11111111
- **Run the full Gateway in Docker** (container boundary): [Docker](/install/docker)
1112-
- **Tool sandbox** (`agents.defaults.sandbox`, host gateway + Docker-isolated tools): [Sandboxing](/gateway/sandboxing)
1112+
- **Tool sandbox** (`agents.defaults.sandbox`, host gateway + sandbox-isolated tools; Docker is the default backend): [Sandboxing](/gateway/sandboxing)
11131113

11141114
Note: to prevent cross-agent access, keep `agents.defaults.sandbox.scope` at `"agent"` (default)
11151115
or `"session"` for stricter per-session isolation. `scope: "shared"` uses a

docs/help/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ for usage/billing and raise limits as needed.
12931293
<Accordion title="Can I keep DMs personal but make groups public/sandboxed with one agent?">
12941294
Yes - if your private traffic is **DMs** and your public traffic is **groups**.
12951295

1296-
Use `agents.defaults.sandbox.mode: "non-main"` so group/channel sessions (non-main keys) run in Docker, while the main DM session stays on-host. Then restrict what tools are available in sandboxed sessions via `tools.sandbox.tools`.
1296+
Use `agents.defaults.sandbox.mode: "non-main"` so group/channel sessions (non-main keys) run in the configured sandbox backend, while the main DM session stays on-host. Docker is the default backend if you do not choose one. Then restrict what tools are available in sandboxed sessions via `tools.sandbox.tools`.
12971297

12981298
Setup walkthrough + example config: [Groups: personal DMs + public groups](/channels/groups#pattern-personal-dms-public-groups-single-agent)
12991299

docs/install/ansible.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ The Ansible playbook installs and configures:
4747

4848
1. **Tailscale** -- mesh VPN for secure remote access
4949
2. **UFW firewall** -- SSH + Tailscale ports only
50-
3. **Docker CE + Compose V2** -- for agent sandboxes
50+
3. **Docker CE + Compose V2** -- for the default agent sandbox backend
5151
4. **Node.js 24 + pnpm** -- runtime dependencies (Node 22 LTS, currently `22.14+`, remains supported)
5252
5. **OpenClaw** -- host-based, not containerized
5353
6. **Systemd service** -- auto-start with security hardening
5454

5555
<Note>
56-
The gateway runs directly on the host (not in Docker), but agent sandboxes use Docker for isolation. See [Sandboxing](/gateway/sandboxing) for details.
56+
The gateway runs directly on the host (not in Docker). Agent sandboxing is
57+
optional; this playbook installs Docker because it is the default sandbox
58+
backend. See [Sandboxing](/gateway/sandboxing) for details and other backends.
5759
</Note>
5860

5961
## Post-Install Setup

docs/install/docker.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Docker is **optional**. Use it only if you want a containerized gateway or to va
1414

1515
- **Yes**: you want an isolated, throwaway gateway environment or to run OpenClaw on a host without local installs.
1616
- **No**: you are running on your own machine and just want the fastest dev loop. Use the normal install flow instead.
17-
- **Sandboxing note**: agent sandboxing uses Docker too, but it does **not** require the full gateway to run in Docker. See [Sandboxing](/gateway/sandboxing).
17+
- **Sandboxing note**: the default sandbox backend uses Docker when sandboxing is enabled, but sandboxing is off by default and does **not** require the full gateway to run in Docker. SSH and OpenShell sandbox backends are also available. See [Sandboxing](/gateway/sandboxing).
1818

1919
## Prerequisites
2020

@@ -311,10 +311,11 @@ including binary baking, persistence, and updates.
311311

312312
## Agent Sandbox
313313

314-
When `agents.defaults.sandbox` is enabled, the gateway runs agent tool execution
315-
(shell, file read/write, etc.) inside isolated Docker containers while the
316-
gateway itself stays on the host. This gives you a hard wall around untrusted or
317-
multi-tenant agent sessions without containerizing the entire gateway.
314+
When `agents.defaults.sandbox` is enabled with the Docker backend, the gateway
315+
runs agent tool execution (shell, file read/write, etc.) inside isolated Docker
316+
containers while the gateway itself stays on the host. This gives you a hard wall
317+
around untrusted or multi-tenant agent sessions without containerizing the entire
318+
gateway.
318319

319320
Sandbox scope can be per-agent (default), per-session, or shared. Each scope
320321
gets its own workspace mounted at `/workspace`. You can also configure

docs/tools/skills-config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ Per-skill fields:
122122

123123
### Sandboxed skills + env vars
124124

125-
When a session is **sandboxed**, skill processes run inside Docker. The sandbox
126-
does **not** inherit the host `process.env`.
125+
When a session is **sandboxed**, skill processes run inside the configured
126+
sandbox backend. The sandbox does **not** inherit the host `process.env`.
127127

128128
Use one of:
129129

130-
- `agents.defaults.sandbox.docker.env` (or per-agent `agents.list[].sandbox.docker.env`)
131-
- bake the env into your custom sandbox image
130+
- `agents.defaults.sandbox.docker.env` for the Docker backend (or per-agent `agents.list[].sandbox.docker.env`)
131+
- bake the env into your custom sandbox image or remote sandbox environment
132132

133133
Global `env` and `skills.entries.<skill>.env/apiKey` apply to **host** runs only.

0 commit comments

Comments
 (0)