---
title: "Caveman Sandboxes: Zero-Credential Firecracker microVMs"
description: Run untrusted code, full Linux workspaces, browsers, or desktops in isolated Firecracker microVMs where provider keys never enter the VM and sleeping sandboxes cost nothing.
canonical: https://docs.caveman.so/sandboxes/overview
product: Caveman Cloud
tab: Documentation
group: Sandboxes
---

# Caveman Sandboxes: Zero-Credential Firecracker microVMs

> Run untrusted code, full Linux workspaces, browsers, or desktops in isolated Firecracker microVMs where provider keys never enter the VM and sleeping sandboxes cost nothing.

Caveman Sandboxes are isolated Firecracker microVMs driven from outside through the Caveman relay. Provider API keys and user logins never enter the VM, idle sandboxes pause automatically so you pay nothing while asleep, and disk snapshots fork into new sandboxes in seconds.

Need the full command reference and TypeScript, Python, and Go examples? Go to [Sandbox CLI & SDKs](/sandboxes/cli-and-sdks).

## Fastest ways to start

**1-call isolated exec**

Boot a Firecracker microVM, run one command with zero network egress, stream stdout and stderr, get its exit code, and clean up in a single command:

```bash
cvm run-box --network none -- "uname -a && python3 --version"
```

Pass `--keep-alive` to keep the sandbox running and reuse its ID with `--sandbox ID`.

**Auto-setup current repo**

Auto-detect your repository stack and `.env` bindings, bind credentials on the host egress proxy (zero secrets written inside the VM), create a sandbox, and sync workspace files into `/workspace`:

```bash
# Preview detected stack and zero-secret .env broker bindings (writes .caveman/sandbox.toml with --write)
cvm sandbox init

# Launch sandbox and sync this repository
cvm sandbox up
```

**Zero-install SSH**

Run commands or open an interactive sandbox shell with standard `ssh` and zero CLI or SDK installed:

```bash
ssh gh-<github_user>@run.caveman.so -- python3 -c "print('hello from firecracker')"
ssh run.caveman.so new dev-box && ssh dev-box@run.caveman.so
```

You can even register the zero-install MCP stdio transport over SSH:

```json
{ "command": "ssh", "args": ["run.caveman.so", "mcp"] }
```

## Authentication for sandboxes

Sandboxes use a scoped organization `code:run` key (set in `CAVE_TOKEN`). Each key sees only the sandboxes and snapshots created by its own service account.

Three ways to get a key:

1. **Bootstrap from an existing login**: run `cvm login`, then `cvm key quick` (creates a personal 30-day `code:run` key automatically, or `cvm sandbox` bootstraps one on first use).
2. **Headless agent signup (no browser)**: `cvm signup --email you@company.com --accept-terms`, then `cvm verify <6-digit-OTP>`.
3. **Service account key for CI and production**: create a `code:run` key under **Settings -> Service accounts** in the console and export `CAVE_TOKEN=cave_live_...`.

## Key capabilities

| Capability | CLI flags / commands | What it does |
| --- | --- | --- |
| **Packages** | `--package standard\|browser\|desktop\|agent_box` | Choose base Linux (`standard`), headless browser (`browser`), full GUI desktop (`desktop`), or rapid-pause agent box (`agent_box`). |
| **Sizes & compute** | `--size 4cpu-16gb`, `--compute-class`, `--region` | Pick vCPU and memory up to your plan ceiling, compute class (`standard`, `performance`, `nested`), and region. Add `--nested-kvm` for `/dev/kvm` and Docker inside the VM. |
| **Network egress** | `--network none\|internet\|allowlist`, `--egress-allow`, `--egress-deny` | Remove the network device completely (`none`) for untrusted code, allow default egress (`internet`), or restrict to explicit host allowlists and denylists. |
| **Zero-secret credentials** | `cvm sandbox init` / `cvm sandbox up` | Host-side egress brokering swaps credentials on outbound HTTP calls outside the VM and redacts secrets from responses so raw keys never enter guest memory or disk. |
| **Idle sleep & fast pause** | `--sleep-after 10m\|2h\|0`, `--pause-after 5s\|30s\|0`, `--wake-on-http` | Automatically pause idle VMs (down to `5s` on agent boxes) while keeping disk state. Paused sandboxes stop compute billing and wake on demand or incoming HTTP. |
| **Snapshots & forks** | `cvm sandbox snapshot`, `restore`, `fork`, `--auto-snapshot` | Snapshot disk state, restore a sandbox in place, fork clean copies for parallel branches, or enable rolling `--auto-snapshot 60s --auto-snapshot-keep 5`. |
| **Ports & private URLs** | `cvm sandbox port-forward`, `cvm sandbox url` | Tunnel loopback ports locally over `127.0.0.1` or expose HTTPS port URLs (`https://PORT-SANDBOX.DOMAIN`) that stay private by default until `--public` is passed. |
| **B2B2C isolation & pools** | `--end-user ID`, `cvm pools` | Isolate per-end-user sandboxes under RLS quotas, or manage N:M org computer pools across Cloud and local Mac machines (`--target auto\|cloud\|mac`). |

