E2B & sandbox template

Connect your E2B account and build the sandbox template.

Cloud workspaces run as sandboxes in your own account with E2B, the cloud sandbox provider. Nothing runs in a shared tenant. You connect an API key and build the sandbox template in your own E2B team.

E2B has no public templates: templates are scoped to the team that built them, so every self-hosted install builds its own copy of the Proliferate template. The build bakes the Proliferate runtime into the image; sandboxes then boot from it in seconds.

Set up

Get an E2B API key

Create an E2B account (or use your existing team) and generate an API key. Every sandbox the Proliferate server creates is billed to and isolated within this account. You do not need E2B_TEAM_ID; it only matters for publishing public templates, which self-hosted installs never do.

Screenshot: E2B dashboard - API key

The E2B dashboard keys page showing where to generate and copy the API key.

Install the runtime binaries

The template build consumes prebuilt Linux binaries; no Rust toolchain is needed. On a standard Docker install they are not on the host yet: install-runtime.sh (run by bootstrap.sh and update.sh) only installs them when you tell it where they go. Add these lines to .env.static in your deploy bundle, with X.Y.Z matching your server release:

CLOUD_RUNTIME_SOURCE_BINARY_PATH=/opt/proliferate/bin/anyharness
CLOUD_WORKER_SOURCE_BINARY_PATH=/opt/proliferate/bin/proliferate-worker
CLOUD_SUPERVISOR_SOURCE_BINARY_PATH=/opt/proliferate/bin/proliferate-supervisor
RUNTIME_BINARY_URL=https://github.com/proliferate-ai/proliferate/releases/download/server-vX.Y.Z/anyharness-x86_64-unknown-linux-musl.tar.gz
RUNTIME_BINARY_SHA256_URL=https://github.com/proliferate-ai/proliferate/releases/download/server-vX.Y.Z/self-hosted-assets.SHA256SUMS

Then run ./update.sh from the deploy directory. install-runtime.sh downloads the tarball, verifies the checksum, and places three binaries in /opt/proliferate/bin:

  • anyharness
  • proliferate-worker
  • proliferate-supervisor

Run the build on the deploy host so those binaries are already in place, or copy them to whichever machine you build from.

Info:

AWS one-click installs already have the binaries, installed by the CloudFormation stack at /opt/proliferate/bin/anyharness-linux, /opt/proliferate/bin/proliferate-worker-linux, and /opt/proliferate/bin/proliferate-supervisor-linux. Skip the env changes above and adjust the export paths in the build step to the -linux names.

Check out the repo at your release

The build script ships in the Proliferate repo, not in the deploy bundle. Check out the release that matches your server (the server-vX.Y.Z tag corresponding to your PROLIFERATE_SERVER_IMAGE_TAG), then install dependencies. The build machine needs Node.js and pnpm.

git clone https://github.com/proliferate-ai/proliferate.git
cd proliferate
git checkout server-vX.Y.Z
pnpm install

Build the template

Point the build at your API key and the runtime binaries, and pick an alias (the template's name in your team):

export E2B_API_KEY=<your key>
export CLOUD_RUNTIME_SOURCE_BINARY_PATH=/opt/proliferate/bin/anyharness
export CLOUD_WORKER_SOURCE_BINARY_PATH=/opt/proliferate/bin/proliferate-worker
export CLOUD_SUPERVISOR_SOURCE_BINARY_PATH=/opt/proliferate/bin/proliferate-supervisor
 
node scripts/build-template.mjs --alias proliferate-runtime-cloud

The build runs through E2B's API (no local Docker build) and takes a few minutes. On success, the script prints the value to configure on the server:

E2B_TEMPLATE_NAME=proliferate-runtime-cloud

Screenshot: Terminal - template build output showing E2B_TEMPLATE_NAME

The template build finishing, with the E2B_TEMPLATE_NAME line to copy into the server env.

Configure the Proliferate server

Set both values in your env file (.env.static in the deploy bundle):

E2B_API_KEY=<your key>
E2B_TEMPLATE_NAME=proliferate-runtime-cloud

Then apply the change by running the update script from the deploy directory (it regenerates the runtime env and restarts the stack):

./update.sh

Verify

Create a cloud workspace from the desktop app and confirm a sandbox boots from your template in your E2B dashboard.

Rebuild after every server update

Warning:

The template bakes the Proliferate runtime at the version you built. After every server update (./update.sh), check out the new server-vX.Y.Z tag and rebuild the template so the sandbox runtime matches the server. Reuse the same --alias so the alias points at the new build and E2B_TEMPLATE_NAME never changes. A containerized template builder that removes the Node.js and repo-checkout requirement is planned.

Info:

E2B is the current managed provider. Running workspaces on machines you already own works today as an alternative, and a sandbox runner built by Proliferate is planned.

With the GitHub App and the template both configured, return to Enable and verify to finish enabling the add-on.

On this page