1–5 min delivery

Run OpenClaw sandbox
in 5 minutes

$21.1 / day · dedicated physical machine
Configure Cloud Mac
Sandbox isolation Operation audit

OpenClaw Sandbox in 5 Minutes: Give Your AI Agent an Isolated Cloud Mac

Your Agent can already edit code and run shell commands—the next step is not more tools, but a bounded sandbox. This quick walkthrough breaks the path into minutes: enable OpenClaw on a dedicated PixVPS Mac mini M4 node, write a minimal permission YAML, run your first Agent task, and confirm every system call lands in the audit log. For production-grade multi-user zero-trust and CI wiring, see the complete guide.

First question: why not run Agents directly on bare macOS?

Many teams start with "it's just a test—SSH into the cloud Mac and let the Agent work." The problem: modern Agent frameworks (LangGraph, AutoGen, Cursor Background Agent, and similar) execute tool calls as the current user— file reads, child processes, network access, all with the same boundary as your own terminal session. In an internal pilot we asked an Agent to scan a Swift repo and auto-fix compile warnings; on the third iteration it tried to read ~/Library/Keychains and ran security find-identity to "help find signing certificates." Reasonable intent—catastrophic on a build machine that holds Distribution certs.

Switching accounts or reimaging after every task is expensive; Docker on macOS cannot cover the full Xcode toolchain. OpenClaw's approach: the Agent still runs on real macOS (so xcodebuild and Apple Neural Engine work), but every system call passes through a policy engine first—deny on violation, log everything to audit. This article covers only the shortest path from zero to a working sandbox task; architecture, multi-user zero-trust, and CI wiring live in the OpenClaw Complete Guide.

Quickstart test environment

Hardware: Mac mini M4 · 10-core CPU · 16 GB unified memory · 256 GB NVMe · 1 Gbps dedicated bandwidth (PixVPS Hong Kong node).
OS: macOS 15 Sequoia. OpenClaw CLI 0.9.4, policy format v2.
Sample task: Agent clones a public repo → scans TODO comments with rg → writes a Markdown report (read-focused, no outbound network).
Entire run over SSH; VNC not used.

Before you start: three things you need

You do not need a local Mac—a Windows or Linux laptop with SSH is enough. Confirm these three items before you begin, or you will stall mid-flow:

1 PixVPS M4 instance
1 instance-token
1 Minimal permission YAML
5 min First-run target

Cloud node: if you do not have one yet, pick region and term on the order page. All five nodes (Singapore, Japan Tokyo, South Korea Seoul, Hong Kong, US East) share the same hardware and pricing—choose by latency. SSH credentials appear in the console within 1–5 minutes after payment.
instance-token: generated the first time you enable OpenClaw under "Security & Sandbox" in the console; shown once—store it in your team secrets vault immediately.
Policy file: Section 4 below provides a copy-paste read-focused template; save it as ~/policies/quickstart-readonly.yaml.

Five-minute flow: from enable to first sandbox task

Timings below reflect what we measured. We repeated the flow five times on a Singapore node; once familiar, the full run took about 4 minutes 20 seconds. Budget 5–8 minutes on your first attempt. Each step has a clear acceptance check—do not advance until you see the expected output.

  1. 01
    Minute 1: enable OpenClaw in the console

    Log into the PixVPS console → instance details → "Security & Sandbox" → turn on OpenClaw. Copy the instance-token into 1Password or Bitwarden. Done when: the page shows OpenClaw status as enabled.

  2. 02
    Minute 2: SSH in and install the CLI

    Copy the SSH command from "Access info" in the console, log into the instance, then run the install script and authenticate. Done when: openclaw status shows Policy Engine, Sandbox Runtime, and Audit Bus all healthy.

  3. 03
    Minute 3: write the minimal read-only policy

    Create ~/policies/, paste the YAML from Section 4. Run openclaw policy validate -f ~/policies/quickstart-readonly.yaml to check syntax. Done when: output reads policy valid with no path-conflict warnings.

  4. 04
    Minute 4: create the sandbox and probe

    openclaw sandbox create --name quickstart --policy ~/policies/quickstart-readonly.yaml, then openclaw sandbox exec quickstart -- /bin/zsh -lc 'ls -la /workspace'. Done when: you see an empty workspace directory listing inside the sandbox, with no permission errors.

  5. 05
    Minute 5: run the Agent entry script and tail audit

    Execute your Agent entry (or the sample script below) inside the sandbox. In a second terminal, run openclaw audit tail --sandbox quickstart --follow to watch live logs. When finished, openclaw sandbox stop quickstart. Done when: audit logs contain decision: allow and decision: deny entries (if the Agent hit blocked paths).

CLI install and auth (step 2)

Run in your instance SSH session:

curl -fsSL https://api.pixvps.com/openclaw/install.sh | bash

openclaw auth login --token <instance-token>

openclaw status

Minimal permission YAML: read-only code scan template