## How credentials stay outside the VM

- Model API keys and user logins remain in the host harness and relay, never inside the Firecracker guest.
- Commands, file transfers (`cp`, `ls`), and port forwarding flow through the Caveman relay rather than opening SSH daemons or placing SSH keys inside the VM.
- Set `--network none` whenever executing untrusted code or model-generated scripts.

## Pricing and plan limits

Firecracker sandbox compute (CPU and RAM) uses the same pay-as-you-go rates across all plans, drawn from included universal credits or pay-as-you-go, and bills only while awake. Paused sandbox RAM, disk, and network egress cost \$0, while retained snapshots are billed while stored:

| Resource | Rate |
| --- | --- |
| **Awake CPU** | \$0.01 / vCPU-hour |
| **Awake RAM** | \$0.0025 / GiB-hour |
| **Paused RAM** | \$0 |
| **Disk and network egress** | \$0 |
| **Snapshots** | \$0.0002 / GiB-hour while stored (about \$0.146 / GiB-month) |
| **Hosted Agent Harness** | \$0.08 / hour (runs outside the microVM so the VM sleeps during LLM waits) |
| **Persistent Drives** | \$0.05 / GB-month |

Example awake sandbox hourly rates: `2x4` (\$0.03/hr), `2x8` (\$0.04/hr), `4x16` (\$0.08/hr), `8x32` (\$0.16/hr), `16x64` (\$0.32/hr).

Per-plan Cloud sandbox limits (unlimited seats on every plan):

| Plan | Concurrent (awake RAM) | Start rate | Max awake session | Max shape | Kept sandboxes | Concurrent harness runs |
| --- | --- | --- | --- | --- | --- | --- |
| **Hobby (\$0/mo)** | 3 (24 GiB) | 10/min (1,000/mo) | 1 hour (auto-pauses on idle) | `2x8` | 3 (auto-archived after 7d idle) | 2 |
| **Pro (\$25/mo)** | 20 (160 GiB) | 30 → 120/min (unlimited/mo) | 24 hours | `8x32` | 25 | 25 (excess queues cleanly) |
| **Scale (\$300/mo)** | 100 (800 GiB) | 120 → 600/min | Unlimited (idle auto-pause) | `16x64` | 100 | 100 |
| **Business (\$750/mo)** | 300 (2.4 TiB) | 300 → 1,500/min | Unlimited (idle auto-pause) | `16x64+` | 300 | 400 |
| **Enterprise (Custom)** | 1,000+ | Custom | Unlimited | Custom | Custom | Custom |

Hobby includes **30 hours/mo** of `2x4` Firecracker sandboxes recurring monthly. **Business** adds **Warm Snapshot Pools (`<200ms`)**. On **Pro**, **Scale**, or **Business**, bolt on a **Concurrency Pack (+\$50/mo)** in one click for `+25` concurrent sandboxes (`+200 GiB` awake), `+30/min` base start rate, `+25` kept sandboxes, and `+25` concurrent harness runs. See [Billing](/governance/billing) for full workspace plans and credit top-ups.

## Check live sandbox availability

Check real-time sandbox health from the public status endpoint (no authentication required):

```bash
cvm sandbox status
```

## Verify and undo

List active sandboxes and delete one permanently (along with its disk):

```bash
cvm sandbox list
cvm sandbox delete SANDBOX_ID --yes
```

Next: see every `cvm sandbox` command plus TypeScript, Python, and Go examples in [Sandbox CLI & SDKs](/sandboxes/cli-and-sdks).
