Dock vs E2B
Both give agents isolated Firecracker machines and can be self-hosted. E2B is session-first, mature, and lets you run commands from its SDK today. Dock is built around long-lived docks that stop, resume, and branch, with sizes set as plain numbers.
Side by side
E2B in its own words: “E2B is the AI agent cloud. It gives each agent session an isolated Linux machine that boots from a snapshot.”
| Capability | Dock | E2B |
|---|---|---|
| Isolation | DockFirecracker microVMs on Linux KVM hosts, or gVisor containers on Linux hosts with Docker. The host picks the runtime. | E2BFirecracker microVMs. |
| Persistence | DockStop keeps the disk and releases compute; resume brings back the same dock ID and files. gVisor docks keep only /home/user/work across stops. | E2BPause keeps filesystem and memory; paused sandboxes are kept with no expiry. Continuous runtime is capped per plan. |
| Snapshots and forks | DockBranch copies a dock into independent, writable docks. Snapshots save a dock, and a dock saved by name over the API can start new docks. | E2BLive snapshots and fork from in-memory state. |
| Docker inside | DockDocker, systemd, ssh, and git ship in the ubuntu-24.04 image. | E2BSupported through a Docker template. |
| SSH | DockYes. Run commands with exec or open a shell with ssh. | E2BNot native; documented as a WebSocket tunnel workaround. |
| Desktop | DockNot yet. Docks are Linux machines, also when they run locally on Windows. | E2BUbuntu XFCE desktop over VNC via the Desktop SDK. |
| Network egress | DockOn a fleet host, open outbound by default, with private ranges, cloud metadata and other docks blocked. An admin can set an allowlist per environment, enforced by a proxy on the host, outside the dock. Local docks have network on (the default) or off; with it on, they block your machine's localhost by default, through a rule inside the guest that root in the dock can remove. | E2BOutbound internet allowed by default; allow and deny rules available. |
| Secrets | DockCredentials stay outside the dock by default: the dock holds a dock-scoped token, and Dock's LLM gateway (model keys) or the connector gateway (Figma, Linear, Slack, Sentry) adds the real key. GitHub clones use a short-lived, read-only token. | E2BEgress proxy can inject secrets so the sandbox never sees the value. |
| Audit | DockThe control plane records every lifecycle operation. | E2BLogs, metrics, lifecycle events, webhooks, and OpenTelemetry export. |
| Open source and self-host | DockAGPL-3.0, free. Self-host with one command; hosts dial out to the control plane. | E2BApache-2.0 runtime, bring your own cloud, and self-hosting options. |
Where Dock is different
- Stop and resume under one ID
- A dock keeps its ID and disk across stop and resume, and a stopped dock releases compute.
- microVM or gVisor, one API
- Firecracker on Linux KVM, or gVisor on Linux with Docker. The host picks the runtime, never a plan.
- Credentials stay outside
- Model keys and tool credentials stay in the control plane; the dock holds a dock-scoped token, and Dock's LLM gateway or the connector gateway adds the real key on the way out. GitHub clones use a short-lived, read-only token.
Where E2B is strong
- Commands and files from code
- Run commands with streaming output, and read and write files inside a running sandbox, from the SDK. Dock runs commands through exec and ssh and keeps files on a persistent disk.
- Mature memory-preserving pause and fork
- Running processes survive pause, and E2B is generally available with SOC 2 Type II.
Choose Dock if
you want long-lived docks that stop, resume, and branch on your own hosts.
Choose E2B if
you need streaming command output and live file access from an SDK today, or short sessions that preserve running processes in memory.
Start a dock in a minute.
Self-host Dock for free, or join the waitlist for Dock Cloud.