E2B
Read when:
- choosing
provider: e2b; - reviewing delegated sandbox execution behavior;
- changing E2B provider sync, status, or command streaming.
provider: e2b delegates Linux sandbox lifecycle and command execution to E2B. Crabbox creates E2B sandboxes with Crabbox metadata, syncs the local Git-managed working set as a gzipped archive, and streams remote command output through E2B's process API.
#Auth
export E2B_API_KEY=e2b_...
Optional overrides:
export E2B_API_URL=https://api.e2b.app
export E2B_DOMAIN=e2b.app
#Config
provider: e2b
target: linux
e2b:
template: base
workdir: crabbox
user: ""
Relative e2b.workdir values resolve inside the selected E2B user's home. The default user home is /home/user, user: ubuntu resolves under /home/ubuntu, and user: root resolves under /root. Absolute workdirs are used as-is. e2b.user must be a login name, not a path; values such as ../tmp or team/dev are rejected before sandbox or process calls.
Equivalent one-off flags:
crabbox warmup --provider e2b --e2b-template base
crabbox run --provider e2b --e2b-workdir repo -- pnpm test
crabbox status --provider e2b --id <slug>
crabbox stop --provider e2b <slug>
#Behavior
warmupcreates an E2B sandbox frome2b.template, stores Crabbox metadata,runcreates or reuses a sandbox, syncs the manifest into--sync-onlyperforms only the archive upload and extraction.- Workdirs must resolve to dedicated absolute directories. Broad roots such as
--checksumis rejected because E2B does not expose a Crabbox SSH target.--script,--script-stdin,--fresh-pr, local captures,--keep-on-failurekeeps a newly created failed sandbox until its timeoutlist,status, andstopoperate only on Crabbox-owned E2B sandboxes.
and records a local cbx_... lease claim.
<e2b user home>/<e2b.workdir> unless the workdir is absolute, streams stdout/stderr, and returns the remote exit code.
/, /home, and /tmp are rejected before sandbox creation or sync touches the sandbox filesystem.
--capture-on-fail, and --download are rejected because E2B owns command transport.
instead of deleting it immediately.
E2B is not an SSH lease backend today. Commands that require a Crabbox SSH target, such as ssh, vnc, code, and Actions runner hydration, should use Hetzner, AWS, static SSH, or Daytona instead.