Cloudflare Worldedge community field guide

RETROSPECTIVE EDITION / 2026-04

Sandboxes: isolate code, then limit intent

Container isolation still needs identity-scoped instances, command policy, timeouts, network controls, cleanup, and current transport choices.

ISSUE
28 / 34
FIRST PUBLISHED
SOURCE CHECKED
Archive integrity

The edition month is a curriculum position. This article is one of the 32 retrospective editions first published on 2026-08-10, and is not presented as a historical release or past activity.

01 / DECISION

When this primitive earns a place

Use Sandboxes when untrusted or generated code needs an isolated Linux execution environment and a Worker must control the boundary; Dynamic Workers are the lighter option when the code only needs JavaScript, Python, or WebAssembly.

02 / ARCHITECTURE

Build the smallest defensible path

Allocate one sandbox per trust boundary, use explicit sessions, allowlist commands and egress, set resource and time limits, proxy secrets outside, and destroy on completion.

  1. 01Name the contract

    Use Sandboxes when untrusted or generated code needs an isolated Linux execution environment and a Worker must control the boundary; Dynamic Workers are the lighter option when the code only needs JavaScript, Python, or WebAssembly.

  2. 02Add one primitive

    Allocate one sandbox per trust boundary, use explicit sessions, allowlist commands and egress, set resource and time limits, proxy secrets outside, and destroy on completion.

  3. 03Capture failure evidence

    Reject a forbidden command and destination, enforce timeout and cleanup, verify session separation, and confirm no secret enters the sandbox.

03 / REPRODUCE

Evidence before confidence

Reject a forbidden command and destination, enforce timeout and cleanup, verify session separation, and confirm no secret enters the sandbox.

npm create cloudflare@latest -- sandbox-linux --category=hello-world --type=hello-world --lang=ts --no-deploy --no-git --no-agents

04 / BOUNDARY

The production boundary

Isolation is not permission to run arbitrary user intent. Sandbox SDK 1.0 moves control into a Durable Object class you write, and the move to the Durable Object scheduling policy cannot be undone by a rollback, so rehearse it on a staging Worker. Keep browser automation in Browser Run.

05 / FIRST-PARTY SOURCES

Keep first-party sources authoritative

Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.

01 / SOURCESandboxes on Cloudflarehttps://developers.cloudflare.com/sandbox/02 / SOURCERun a Linux commandhttps://developers.cloudflare.com/sandbox/get-started/03 / SOURCEMigrate from Sandbox SDK 0.xhttps://developers.cloudflare.com/sandbox/sdk/migrate/