Skip to Content
loop.fun
MicroVM hosts

Local and self-hosted

Docker Sandboxes, the open-source E2B runtime, Microsandbox and Kata give you microVM isolation on your own laptop or servers, with no vendor control plane.

You don't need a cloud account to give an agent its own microVM. The same isolation now runs on a laptop, a home server or your own data centre. What you give up is the control plane: the part of a hosted platform that decides when to sleep, when to wake, where to store snapshots and how to route a webhook to the right machine. With self-hosting, that's either a small part of the open-source project or something you build.

At a glance

Runs onHibernationBest for
Docker SandboxesYour Mac, Windows or Linux machine (optional experimental cloud)Stop and restart keep the diskLetting a coding agent run unsupervised on your own machine
E2B runtimeOne Linux box with KVM, or your cloud via TerraformYes: Firecracker snapshots with pause and resumeThe E2B API, but on your hardware
MicrosandboxLinux or macOSNot a focusLightweight local isolation for tool calls
OpenSandbox, Kata, Agent SandboxYour Kubernetes clusterVia the cluster (see Kubernetes)Platform teams

Docker Sandboxes

Docker's sbx CLI runs each coding agent in a microVM with its own kernel and its own Docker daemon, so the agent can build and run containers without touching your machine. It doesn't need Docker Desktop, and local use is free, commercial use included (docs, Docker blog). primary source

  • Supported agents: Claude Code, Codex, Copilot, Cursor, Devin, Docker Agent, Droid, Kiro, OpenCode, plus a plain shell (agents). Start one with sbx run claude.
  • Network and secrets: all outbound traffic goes through a proxy on the host, with presets such as "balanced" and "locked down" and per-host allow rules. The proxy injects credentials, so your real API key stays on the host and never enters the VM. This is the pattern we recommend everywhere (see Operations).
  • Persistence: a sandbox lasts until you remove it. Stopping and restarting keeps packages, images and files. By default your project folder is mounted into the sandbox, or you can give the agent a private clone.
  • Cloud mode: sbx --cloud runs the same sandboxes on Docker's experimental agentic platform, pay-as-you-go. Cloud sandboxes expire after one hour by default and can't mount your local folder.

For loops: it gives your laptop a safe place for long /goal runs with permissions switched off. It is not a hibernating host. When your machine sleeps, so does the agent.

E2B self-hosted

The engine behind E2B is open source under Apache-2.0 (the e2b-dev/infra repository now redirects to e2b-dev/runtime). Its README describes "Firecracker microVMs that resume from a snapshot". You can run it two ways (GitHub):

  • Embed: a single Linux machine with KVM, started with Docker Compose. One machine by design, which is enough for a home lab or a small team.
  • Cluster: Terraform for GCP, AWS and Azure, plus a Kubernetes manifest. A comparison describes this path as heavy, with a Nomad and Consul control plane underneath (Helix). secondary reporting

Because it's the same engine, the E2B SDKs, templates (including the claude and codex ones) and pause and resume work against your own installation. If you want E2B's operations team rather than your own, E2B also offers BYOC, a managed deployment in your own cloud account, for enterprise customers (BYOC).

Microsandbox and OpenSandbox

  • Microsandbox runs microVMs through libkrun, under Apache-2.0. It claims start times under 100 ms (self-reported) and suits fast, throwaway isolation for an agent's tool calls more than resident agents (Beam comparison). secondary reporting
  • OpenSandbox, released by Alibaba in March 2026 under Apache-2.0, is a self-hosted sandbox platform that can use gVisor, Kata Containers or Firecracker underneath (Northflank). secondary reporting
  • Kata Containers run each pod in a lightweight VM, and can use Firecracker or Cloud Hypervisor underneath. On Kubernetes, pair them with Agent Sandbox to get one isolated, stateful pod per agent.

When self-hosting makes sense

Further reading

loop.fun

Patterns, hints and tools for designing the loops that keep agents working, and for widening the set of loops you can think of.

© 2026 loop.fun · CC BY 4.0

On this page