Skip to content

sbx v0.1.4

Choose a tag to compare

@github-actions github-actions released this 18 Nov 08:51
· 22 commits to main since this release
Immutable release. Only release title and notes can be modified.
v0.1.4
7a10bfc

sbx is now an orchestration layer: sandboxes run on the runtime you choose, either this server or a hosted provider. This is the biggest release so far. Each person also gets their own sign-in account.

Highlights

Several sandbox runtimes per installation

  • Three runtimes are built in: E2B Embed (Firecracker VMs on this server, as before), E2B Cloud (E2B's hosted sandboxes) and Boat (hosted Ubuntu 24.04 sandboxes). An installation enables any of them, and each sandbox runs on exactly one, chosen when it is created.
  • With hosted runtimes, the server itself needs no KVM: about 2 GiB of memory and 10 GiB of disk run sbx-control, nginx and the secret store. A fresh install enables Embed where the host can run it, and E2B Cloud when E2B_CLOUD_API_KEY is set. sh install.sh --check reports which runtimes a host can run without installing anything.
  • You can add, change, test, set as default and remove runtimes in four places: the first-run wizard, Settings → Sandbox runtimes, the CLI (sbx runtimes, sbx runtimes add|set|test|default) and the host CLI (sbx-admin runtime add|verify|default|remove). Keys go in on stdin and are never shown again.
  • sbx checks a runtime's limits (CPU, memory, disk, concurrent sandboxes) before asking it for a sandbox, and says which limit a request breaks.
  • Other runtimes can be installed as packages through the sbx.runtimes entry point. Core code reaches every backend only through sbx_control.runtime.

Shared servers for hosted sandboxes (endpoints)

  • Hosted sandboxes can't reach the server's private network. An endpoint gives them a managed server (Postgres, Redis, …) or an internal host through one TLS path on port 443, so there is no port to open.
  • Each endpoint has its own CA, and sandboxes get 24-hour client certificates that renew automatically. Access is granted per repository, explicitly.
  • Commands: sbx endpoints, sbx endpoints add --server NAME, sbx endpoints add --name N --target IP:PORT --repo owner/app, sbx endpoints grant|revoke|rm. On the host: sbx-admin endpoint ls|add|rm|grant|revoke. Endpoints are off until an admin adds one.

Hosted sandboxes behave like local ones

  • Pause, resume and cold boots work end to end on E2B Cloud and Boat: previews, SSH (host keys stay stable across a cold boot), app restarts and health checks.
  • Templates build from the repository's Dockerfile on every runtime, with Boat's ENV and WORKDIR handled correctly.
  • Network settings follow what each runtime actually enforces. Setup checks that sandboxes can reach the server's public address.

Accounts and passwords for each person

  • The one shared password is replaced by an account for each person, with an argon2-hashed password. Changing a password or removing someone ends their sessions everywhere, and removal also revokes their API tokens.
  • sbx sends no mail: an admin gets a one-time set-password link (valid 7 days) and passes it on.
  • Settings → People shows members, roles and last sign-in. You can manage them over the API (/api/users) and on the host with sbx-admin user ls|add|link|admin|rm.
  • OIDC admits the admins, the people added and the allowed_emails patterns; allowed_emails is no longer required.

Catalog

  • Supabase: each sandbox gets its own preview branch (supabase-project + supabase-branch), set up with the project's migrations. It provides DATABASE_URL, SUPABASE_URL and the keys.
  • sbx catalog show lists what a package outputs, and sbx repo brief prints a repository's setup brief.

Upgrading from v0.1.3

  • No manual steps. Upgrade from the web app's update button, or by installing the release archive as before. The upgrade keeps the runtimes the installation enables, so an Embed install stays on Embed.
  • Sign-in: if you used the shared password, each admin, and each email listed exactly in allowed_emails, keeps it as their own password. The shared password is then deleted. Sign in as before, then change your password under CLI & access. Anyone matched only by a * pattern needs a set-password link (sbx-admin user link EMAIL). With OIDC sign-in, the shared password is just deleted.
  • The upgrade rebuilds the sandbox templates and shows which ones in its progress. Running sandboxes keep running.
  • To try a hosted runtime, run sbx-admin runtime add e2b-cloud or sbx-admin runtime add boat (the key on stdin), or use Settings → Sandbox runtimes. For a repository whose sandboxes need a managed server, add an endpoint for it.
  • Known caveat: on E2B Cloud, an app's pooled database connections can go stale after a resume. Recipes for such apps may need lifecycle: {resume: restart}.

Full docs: docs/agent-install.md (setup) and docs/reference.md (Runtimes, Endpoints).

What's Changed

Breaking changes

Changes

  • Reach every runtime backend through sbx_control.runtime by @Batuhan1999 in #24
  • Say in the upgrade's progress which templates it rebuilds by @Batuhan1999 in #25
  • Make network settings follow what the sandbox runtime enforces by @Batuhan1999 in #28
  • Treat a sandbox that paused or went since its listing as not running by @Batuhan1999 in #27
  • Check at setup that sandboxes reach this server's public address by @Batuhan1999 in #26
  • Check a runtime's limits before asking it for a sandbox by @Batuhan1999 in #29
  • Run several sandbox runtimes per installation by @Batuhan1999 in #30
  • Give each sandbox its own Supabase preview branch by @Batuhan1999 in #34
  • Keep the shared sign-in password for the people who used it by @Batuhan1999 in #35
  • Run sandboxes on E2B Cloud, next to or instead of Embed by @Batuhan1999 in #31
  • Runtime settings: add, change, test and remove sandbox runtimes from the web app, the wizard and the CLI by @Batuhan1999 in #33
  • Shared servers for hosted sandboxes, and Boat as a second provider by @Batuhan1999 in #36

Full Changelog: v0.1.3...v0.1.4