中文说明见 README.zh-CN.md.
This is a small single-host Linux deployer for running E2B on an Ubuntu bare-metal host.
It covers two phases:
- Repeatable local Linux setup: preflight, dependencies, runtime artifacts, local infra, base template.
- systemd services: orchestrator, API, and client proxy run in the background.
It intentionally does not try to replace E2B's AWS/GCP Terraform providers yet. Instead, it gives the single-host path a more IaC-like lifecycle: init, plan, apply, status, and destroy.
- E2B infra repo is already cloned at a configurable path, for example
/opt/e2b/infraor$HOME/src/e2b-infra. - The host has
/dev/kvm,/dev/net/tun, cgroup v2, and enough disk. - Docker is installed and can pull required images.
- You run install scripts on the Ubuntu server.
You can override paths and user by editing:
/etc/e2b-linux-local.envClone this repository on the Ubuntu host:
mkdir -p ~/src
cd ~/src
git clone https://github.com/zegging/e2b-linux-local.git
cd e2b-linux-local
chmod +x scripts/*.shCreate the env file:
make init
sudo nano /etc/e2b-linux-local.envAt minimum, set the path to your local e2b-dev/infra checkout and the seeded local dev API key:
E2B_ROOT=/path/to/e2b-infra
E2B_API_KEY=<LOCAL_DEV_API_KEY>Run the plan step:
make planInstall dependencies if needed:
make install-depsDownload E2B runtime artifacts if this is a fresh host:
make download-artifactsApply the local deployment:
make applyThis prepares host runtime settings, installs systemd units, enables them, and starts services in the right order.
You can still manage services directly:
make start
make stop
make restart
make statusFollow logs:
make logs SERVICE=orchestrator
make logs SERVICE=api
make logs SERVICE=client-proxyBuild the base template once:
make build-baseCreate a sandbox:
make create-sandbox TIMEOUT=3600From Windows:
curl.exe -s -X POST http://<server-ip>:3000/sandboxes `
-H "X-API-Key: <LOCAL_DEV_API_KEY>" `
-H "Content-Type: application/json" `
-d '{\"templateID\":\"base\",\"timeout\":3600}'The installer creates:
e2b-local-infra.service: Docker Compose services frompackages/local-dev/docker-compose.yamle2b-orchestrator.service: Firecracker orchestrator/template managere2b-api.service: local orchestration APIe2b-client-proxy.service: local client proxy
Logs:
journalctl -u e2b-orchestrator -f
journalctl -u e2b-api -f
journalctl -u e2b-client-proxy -fHealth:
curl -s http://localhost:5008/health && echo
curl -s http://localhost:3000/health && echo
curl -s http://localhost:3003/health && echoThe single-host IaC contract lives in:
iac/linux-local/
It contains the public env template and the lifecycle contract for this repository. The top-level Makefile is the main operator interface:
make init
make plan
make apply
make status
make destroydestroy stops and disables services but keeps data by default. More destructive modes require explicit environment flags; see scripts/destroy.sh.
local-build-base-templatecan be slow the first time. In one run it took about 40 minutes.- Always pass
timeoutwhen creating a sandbox. The local default observed during setup was 15 seconds. 3000is the API port.3002is the sandbox URL for SDK use.3003is the client proxy health endpoint.