You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does it take to run self-hosted E2B on one local machine, specifically this owner's Windows 11 machine under WSL2 with nested virtualization, and on one cloud VM later?
Read primary sources (the E2B infra repo, its self-hosting docs, issues and discussions) for:
Supported install paths for one node (Compose, Terraform, other) and which of them runs locally.
Host requirements: KVM, kernel, RAM, disk, privileged containers, networking, DNS and TLS (the Self-hostable sandbox findings say "no TLS").
Known problems running it under WSL2.
The steps to build and register a custom template on self-hosted E2B.
How the SDK authenticates against it (API key, domain), and where those values come from.
Facts only, each cited. The output is the checklist the follow-up task ticket hands the owner.
The repo e2b-dev/infra is now e2b-dev/runtime. Its single-machine package is E2B Embed.
Install paths
Docker Compose: the only local path. Two files (compose.yaml, .env) and docker compose up -d --wait. It preflights the host, prepares it, seeds a key and builds base. About 2 min on 8 vCPU / 32 GiB.
Terraform (GCP, AWS, Azure) makes one cloud VM. Kubernetes needs one node of a cluster.
From source (DEV-LOCAL.md) is for developing E2B itself and is marked "work in progress".
Host requirements (Compose)
Linux x86-64 (tested) or arm64, 4 KiB pages, Ubuntu 24.04 recommended, kernel 6.8+, glibc 2.34+, cgroup v2.
WSL 3.0.3 (stable, 2026-10-09) ships kernel 6.18.54.1. Its config has KVM, NBD, TUN, userfaultfd write-protect and hugetlbfs. So the kernel blocker is gone on current WSL.
nestedVirtualization defaults to true on Windows 11. WSL memory defaults to 50% of Windows RAM; set memory= in .wslconfig.
No one has reported Embed working or failing on WSL2.
Templates
Template.build(tpl, alias=..., cpu_count=..., memory_mb=...) through the same API, then Sandbox.create(alias). The build runs in a sandbox; no Docker daemon. copy() steps upload through port 5008. Tested SDK line: e2b@2.46.1.
SDK auth
The seed makes one team key per install (e2b_ + 32+ hex). docker compose exec ready cat /run/e2b/sdk.env gives E2B_API_KEY, E2B_API_URL=http://localhost:3000, E2B_SANDBOX_URL=http://localhost:3002. The JS SDK reads those env vars; E2B_DOMAIN is not needed. get_host() returns *.e2b.app, which does not resolve; use E2b-Sandbox-Id / E2b-Sandbox-Port headers on 3002.
Not verified
Any end-to-end Embed run on WSL2.
Docker Desktop as the Docker host (the nsenter -t 1 design suggests Docker Engine inside Ubuntu instead).
kvm_intel/kvm_amd autoload in WSL; 2048 hugepages in WSL; WSL idle shutdown and memory reclaim effects.
Whether the KB5127648 fix has shipped; the owner's CPU vendor, RAM and update level.
Port 5432 collision with the owner's other Postgres.
Activity
Daanish2003 commentedon Oct 17, 2026
Resolution: research findings (facts only, no pick)
Full write-up, each claim cited, ending in a 20-step draft checklist for #505: docs/research/always-on-agent/e2b-local-self-host.md
The repo
e2b-dev/infrais nowe2b-dev/runtime. Its single-machine package is E2B Embed.Install paths
compose.yaml,.env) anddocker compose up -d --wait. It preflights the host, prepares it, seeds a key and buildsbase. About 2 min on 8 vCPU / 32 GiB.DEV-LOCAL.md) is for developing E2B itself and is marked "work in progress".Host requirements (Compose)
/dev/kvm,/dev/net/tun,nbdmodule;iptables rsync e2fsprogs iproute2.nsenter -t 1./.WSL2
DEV-LOCAL.mdstill says "WSL2: KVM is not supported". Open PR docs(local-dev): document kernel, iptables and userfaultfd prerequisites e2b-dev/runtime#3660 says/dev/kvmworks on Windows 11 and the real blocker was the 6.6 WSL kernel.nestedVirtualizationdefaults totrueon Windows 11. WSL memory defaults to 50% of Windows RAM; setmemory=in.wslconfig./dev/kvm. Uninstalling the KB fixed it for reporters. Closed 2026-10-16 with no fix note.Templates
Template.build(tpl, alias=..., cpu_count=..., memory_mb=...)through the same API, thenSandbox.create(alias). The build runs in a sandbox; no Docker daemon.copy()steps upload through port 5008. Tested SDK line:e2b@2.46.1.SDK auth
e2b_+ 32+ hex).docker compose exec ready cat /run/e2b/sdk.envgivesE2B_API_KEY,E2B_API_URL=http://localhost:3000,E2B_SANDBOX_URL=http://localhost:3002. The JS SDK reads those env vars;E2B_DOMAINis not needed.get_host()returns*.e2b.app, which does not resolve; useE2b-Sandbox-Id/E2b-Sandbox-Portheaders on 3002.Not verified
nsenter -t 1design suggests Docker Engine inside Ubuntu instead).kvm_intel/kvm_amdautoload in WSL; 2048 hugepages in WSL; WSL idle shutdown and memory reclaim effects.