Overview
Sandbox setup has two parts:
- Install the
openshell-sandboxbinary. - Configure DefenseClaw/OpenClaw standalone mode with the Python
defenseclaw sandboxcommands.
Install the OpenShell binary
./scripts/install-openshell-sandbox.sh --version 0.0.16 --install-dir ~/.local/bin
The installer downloads the Linux-specific OpenShell layer from ghcr.io/nvidia/openshell/cluster, extracts opt/openshell/bin/openshell-sandbox, installs it, and verifies it with openshell-sandbox --version. It requires Linux plus curl, tar, and python3.
Configure standalone mode
defenseclaw sandbox init
defenseclaw sandbox setup --sandbox-ip 10.200.0.2 --host-ip 10.200.0.1 --policy permissive
sandbox init verifies Linux, requires an existing DefenseClaw config, ensures openshell-sandbox, ensures iptables when host networking or guardrail is enabled, creates the sandbox user/home, integrates OpenClaw ownership, and installs policy/plugin assets as applicable.
sandbox setup configures openshell.mode=standalone, sandbox/host IPs, OpenClaw gateway port, guardrail host, sandbox home, policy template, DNS, systemd units, launcher scripts, and optional device pre-pairing.
Verification
defenseclaw-gateway sandbox status
The gateway status command prints systemctl status --no-pager for openshell-sandbox.service and defenseclaw-gateway.service.
Policy template
DefenseClaw's Go policy wrapper reads and writes defenseclaw-policy.yaml in the configured OpenShell policy directory:
version: "1"
allowed_endpoints: []
denied_endpoints: []
allowed_skills: []
denied_skills: []
permissions: []
The setup command also installs a fuller OpenShell policy template selected by --policy default|strict|permissive.
Runtime commands
defenseclaw-gateway sandbox start
defenseclaw-gateway sandbox stop
defenseclaw-gateway sandbox restart
defenseclaw-gateway sandbox exec python -c 'print("hello")'
defenseclaw-gateway sandbox shell
Upgrading the sandbox
OPENSHELL_VERSION=0.0.16 ./scripts/install-openshell-sandbox.sh
The installer exits early when openshell-sandbox is already on PATH.
Disabling standalone mode
defenseclaw sandbox setup --disable
The disable path reverts DefenseClaw out of standalone sandbox mode.