Can a Cloudflare Durable Object run DOOM?
The first run delivered 387 frames. They all showed the same picture. After we changed the game clock, we could finally turn a corner inside DOOM running in a Linux guest on Cloudflare.

320 × 200 / d9f0afccWatch the experiment
The stream worked. The game was stuck.
The browser showed 10.26 FPS and a 94 ms median key acknowledgement. Both readings beat the working run. The canvas stayed on the startup wipe. The decoded pixels had one fingerprint across all 387 frames, and the guest reported zero key reads. An acknowledgement showed that the key had reached the host. We needed evidence that the game was reading it.
That was our second snag. The first local Worker failed during module loading with TypeError: Invalid URL string. The browser SDK resolved optional assets from import.meta.url. We supplied the precompiled kernel as a static Worker module and used an inert base for the unused assets.
A deployed probe booted a one-CPU BusyBox guest with 48 MiB of RAM. A statically imported JavaScript Promise Integration test suspended and resumed with 42. A separate probe of dynamic Wasm compilation returned Wasm code generation disallowed by embedder, so the ARM64 interpreter ran with its runtime recompiler disabled.
To get past the wipe, we put pacing in the host. The object offers three or four game tics per slice. The ARM64 program advances a virtual game clock, including the short waits during the wipe. Linux still receives the keys and the engine still draws the picture. The change resolved the observed freeze. The trace left the exact failing timer or scheduler path unresolved.
Open the freeze and boot receipts · Cloudflare’s runtime rules
Where DOOM actually runs
In November 2026, @ahmadaccino suggested getting GTA VI into a Durable Object unikernel. We started with a smaller game and a real Linux kernel compiled to WebAssembly. Unkernel interprets ARM64 userspace, so we could run doomgeneric as a separate Linux executable from a fixed, read-only mount. The guest’s network stays off.
Keyboard events go into Linux’s evdev device. DOOM draws to /dev/fb0. The object reads that buffer, compresses it and sends it back to the browser over the WebSocket. In this run the browser loaded HTML, CSS and JavaScript to send input and display frames.
- BrowserSends keys and displays received frames.
- WorkerAuthorises and routes the WebSocket.
- Durable ObjectHosts the static Wasm module and paces the game.
- Unkernel LinuxInterprets the ARM64 executable and exposes input and display devices.
- DOOM engineReads evdev input and draws the framebuffer.
Why this looks different from 1993 DOOM
The engine is DOOM, through the doomgeneric source port. The maps, monsters and art are Freedoom Phase 1’s. The project supplies its own game data for a DOOM-compatible engine, so those corridors and creatures differ from id Software’s commercial game.
There’s also a display quirk. The engine produces a 320 × 200 raster. With square pixels, that’s an 8:5 picture like the one in the original lab view. DOS-era DOOM filled a 4:3 CRT with that same grid, which gave each pixel more height. Scaling it to 320 × 240 or 640 × 480 restores the intended proportions. The raw proof below keeps the original lab view. Display scaling changes the shape of the picture independently of the game’s speed.

