Lifo vs Cloudflare Sandbox

Cloudflare's Sandbox SDK runs agent-written code in Linux microVMs on Cloudflare Containers, driven from a Worker and billed by active CPU, memory and disk. Lifo runs code in the user's browser tab at $0, and its own cloud runs boxes in V8 isolates, the boundary Workers use. Here is where each fits.

Checked against Cloudflare Sandbox's own docs and pricing on 29 November 2026·Sources

At a glance

What Cloudflare Sandbox is

Cloudflare's Sandbox SDK lets a Worker "execute untrusted or generated code in Linux virtual machines or isolated Workers." Each Linux sandbox is a microVM on Cloudflare Containers with its own kernel and network, from a Debian image with Node.js 24 or your own Dockerfile. Containers and Sandboxes have been generally available since April 2026, and the @cloudflare/sandbox SDK reached 1.0 in September 2026.

What Lifo is

A small Linux-like operating system written in TypeScript. It boots in milliseconds inside the user's browser tab or a Node.js process: a filesystem, a bash-like shell, processes, ports and a Node.js runtime, with no VM or emulator underneath. Open source under MIT, with Lifo Cloud for apps that must keep running.

Lifo and Cloudflare Sandbox side by side

Lifo compared with Cloudflare Sandbox
Where code runsThe user's browser tab (in the page or a Web Worker), or your Node.js process. Lifo Cloud, in preview, keeps a box running on Lifo's servers.A microVM on Cloudflare Containers, created and controlled from your Worker.
IsolationBoxes are kept apart from each other, not from the page or process that runs them. Untrusted code needs a Web Worker on a separate origin. Security docsA microVM with its own kernel and network. Cloudflare: it "isolates the sandbox from your Worker and from other sandboxes."
What runsA Node.js compatibility layer with npm, Vite, Express, Expo previews, git, a bash-like shell, Python (Pyodide), Postgres (PGlite) and a Supabase-compatible backend. No Linux binaries or native addons.A full Linux environment (Debian with Node.js 24 by default), "so you can run any language", plus custom images from a Dockerfile. Also isolated Workers for JavaScript, Python or WebAssembly.
Cold startAbout 27 ms in a browser tab, under 1 ms in Node.js (measured with the repo's bench/).Cloudflare reported a median startup of 648 ms (p95 910 ms) in September 2026. Add the network round trip.
Cost model$0 in the browser: the user's device does the work. Lifo Cloud bills by usage: a Lite box is $0.005 an hour while awake.Requires the $5 a month Workers Paid plan, which includes 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk. Then $0.000020 per vCPU-second, $0.0000025 per GiB-second and $0.00000007 per GB-second of disk, plus Workers and Durable Objects usage.
Open sourceYes. @lifo-sh/core, @lifo-sh/ui and the CLI are MIT licensed. Lifo Cloud's servers are closed source.The Sandbox SDK is Apache-2.0 on GitHub. Containers run on Cloudflare; local development runs the sandbox in Docker.
In your productAn npm package (@lifo-sh/core) plus terminal, file explorer and preview components (@lifo-sh/ui), or an iframe of the playground.Your Worker creates sandboxes with the SDK and serves previews through its own routes. Anyone with a preview link can open it until it expires.
OfflineYes, once loaded, apart from what needs the network (npm installs, git push).No, it's a cloud service (local development uses Docker).
Session lengthAs long as the tab is open. A Lifo Cloud box sleeps when idle and wakes on the next request.An inactivity timeout of up to 6 hours; Cloudflare doesn't guarantee an instance runs for a set time. Snapshots keep files, not memory or processes.
SizeWhatever the user's device gives the tab, on one thread.From lite (1/16 vCPU, 256 MiB, 2 GB disk) to standard-4 (4 vCPU, 12 GiB, 20 GB disk).

Cloudflare Sandbox's column comes from its official docs and pricing pages, checked on 29 November 2026; prices change, so follow the Cloudflare Sandbox pricing page for current numbers.

Two kinds of sandbox on Cloudflare

The Sandbox SDK offers two runtimes. Linux sandboxes are microVMs on Cloudflare Containers: full Linux, any language, your own image, with the network off by default. Isolated Workers run JavaScript, Python or WebAssembly without a VM.

Lifo sits on the lighter side of that line. A box is a Unix-like OS written in TypeScript, so in a browser tab it runs on the visitor's device for free, and in Lifo Cloud each box gets its own V8 isolate, the same boundary Cloudflare Workers use between customers. For boxes that need native code, Lifo Cloud is adding Full boxes, real Linux containers (coming soon).

What it costs

Containers need the Workers Paid plan at $5 a month, which includes 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk each month. Beyond that, Cloudflare charges $0.000020 per vCPU-second (about $0.072 per vCPU-hour) for active CPU only, $0.0000025 per GiB-second of memory (about $0.009 per GiB-hour), $0.00000007 per GB-second of disk, and egress after the included amount. Workers and Durable Objects usage is billed too.

A Lifo box in the browser costs $0 however many sessions run, since the user's device does the work. Lifo Cloud, in preview, bills a Lite box at $0.005 an hour while it's awake and nothing while it sleeps; see pricing.

Startup and lifetime

Cloudflare reported in September 2026 that median sandbox startup fell from just over four seconds to 648 ms, with p95 at 910 ms. A sandbox stops after an inactivity timeout of up to 6 hours, and Cloudflare doesn't guarantee how long an instance runs. Snapshots save files but not memory or running processes.

A Lifo box boots in about 27 ms in a tab, with no network in between, and lives as long as the tab. A Lifo Cloud box wakes in about 110 to 150 ms; like Cloudflare's, its memory and processes don't survive a sleep, and its files and database do.

Security

A Cloudflare microVM is a real boundary between the code and your Worker, other sandboxes and the host, and its network starts closed. Cloudflare also warns that once a secret is in the sandbox, all the code there can read it.

A Lifo Sandbox in a browser shares the page's JavaScript realm, so it's not a boundary against untrusted code. Use a WorkerSandbox on a separate origin for that, or a microVM. The security docs show what each setup stops.

Which one to choose

Choose Cloudflare Sandbox when

  • The code isn't trusted and you want a microVM with its network closed by default.
  • You need full Linux: any language, system packages, your own Docker image.
  • Your app already runs on Workers and Durable Objects, and the sandbox should sit next to it.
  • Jobs need more CPU or memory than a browser tab has.

Choose Lifo when

  • Every user gets a preview, a playground or an agent shell, and you don't want to pay for a VM per session.
  • The code runs for the person watching it, and starting in milliseconds matters.
  • You want it in your page or offline, with an MIT runtime you can ship anywhere.
  • You want the same box in the tab, in Node.js and in a cloud that sleeps when idle.

Using both. Run previews and agent shells in the tab with Lifo, and send the jobs that need Linux binaries or a hard boundary to a Cloudflare sandbox. Only those jobs then cost compute.

Questions

Does Cloudflare Sandbox have a free tier?
Containers, which Linux sandboxes run on, need the Workers Paid plan at $5 a month. That plan includes 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk a month, with usage-based rates after that.
How fast does a Cloudflare sandbox start?
Cloudflare reported a median of 648 ms and a p95 of 910 ms in September 2026. A Lifo box in a browser tab boots in about 27 ms, because there's no VM to start.
Is the Cloudflare Sandbox SDK open source?
Yes, the SDK is Apache-2.0 on GitHub. The containers it controls run on Cloudflare's network. Lifo's runtime is MIT licensed.
Can Lifo run on Cloudflare Workers?
Lifo Cloud runs each box in its own V8 isolate, the boundary Workers use between customers. The open-source @lifo-sh/core runs anywhere JavaScript does; this page doesn't cover running it on your own Workers account.
All comparisons

Sources

Facts about Cloudflare Sandbox come only from its own website, docs and pricing pages. If something here is out of date, open an issue and we'll fix it.

See it run in your browser

A shell, Node.js, npm and a dev server, booted in the tab. No account and no server.