Agent Sandbox
OpenClaw Sandbox Example
This example demonstrates how to run OpenClaw (formerly Moltbot) inside the Agent Sandbox.
This example demonstrates how to run OpenClaw (formerly Moltbot) inside the Agent Sandbox.
Prerequisites
- A Kubernetes cluster (e.g., Kind).
agent-sandboxcontroller installed.
Usage
-
(If using Kind) Load the image into Kind:
kind load docker-image ghcr.io/openclaw/openclaw:2026.3.23 -
Generate a secure token:
export OPENCLAW_GATEWAY_TOKEN="$(openssl rand -hex 32)" -
Apply the Sandbox resource (replacing the token placeholder):
kubectl apply -f openclaw-config.yaml sed "s/dummy-token-for-sandbox/$OPENCLAW_GATEWAY_TOKEN/g" openclaw-sandbox.yaml | kubectl apply -f - -
Verify the pod is running and port-forward to access the Gateway:
kubectl port-forward pod/openclaw-sandbox 18789:18789 -
Access the Web UI: Open http://localhost:18789 in your browser.
CLI Operations
You can run OpenClaw CLI commands directly inside the sandbox container.
kubectl exec -it openclaw-sandbox -- openclaw --help