Freedoom project and game data · Chocolate Doom on aspect ratio
Unedited gameplay proof
Watch the corridor move as the player turns. The same session ID, d9f0afcc, and Worker version, f7e7120b-ce7e-4c3e-b21d-c9861a194265, appear in the browser capture and Cloudflare trace. That trace records a guest first draw and evdev reads for movement, fire and use. The browser recorded 222 distinct pixel digests across 224 displayed frames in 37.6 seconds.
Playing at about six FPS
You can see a beat between input and motion in the capture. For the Linux run, the median key-to-acknowledged-frame delay was 170 ms. That measures when the browser painted a frame carrying the host’s acknowledgement, including transport and decode time. The timing of the first visible response to a particular key is a separate measurement.
| Measurement | Linux guest in the Durable Object | Direct Wasm in the same Worker |
|---|---|---|
| Session start to first frame inside the object | 560 ms | 148 ms |
| Browser connect to first displayed frame | 4,552 ms | 668 ms |
| Displayed frames per second | 5.93 | 10.00 |
| Key to acknowledged frame, median / p95 | 170 ms / 279 ms | 85 ms / 436 ms |
| Memory reported | 48 MiB guest allocation | 36.25 MiB linear Wasm memory |
| Cloudflare CPU for the run | 27.20 s | 0.905 s |
| Compressed frame payload | 4.55 MiB over 37.6 s | 2.25 MiB over 9.7 s |
The direct Wasm control compiled the same engine sources to WASI and used the same Freedoom data. These are individual runs from Chrome in Melbourne, with 65 key-latency samples for Linux and 18 for direct Wasm. Frame cadence is separate from game tics. The two memory figures measure different allocations.
At the published Workers Paid overage rate, about 42 seconds at the 128 MB billing allocation contributes roughly US$0.00007 for duration. That estimate excludes request and storage charges and monthly allowances. We measured payload bytes before protocol overhead and have no isolated bill for the run. Durable Object pricing
A warm object produced its first frame after 266 ms inside the DO and 3,821 ms from browser connect. After a forced browser disconnect, it resumed the same session within the four-second grace period. Ending a run releases game state. SQLite retains only the boot allowance.
Where the earlier experiments ran
In 2021, Celso Martinho’s Cloudflare multiplayer port used a Durable Object to route messages between players. Each browser ran the engine and rendered its own frames. Here, the object renders remotely and the browser receives the pixels. Cloudflare’s 2021 write-up · Browser and router source
Julian Wood’s 15 October 2026 Lambda Web Functions experiment is the closest match. His setup pins the same doomgeneric revision and extracts the same Freedoom Phase 1 WAD. His server owns the clock and sends frames to the browser. It runs the engine directly as WASI in Node.js. Inputs arrive as HTTP POSTs and frames return in a binary HTTP stream. A DynamoDB input log lets another environment rebuild the session. Wood reports 17.5 streamed FPS on his setup, with a different host, transport and sample. Julian Wood’s experiment · Engine and data pins
HermitOS’s DOOM port links doomgeneric and its operating system into one bootable image for QEMU. Our guest is a full Linux kernel with a separate ARM64 game process. HermitOS DOOM source
Run it on your machine
You’ll need the repository’s Node version and pnpm, Git and GitHub CLI, Docker capable of running Linux ARM64 containers, plus gzip, unzip and shasum. The script downloads and verifies WASI SDK 34.0 on Apple Silicon. On Intel Macs and other hosts, set DOOM_WASI_CC to the absolute path to clang from that SDK before running the script.
git clone https://github.com/loftwah/app-composer.git
cd app-composer
pnpm install --frozen-lockfile
stage=$(mktemp -d)
./labs/doom-edge/prepare.sh "$stage/lab"
pnpm exec wrangler dev --config "$stage/lab/game/wrangler.jsonc" --port 8790Open localhost:8790 and enter the
LAB_KEYvalue from$stage/lab/game/.dev.vars. Keep the staging directory and key private. This starts the ARM64 game in the local Linux guest.Focus the game display. Use arrows to move and turn, left Ctrl to fire, and Space to use. End that session before opening localhost:8790/#direct for the direct Wasm control. Use the same key and controls.
Check that the picture changes as you play. For a recorded check, run the recipe’s capture script and match the browser session ID to Wrangler’s
doom-runline. In the Linux run, look forDOOM_GUEST_FIRST_DRAWandDOOM_GUEST_KEYalongside distinct decoded frame digests. The frame counter can keep moving during a freeze.
Stop Wrangler after the run. Save any recordings you want to keep, then remove the temporary directory you created. For a cloud replay, use your own authorised Cloudflare account and a fresh Worker name. Shell probe, recording commands and pinned sources · Optional deployment and teardown · Experiment record
Another run on the same executable
The same paced ARM64 executable also played in Chrome-local Unkernel, with guest networking disabled. It displayed its first frame in 467 ms and logged seven guest key presses. In that run the browser hosted Linux and the engine.
The hosted play console requires a lab key. The local recipe above generates its own key.
Credits
DOOM engine by id Software via doomgeneric (GPL). Game data by the Freedoom contributors (BSD-3-Clause). Linux-on-Wasm and the ARM64 interpreter by Pooya Parsa and the Unkernel contributors. The film opens with a local capture of the original id Software shareware. The cloud capture uses Freedoom, with game audio disabled. Narration uses the Loftwah voice with Eleven v4. Bethesda’s fan video policy