Quickstart

Mental model

Coppice is one gateway process plus a pool of FreeBSD jails and bhyve VMs. The gateway listens on :3000 for API/UI traffic and on envd ports for SDK code execution. On honor it runs as service e2b-compat.

Local tunnel

ssh -fN -L 3001:127.0.0.1:3000 honor
open http://localhost:3001/ui/

Use /admin/ from the same origin for the operator panel:

mise run admin:dev-honor
open http://localhost:4327/admin/

In local development the Astro server proxies admin probes to COPPICE_ADMIN_GATEWAY, defaulting to http://127.0.0.1:3001. The admin:dev-honor task also opens the SSH tunnel when needed and injects the local benchmark bearer token into proxied admin requests. The gateway itself serves the demo portal at /ui/; the admin dashboard is part of the site.

API sanity

curl http://127.0.0.1:3001/health
curl http://127.0.0.1:3001/templates
curl -X POST http://127.0.0.1:3001/sandboxes \
  -H 'content-type: application/json' \
  -d '{"templateID":"python","timeout":300}'

The demo deployment is unauthenticated unless COPPICE_API_KEYS is configured. When auth is enabled, send either X-API-Key or Authorization: Bearer …. For the CLI, store the token once:

coppice --url http://127.0.0.1:3001 login --token "$COPPICE_TOKEN"
coppice whoami

The CLI uses the OS keyring when available and falls back to ~/.config/coppice/credentials.json.

SDK shape

export E2B_API_URL=http://127.0.0.1:3001
export E2B_API_KEY=local
export E2B_DEBUG=true

The Python, Node, and Go roundtrip rigs use that shape. The SDK does not need to know whether the sandbox is a jail or a bhyve guest.

Receipts