Self-host e2b
@e2b/python-sdk@2.63.0Isolated sandboxes for AI agents to run code safely
docker compose up -d --wait- Stars
- 14 833
- Ports
- 3000 (api — the REST API the SDK calls), 3001 (dashboard — the web dashboard, for a browser), 3002 (client-proxy — sandbox traffic (header routing))
- Requires
- ClickHouse, Firecracker, PostgreSQL, Redis, Vector
us-docker.pkg.dev/e2b-artifacts/api/apiWhat is e2b?
E2B is open-source infrastructure for running AI-generated code in secure, isolated Linux environments: agents get on-demand VMs where they can execute code, process data and use tools without touching your production systems. You drive it with JavaScript/TypeScript or Python SDKs — create a sandbox, run shell commands, evaluate code through the Code Interpreter SDK, or take over a virtual desktop with mouse, keyboard and screenshot APIs. Sandboxes can be paused and resumed (filesystem and memory both persist), snapshotted and forked, and are built from custom templates you define. The managed E2B Cloud is the hosted option, but E2B Embed runs the entire stack — control-plane API, dashboard, orchestrator and storage — on one machine inside your own environment, keeping templates, logs and data local; it is installed with Docker Compose, Terraform (GCP, AWS, Azure) or Kubernetes and needs no E2B account or license key. Embed requires a Linux host with hardware virtualization, speaks plain HTTP with no built-in TLS, and is deliberately a single node; Bring Your Own Cloud and a private-cloud edition (in development) are commercial options for bigger deployments. Sandboxes are CPU-only, with no GPU support.
e2b alternatives
vibebinvibebin is a self-hosted platform using Incus/LXC containers to run AI coding agent sandboxes with automatic HTTPS and SSH access on a VPS.Comparevibebin with e2b
hiveboxSelf-hosted Linux sandbox isolating AI agents with kernel namespaces and cgroups, featuring a REST API, MCP bridge, and built-in web dashboard.Comparehivebox with e2b
sandboxdSelf-hosted AI app builder with isolated sandboxes and live previews. Build apps from prompts or run 80+ curated apps. MIT licensed, one-command Docker install.Comparesandboxd with e2b
ContainariumSelf-hosted open-source agent runtime giving each AI a persistent SSH-reachable Linux box on LXC or Kubernetes with eBPF isolation and built-in MCP servers.CompareContainarium with e2b
SandBase HarnessSelf-hosted, open-source runtime for AI agent sessions: sandboxes, MCP toolsets, credential vaults, memory, audit replay, and a built-in web Console.CompareSandBase Harness with e2b
AizenAizen is a self-hosted AI coding agent as a single 34 MB Rust binary. Connects to any OpenAI-compatible endpoint, reads/edits code, runs tests, verifies work.CompareAizen with e2b
DormiceDormice is a self-hosted, E2B-compatible sandbox platform for AI agents. Permanent sandboxes freeze when idle (~5 MiB RAM) and wake in ~50ms. Single binary deploy.CompareDormice with e2b
Evo AIOpen-source, self-hosted workbench for building AI agents: LLM, A2A, sequential, parallel, task and LangGraph workflow types with MCP tools and encrypted API keys.CompareEvo AI with e2b
Should you self-host e2b?
e2b scores 76/100 on selfhost.directory (how scoring works) and ranks #19 of 209 in AI Agents. It has 14 833 GitHub stars, +572 in the last 30 days.
It shipped 85 stable releases in the past year. The latest, @e2b/python-sdk@2.63.0, came out on 4 November 2026. New versions land roughly every 1 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is Orca (91/100, 123 765 stars). It scores higher overall, so compare the two before you pick. See e2b vs Orca side by side.
Features
- CLI
- Code interpreter execution
- Computer use / virtual desktop
- Custom sandbox templates
- GPU AccelerationBy design (FAQ)
- Isolated code-execution sandboxes
- OpenTelemetry export
- REST API
- Sandbox lifecycle webhooks
- Sandbox metrics monitoring
- Sandbox pause and resume (persistence)
- Sandbox snapshots and forking
- SSH access to sandboxes
- Web Dashboard
e2b README
E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.
FAQ
Why does iptables fail with 'xt_owner module missing' in a sandbox?
The sandbox kernel does not ship the xt_owner module, so --uid-owner/--gid-owner rules fail; use nftables instead.
Do you publish egress IP ranges (CIDRs)?
No — sandbox egress uses ephemeral rotating IPs, so allowlist the cloud provider's ranges or route through your own proxy.
How do I migrate to a different region?
Each region is a separate deployment: contact support for a project in the new region, use its API key and domain, and rebuild templates there.
Can I run sandboxes in the EU?
Yes, a shared EU cluster is available for Pro tier and above; contact support for access.
What are the limitations of the Volumes beta?
File locking can hang, metadata caching is disabled, permission bits are not enforced between users, mounts are fixed at creation, and snapshots/read-only mounts are unsupported.
Why does my template build fail with a Docker push authentication error?
Add E2B's local registry proxy (host.docker.internal:49984, or localhost:49984 on Linux) to Docker's insecure-registries and restart Docker.
Why does pip install fail when building a template?
Large packages exhaust the build environment's RAM cache and /tmp; set TMPDIR to a disk path with --no-cache-dir, or install CPU-only builds.
Can I make a template public so other projects can use it?
Yes — publish from the console's Templates tab or with the CLI, and other projects can create sandboxes from it by project-slug/template-name.
Is there a limit on how many templates I can create?
No total template limit; only concurrent builds are capped (20 on Hobby and Pro, custom on Enterprise).
What limits apply to my template builds?
Plan limits such as concurrent builds can be raised by upgrading or contacting support, while build timeouts are fixed for everyone.
Does E2B support GPUs?
No, sandboxes are CPU-only and sized by vCPU and RAM, with no GPU option anywhere; BYOC does not change this.
Do paused sandboxes count toward the concurrency limit?
No — only running sandboxes count toward concurrency and are billed, and there is no time limit on how long a sandbox stays paused.
How long does a sandbox live?
Continuous runtime is capped by plan (1 hour Hobby, 24 hours Pro, custom Enterprise) and resets on pause/resume; paused sandboxes are kept indefinitely.
How do I increase my concurrency limit?
Raise the concurrent sandbox limit with self-serve add-ons in the console's billing tab, or contact sales for higher Enterprise limits.
How do I calculate the price of a sandbox?
Billing is per second only while a sandbox is running, based on the vCPU and RAM allocated to it; paused and killed sandboxes are not billed.
More in AI Agents
edictum-consoleSelf-hosted operations console for AI agent governance with contract management, human-in-the-loop approvals, audit event feeds, and fleet monitoring.
EigentOpen-source desktop app to run single agents or multi-agent workforces; self-host the FastAPI backend with Docker and use any cloud or local model.
EngramOpen-source self-hosted memory for AI coding agents: one Go binary with SQLite FTS5 search, MCP server, HTTP API, CLI, terminal UI, and optional cloud replication.
EntrolyEntroly is a self-hosted, open-source tool that reduces AI token usage by picking relevant code evidence within a budget and providing auditable receipts.
ENZOENZO is a self-hosted AI workspace for 300+ models using your own API keys. Includes self-drafting agents, research, code generation, music player, encrypted vault.
EpicStaffSelf-hosted AI agent orchestration platform with visual editor, persistent memory, GraphRAG, audit trails, and LDAP/OIDC/SAML auth for regulated environments.
EquiblesA self-hosted server that feeds AI assistants with SEC filings, institutional holdings, insider trades, and market data via the Model Context Protocol.
Evo AIOpen-source, self-hosted workbench for building AI agents: LLM, A2A, sequential, parallel, task and LangGraph workflow types with MCP tools and encrypted API keys.
EzCoworkerSelf-hosted AI agent platform with isolated Docker containers per user, 22+ models across 6+ providers including local Ollama, MCP tools, and file workspace.
fastgptFastGPT is a self-hosted, open-source AI agent platform for building RAG chat apps with visual workflow orchestration, hybrid retrieval and reranking.
FeynmanSelf-hosted, open-source AI research agent for the terminal: literature reviews, deep-research briefs with citations, and paper audits, on any model provider.
FlockSelf-hosted AI dev-team bot for Telegram, VK, LO. Uses your Claude Pro/Max or Anthropic API key. Five-agent pipeline plans, codes, tests, reviews, opens PRs.


0 comments