Quickstart rule: start strict, loosen later. The first policy should expose only what the Agent needs. The template below allows read/write on /workspace, runs git / rg / python3, blocks keychain and SSH paths, and denies all outbound network— enough for "clone public repo → static scan → write report" workflows.

quickstart-readonly.yaml

apiVersion: openclaw.pixvps.com/v2

kind: SandboxPolicy

metadata:

  name: quickstart-readonly

spec:

  filesystem:

    allow:

      - path: /workspace

        access: [read, write]

    deny:

      - path: "**/Keychains/**"

      - path: "**/.ssh/**"

  process:

    allow: [git, rg, python3, zsh]

  network:

    egress: deny-all

Note: /workspace includes write access because the Agent must persist the scan report; for purely read-only tasks, change access to [read]. To pull code from GitHub, switch network.egress to allow-list and add github.com:443— the most common "step two" after quickstart. Full network whitelist patterns are in Section 5 of the complete guide.

Run your first Agent task: copy-paste entry script

Before wiring LangGraph or a custom orchestrator, validate the "policy + sandbox + audit" loop with a ~20-line shell script. Save the following as /workspace/agent-entry.sh on the host (the sandbox maps that directory automatically):

Minimal Agent entry example

#!/bin/zsh

set -euo pipefail

cd /workspace

git clone --depth 1 https://github.com/apple/swift-sample-code.git repo 2>/dev/null || true

rg -n "TODO|FIXME" repo/ > scan-report.txt || true

echo "Scan done: $(wc -l < scan-report.txt) matches" > summary.txt

cat summary.txt

With egress: deny-all still in place, git clone will be blocked by network policy— that is intentional for the demo: tail audit and you will see a decision: deny network record. Add GitHub to the allow-list and rerun; you should see decision: allow and a successful summary.txt.

Run: openclaw sandbox exec quickstart -- /bin/zsh /workspace/agent-entry.sh. On our M4 node the script (including clone) took about 38 seconds; cumulative policy evaluation overhead was under 200 ms—negligible. When done, run openclaw sandbox stop quickstart to free the workspace; zombie sandboxes consume disk—the default per-instance cap is five concurrent sessions.

Three common blockers and one-line fixes

Almost everyone hits one of these on the first run. No need to dig through a long manual—use the table.

Symptom Likely cause One-line fix
openclaw auth login reports invalid token Trailing space on copy, or token was rotated Re-copy from console; old tokens invalidate immediately after rotation
Agent returns E_POLICY_DENY: filesystem Path not on the allow list openclaw audit query --decision deny --since 1h to find the path, then update YAML
git clone fails with no file error Network policy is deny-all Set network.egress to allow-list and add github.com:443
Security reminder

Do not commit instance-token to Git or paste it into Slack screenshots. After the pilot, if multiple teammates need access, configure zero-trust device certificates and viewer / operator / admin roles in the console— see Section 6 of the complete guide.

After the pilot: expand permissions and scale at your pace

A five-minute read-only sandbox is only the starting point. Real workloads often need xcodebuild, npm registry access, and a fresh sandbox on every CI push. That is "pilot to production" territory—finer policy tiers and audit export— covered chapter by chapter in the OpenClaw Complete Guide (advanced permission YAML, GitHub Actions wiring, and 90-day audit retention).

If you do not have a cloud Mac yet, alternatives each have trade-offs: a local laptop running Agents 24/7 burns power and cannot hold a fixed overseas IP; public-cloud macOS VMs lack native OpenClaw integration and operation-level audit; buying office Mac minis means hardware depreciation and ops headcount. PixVPS offers dedicated physical Mac mini M4 (16 GB unified memory, 38 TOPS, 1 Gbps dedicated bandwidth), OpenClaw built into every standard instance, 1–5 minute delivery, from $21.1/day— rent by the day for Agent experiments, move to $105.7/month when stable, more flexible than buying hardware for uncertain demand.

Suggested path: run the read-only sandbox today → tomorrow copy a policy template for your task type (build / doc fetch / ops patrol—see the comparison table in the complete guide) → week three commit YAML to Git and force openclaw audit export in CI. For parallel build Agents, one M4 with 16 GB reliably runs two sandboxes with DerivedData in our tests; for more parallelism, add Thunderbolt 5 clustering for an 80 Gbps multi-machine pool.

Dedicated physical machine · 1–5 min delivery

Give your Agent a cloud Mac with OpenClaw in five minutes

PixVPS Mac mini M4 dedicated nodes ship with OpenClaw sandbox built in: operation-level isolation, zero-trust access, traceable audit logs, 16 GB unified memory for Agent and Xcode side by side—from $21.1/day across five global nodes.

Standard configuration
ChipApple M4 · 38 TOPS
CPU10 cores dedicated
Memory16 GB unified
Bandwidth1 Gbps dedicated
SLA99.9%
Delivery1–5 minutes