Read this when you:
- choose
provider: upstash-box; - configure the Upstash Box runtime, size, base-URL endpoint, or working directory;
- change
internal/providers/upstashbox.
Upstash Box is a delegated-run provider. Crabbox calls the Upstash Box REST
API to manage Box lifecycle (create, get, list, delete), upload files, and run
commands over its exec / exec-stream endpoints. Upstash owns the sandbox state
and process transport; Crabbox owns local config, repo claims, archive sync and
guardrails, slugs, timing summaries, and the normalized list/status output.
There is no SSH target.
Use Upstash Box when commands should run in Upstash-managed ephemeral Linux
sandboxes and you do not need a Crabbox SSH box. Reach for a provisioned SSH
provider (AWS, Hetzner, Azure, GCP, static SSH) or another SSH-capable delegated
provider instead when you need crabbox ssh, VNC, code-server, or Actions
hydration — none of those surfaces exist on Upstash Box.
- Create an Upstash Box API key.
- Export it as
UPSTASH_BOX_API_KEYorCRABBOX_UPSTASH_BOX_API_KEY. Crabbox never accepts the key as a command-line flag.
Crabbox sends the API key as the X-Box-Api-Key request header. Provide it
through the environment:
export UPSTASH_BOX_API_KEY=...
# or
export CRABBOX_UPSTASH_BOX_API_KEY=...Crabbox redacts the configured API key from Upstash Box HTTP error bodies and exec-stream error events before displaying diagnostics.
Rotate the key if it was ever pasted into a chat, shell history, issue, or log.
crabbox warmup --provider upstash-box --upstash-box-runtime node --upstash-box-size small
crabbox run --provider upstash-box -- pnpm test
crabbox run --provider upstash-box --id swift-crab --shell 'pnpm install && pnpm test'
crabbox status --provider upstash-box --id swift-crab
crabbox stop --provider upstash-box swift-crabprovider: upstash-box
target: linux
upstashBox:
baseUrl: https://us-east-1.box.upstash.com
runtime: node
size: small
workdir: /workspace/home/crabbox
keepAlive: falseProvider flags:
--upstash-box-base-url
--upstash-box-runtime
--upstash-box-size
--upstash-box-workdir
--upstash-box-keep-alive
Environment overrides:
CRABBOX_UPSTASH_BOX_API_KEY / UPSTASH_BOX_API_KEY
CRABBOX_UPSTASH_BOX_BASE_URL / UPSTASH_BOX_BASE_URL
CRABBOX_UPSTASH_BOX_RUNTIME
CRABBOX_UPSTASH_BOX_SIZE
CRABBOX_UPSTASH_BOX_WORKDIR
CRABBOX_UPSTASH_BOX_KEEP_ALIVE
Defaults: base URL https://us-east-1.box.upstash.com, runtime node, size
small, workdir /workspace/home/crabbox, keepAlive false.
Accepted values, validated before the API is called:
runtime:node,python,golang,ruby,rust, or the Alpine variantsnode-alpine,python-alpine,golang-alpine,ruby-alpine,rust-alpine.size:small,medium, orlarge.
warmup/runwithout--idcreates a Box namedcrabbox-<slug>-<lease-hex>with the configured runtime and size, then waits (up to 5 minutes) until the Box reports a ready status (idle,running,ready, orpaused). Crabbox stores a local claim with a normalcbx_...lease ID and a friendly slug.- By default
runarchive-syncs the working tree: Git manifest → localtar -czf→ upload into the Box workspace as.crabbox-upstash-box-sync-*.tgz→ in-Boxtar -xzfinto the workdir (the temp archive is removed afterward). - The user command runs through the Box exec-stream endpoint wrapped in
sh -c, with the workspace folder set as the working directory, streaming output back through Crabbox. - One-shot Boxes are deleted after a
runthat did not pass--keep.--keepand--keep-on-failureretain the Box untilcrabbox stop.
Note: warmup always keeps the Box until an explicit crabbox stop. If you
pass --keep=false to warmup, Crabbox prints a warning and still keeps it.
- SSH: no.
- Crabbox sync: yes — archive sync through Box file upload + exec.
- Run session: yes.
--lease-outputrecords the Box lease, reuse/retention state, and the matchingcrabbox stopcleanup command. - Provider sync: no separate Upstash sync step.
- Desktop / browser / code: no.
- Actions hydration: no.
- Coordinator (broker): no — Upstash Box always runs direct from the CLI.
- IDs can be a Crabbox slug, a
cbx_...lease ID, or a raw Upstash Box ID (when that Box carries Crabbox naming, i.e.crabbox-<slug>-<hex>). --classand--typeare rejected; use--upstash-box-sizeand--upstash-box-runtime.upstashBox.workdirmust resolve to an absolute path under/workspace/home/. Broad or system roots —/,/bin,/dev,/etc,/home,/lib,/lib64,/opt,/proc,/root,/sbin,/sys,/tmp,/usr,/var,/workspace, and/workspace/home— are rejected before any sync or command runs.--checksumis rejected because Upstash Box has no SSH/rsync target. Large-sync guardrails still apply;--force-sync-largeis honored for intentional large archive syncs.- Use
--sync-onlyto pre-upload the archive into a kept Box before a later command. - Delegated run/sync options that need an SSH target or proof surface are
rejected:
--script/--script-stdin,--fresh-pr,--full-resync,--env-helper,--capture-stdout/--capture-stderr,--capture-on-fail,--download,--artifact-glob,--require-artifact,--emit-proof, and--stop-after. - Forwarded environment values are written to a temporary shell profile in the
Box workspace, sourced (
set -a) for the command, and removed best-effort afterward. They are never placed on the local process argv. upstashBox.keepAlivemaps to the Box createkeep_aliveoption. Crabbox--keepindependently controls whether a one-shotrundeletes the Box afterward.
- Crabbox setup guide — Upstash's walkthrough for running Crabbox on Upstash Box.
- Provider backends