Skip to content

Commit c606948

Browse files
committed
docs(sandboxing): clarify sandbox setup scripts require source checkout
Add inline docker build commands for npm-installed users who don't have the source checkout scripts. Update all docs referencing sandbox-setup.sh, sandbox-common-setup.sh and sandbox-browser-setup.sh to note they are source-checkout-only and link to the new inline instructions. Fixes #75485.
1 parent cc25646 commit c606948

6 files changed

Lines changed: 48 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai
2929
- Gateway/sessions: use bounded tail reads for sessions-list transcript usage fallbacks and cap bulk title/last-message hydration, keeping large session stores responsive when rows request derived previews. Thanks @vincentkoc.
3030
- Gateway/chat: bound chat-history transcript reads to the requested display window so large session logs no longer OOM the Gateway when clients ask for a small history page. Thanks @vincentkoc.
3131
- Voice Call/Twilio: honor stored pre-connect TwiML before realtime webhook shortcuts and reject DTMF sequences outside conversation mode, so Meet PIN entry cannot be skipped or silently dropped. Thanks @donkeykong91 and @PfanP.
32+
- Docs/sandboxing: clarify that sandbox setup scripts (`sandbox-setup.sh`, `sandbox-common-setup.sh`, `sandbox-browser-setup.sh`) are only available from a source checkout, and add inline `docker build` commands for npm-installed users so sandbox image setup works without cloning the repo. Fixes #75485. Thanks @amknight.
3233
- Google Meet/Voice Call: play Twilio Meet DTMF before opening the realtime media stream and carry the intro as the initial Voice Call message, so the greeting is generated after Meet admits the phone participant instead of racing a live-call TwiML update. Thanks @donkeykong91 and @PfanP.
3334
- Google Meet/Voice Call: make Twilio setup preflight honor explicit `--transport twilio` and fail local/private Voice Call webhook URLs, including IPv6 loopback and unique-local forms, before joins. Thanks @donkeykong91 and @PfanP.
3435
- Voice Call/Twilio: retry transient 21220 live-call TwiML updates and catch answered-path initial-greeting failures, so a fast answered callback no longer crashes the Gateway or drops the Twilio greeting/listen transition. (#74606) Thanks @Sivan22.

docs/gateway/config-agents.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,15 @@ noVNC observer access uses VNC auth by default and OpenClaw emits a short-lived
922922

923923
Browser sandboxing and `sandbox.docker.binds` are Docker-only.
924924

925-
Build images:
925+
Build images (from a source checkout):
926926

927927
```bash
928928
scripts/sandbox-setup.sh # main sandbox image
929929
scripts/sandbox-browser-setup.sh # optional browser image
930930
```
931931

932+
For npm installs without a source checkout, see [Sandboxing § Images and setup](/gateway/sandboxing#images-and-setup) for inline `docker build` commands.
933+
932934
### `agents.list` (per-agent overrides)
933935

934936
Use `agents.list[].tts` to give an agent its own TTS provider, voice, model,

docs/gateway/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ cannot roll back unrelated user settings.
333333
}
334334
```
335335

336-
Build the image first: `scripts/sandbox-setup.sh`
336+
Build the image first — from a source checkout run `scripts/sandbox-setup.sh`, or from an npm install see the inline `docker build` command in [Sandboxing § Images and setup](/gateway/sandboxing#images-and-setup).
337337

338338
See [Sandboxing](/gateway/sandboxing) for the full guide and [full reference](/gateway/config-agents#agentsdefaultssandbox) for all options.
339339

docs/gateway/sandboxing.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,31 +363,66 @@ Example (read-only source + an extra data directory):
363363

364364
Default Docker image: `openclaw-sandbox:bookworm-slim`
365365

366+
<Note>
367+
**Source checkout vs npm install**
368+
369+
The `scripts/sandbox-setup.sh`, `scripts/sandbox-common-setup.sh`, and `scripts/sandbox-browser-setup.sh` helper scripts are only available when running from a [source checkout](https://github.com/openclaw/openclaw). They are not included in the npm package.
370+
371+
If you installed OpenClaw via `npm install -g openclaw`, use the inline `docker build` commands shown below instead.
372+
</Note>
373+
366374
<Steps>
367375
<Step title="Build the default image">
376+
From a source checkout:
377+
368378
```bash
369379
scripts/sandbox-setup.sh
370380
```
371381

382+
From an npm install (no source checkout needed):
383+
384+
```bash
385+
docker build -t openclaw-sandbox:bookworm-slim - <<'DOCKERFILE'
386+
FROM debian:bookworm-slim
387+
ENV DEBIAN_FRONTEND=noninteractive
388+
RUN apt-get update && apt-get install -y --no-install-recommends \
389+
bash ca-certificates curl git jq python3 ripgrep \
390+
&& rm -rf /var/lib/apt/lists/*
391+
RUN useradd --create-home --shell /bin/bash sandbox
392+
USER sandbox
393+
WORKDIR /home/sandbox
394+
CMD ["sleep", "infinity"]
395+
DOCKERFILE
396+
```
397+
372398
The default image does **not** include Node. If a skill needs Node (or other runtimes), either bake a custom image or install via `sandbox.docker.setupCommand` (requires network egress + writable root + root user).
373399

374-
OpenClaw does not silently substitute plain `debian:bookworm-slim` when `openclaw-sandbox:bookworm-slim` is missing. Sandbox runs that target the default image fail fast with a build instruction until you run `scripts/sandbox-setup.sh`, because the bundled image carries `python3` for sandbox write/edit helpers.
400+
OpenClaw does not silently substitute plain `debian:bookworm-slim` when `openclaw-sandbox:bookworm-slim` is missing. Sandbox runs that target the default image fail fast with a build instruction until you build it, because the bundled image carries `python3` for sandbox write/edit helpers.
375401

376402
</Step>
377403
<Step title="Optional: build the common image">
378404
For a more functional sandbox image with common tooling (for example `curl`, `jq`, `nodejs`, `python3`, `git`):
379405

406+
From a source checkout:
407+
380408
```bash
381409
scripts/sandbox-common-setup.sh
382410
```
383411

412+
From an npm install, build the default image first (see above), then build the common image on top using the [`Dockerfile.sandbox-common`](https://github.com/openclaw/openclaw/blob/main/Dockerfile.sandbox-common) from the repository.
413+
384414
Then set `agents.defaults.sandbox.docker.image` to `openclaw-sandbox-common:bookworm-slim`.
385415

386416
</Step>
387417
<Step title="Optional: build the sandbox browser image">
418+
From a source checkout:
419+
388420
```bash
389421
scripts/sandbox-browser-setup.sh
390422
```
423+
424+
From an npm install, build using the [`Dockerfile.sandbox-browser`](https://github.com/openclaw/openclaw/blob/main/Dockerfile.sandbox-browser) from the repository.
425+
391426
</Step>
392427
</Steps>
393428

docs/install/ansible.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,11 @@ This is idempotent and safe to run multiple times.
202202
# Check sandbox image
203203
sudo docker images | grep openclaw-sandbox
204204

205-
# Build sandbox image if missing
205+
# Build sandbox image if missing (requires source checkout)
206206
cd /opt/openclaw/openclaw
207207
sudo -u openclaw ./scripts/sandbox-setup.sh
208+
# For npm installs without a source checkout, see
209+
# https://docs.openclaw.ai/gateway/sandboxing#images-and-setup
208210
```
209211

210212
</Accordion>

docs/install/docker.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,18 +452,21 @@ For full configuration, images, security notes, and multi-agent profiles, see:
452452
}
453453
```
454454

455-
Build the default sandbox image:
455+
Build the default sandbox image (from a source checkout):
456456

457457
```bash
458458
scripts/sandbox-setup.sh
459459
```
460460

461+
For npm installs without a source checkout, see [Sandboxing § Images and setup](/gateway/sandboxing#images-and-setup) for inline `docker build` commands.
462+
461463
## Troubleshooting
462464

463465
<AccordionGroup>
464466
<Accordion title="Image missing or sandbox container not starting">
465467
Build the sandbox image with
466468
[`scripts/sandbox-setup.sh`](https://github.com/openclaw/openclaw/blob/main/scripts/sandbox-setup.sh)
469+
(source checkout) or the inline `docker build` command from [Sandboxing § Images and setup](/gateway/sandboxing#images-and-setup) (npm install),
467470
or set `agents.defaults.sandbox.docker.image` to your custom image.
468471
Containers are auto-created per session on demand.
469472
</Accordion>

0 commit comments

Comments
 (0)