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-sandbox controller installed.

Usage

  1. (If using Kind) Load the image into Kind:

    kind load docker-image ghcr.io/openclaw/openclaw:2026.3.23
    
  2. Generate a secure token:

    export OPENCLAW_GATEWAY_TOKEN="$(openssl rand -hex 32)"
    
  3. 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 -
    
  4. Verify the pod is running and port-forward to access the Gateway:

    kubectl port-forward pod/openclaw-sandbox 18789:18789
    
  5. 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
Last modified April 9, 2026: Add examples in website (#548) (e5d4fac)