back to microsandbox

compare

microsandboxvscloudflare sandboxes

pick cloudflare sandboxes when the sandbox is part of a workers application. [2] pick microsandbox when the runtime must start locally and embed anywhere.

cloudflare sandboxes runs each sandbox container in its own vm. [1] this is an important boundary fact: cloudflare is not placing these workloads in ordinary shared-kernel containers. the sandbox sdk then connects that vm-backed environment to workers, containers, and durable objects. [2]

microsandbox also gives each workload its own kernel, but starts from an embeddable local runtime. the developer machine runs the same microvm boundary that the application controls through rust, typescript, python, go, or the cli.

the real decision is platform placement. choose cloudflare when workers and durable objects are where your application already lives. [2] choose microsandbox when local execution and runtime ownership must come first. private beta. access is by request.

microsandbox
local + cloud
cloudflare sandboxes
vm-isolated containers on workers [1]
isolation
hardware-isolated microvm · its own kernel
each sandbox container runs in its own vm [1]
where it runs
local runtime · private beta. access is by request.
cloudflare workers and containers [2]
sdk
rust · typescript · python · go · cli
typescript sandbox sdk [2]
container definition
oci image pulled at runtime
container image configured through a dockerfile [2]
session tools
commands, files, logs, metrics, and lifecycle apis
commands, persistent processes, files, ports, sessions, and terminals [2]
application state
your application owns state and sandbox identity
durable objects coordinate persistent sandbox environments [2]
credentials
credentials are destination-bound. the sandbox works with a placeholder; the real value is substituted host-side into supported intercepted outbound requests, only for destinations on your allow-list. an approved destination still receives the real credential and could reflect or misuse it, so scope your allow-lists accordingly.
environment variables, or a worker proxy that injects credentials [1]
local development
the microvm runtime runs locally
the sdk develops locally against the workers toolchain [2]
pick cloudflare sandboxes

choose cloudflare sandboxes when

  • your application already uses workers and durable objects. [1]
  • you want cloudflare to operate the container and vm platform. [1]
  • the typescript sdk and its sessions, terminals, ports, and process tools match your application. [1]
pick microsandbox

choose microsandbox when

  • developers need the actual microvm runtime on their machines.
  • the sandbox must embed in a rust, typescript, python, or go application.
  • you want application state without coupling it to workers or durable objects.
  • one sdk. one api. local or cloud is a config change, not a rewrite.

01

moving from cloudflare sandboxes

command, file, and process operations have direct counterparts in the microsandbox workflow. the architectural change is identity and placement: cloudflare binds sandbox state to its workers and durable objects model. [2] microsandbox leaves that coordination in your application.

keep cloudflare when workers bindings and durable state are the fit. move the execution loop when you need the boundary on a laptop or in an application that is not built around the cloudflare platform.

common questions

is microsandbox a cloudflare sandboxes alternative?

yes for vm-isolated code execution. cloudflare sandboxes is shaped for workers and durable objects. [2] microsandbox is shaped as an embeddable, local-first runtime.

does cloudflare sandbox run in a vm?

yes. cloudflare documents that each sandbox container runs in its own separate vm. [1]

does cloudflare sandbox run locally?

cloudflare supports local development through its workers toolchain, but the production sandbox platform is cloudflare containers and workers. [2] microsandbox runs the actual microvm locally.

how does cloudflare sandbox handle credentials?

cloudflare documents environment variables and a worker-proxy pattern that keeps a real credential in the worker. [1] the application must implement that proxy pattern.

which sdk does cloudflare sandbox use?

cloudflare documents a typescript sandbox sdk. [2] microsandbox publishes rust, typescript, python, and go sdks plus a cli.

run it locally.

put the boundary on your own machine before you choose anything else.

run it locally