dock

Dock vs Cloudflare Sandboxes

Cloudflare Sandboxes are a building block: your Worker starts instances, routes traffic, holds credentials, and keeps records. Dock ships the persistent machine and its lifecycle as one product.

Side by side

Cloudflare Sandboxes in its own words: “Execute untrusted or generated code in Linux virtual machines or isolated Workers.”

CapabilityDockCloudflare Sandboxes
IsolationDockFirecracker microVMs on Linux KVM hosts, or gVisor containers on Linux hosts with Docker. The host picks the runtime.Cloudflare SandboxesContainers run as microVMs with their own kernel and network; Dynamic Workers for JavaScript, Python, or WebAssembly.
PersistenceDockStop keeps the disk and releases compute; resume brings back the same dock ID and files. gVisor docks keep only /home/user/work across stops.Cloudflare SandboxesInstances stop after an inactivity timeout of up to 6 hours; files and processes end with the instance unless saved.
Snapshots and forksDockBranch copies a dock into independent, writable docks. Snapshots save a dock, and a dock saved by name over the API can start new docks.Cloudflare SandboxesContainer snapshots of the root filesystem, in public beta; your application stores the ID and restores it.
Docker insideDockDocker, systemd, ssh, and git ship in the ubuntu-24.04 image.Cloudflare SandboxesDocker-in-Docker documented for Sandbox SDK 0.x, with iptables disabled and host networking.
SSHDockYes. Run commands with exec or open a shell with ssh.Cloudflare SandboxesNot stated; interactive shells and a browser terminal over WebSocket.
DesktopDockNot yet. Docks are Linux machines, also when they run locally on Windows.Cloudflare SandboxesNot stated.
Network egressDockOn 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.Cloudflare SandboxesContainers start with Internet access off; your Worker intercepts and allows outbound HTTP and HTTPS.
SecretsDockCredentials 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.Cloudflare SandboxesAn outbound handler in your Worker adds credentials after the request leaves the sandbox.
AuditDockThe control plane records every lifecycle operation.Cloudflare SandboxesNo built-in sandbox inventory or stop log; your Worker records them.
StatusDockSelf-hostable under AGPL-3.0; Dock Cloud is coming soon (waitlist).Cloudflare SandboxesRequires the Workers Paid plan; the sandbox scheduling policy and container snapshots are in public beta.

Where Dock is different

A machine, not a building block
Lifecycle and persistence come built in instead of being coded into a Worker and Durable Object.
Same dock on resume
Stop keeps the disk and resume keeps the same dock identity, without application code tracking snapshot IDs.
Self-host under AGPL-3.0
Run the control plane with one command (setup.sh) and enroll hosts that dial out to it. Dock Cloud, coming soon, runs the same code.

Where Cloudflare Sandboxes is strong

Closed by default and programmable
Containers start without Internet access, and egress rules and credential injection are ordinary Worker code.
Part of the Cloudflare platform
Sandboxes sit next to Workers, Durable Objects, and R2, and Dynamic Workers offer a lighter option for JavaScript.

Choose Dock if

you want a ready, persistent machine per agent without writing lifecycle code, on your hosts or ours.

Choose Cloudflare Sandboxes if

you already build on Workers and want to compose sandboxes with your own routing, storage, and policy code.

Start a dock in a minute.

Self-host Dock for free, or join the waitlist for Dock Cloud.