Cloudflare Workers
readyDeploy unmodified Next.js 14, 15, and 16 (including native Turbopack) globally to your own Cloudflare account — Workers + R2 + D1 + KV + Hyperdrive + Queues + Vectorize + AI + Durable Objects, all configured from a single nextdeploy.yml.
Source reference: cli/internal/serverless/cloudflare*.go, shared/nextcompile/, docs/running-nextjs-16-turbopack-on-cloudflare-workers.md
Why Cloudflare Workers with NextDeploy
Works with the latest Next.js on day one — no adapter breakage. Unlike adapters such as OpenNext that try to shim Next.js into Cloudflare Workers by wrapping the webpack build output — and break when Next.js internals change (such as React vendoring in Next.js 16.4) — NextDeploy skips that entire layer. It takes the Turbopack standalone output directly and bundles its own Worker with a Go adapter (
nextserver/nextcompile). No fragile JS shim, no webpack dependency, and no React version conflicts.
Deploy directly into your own Cloudflare account with zero per-seat markup, global edge execution, zero cold-start Node containers, and native bindings to R2, D1, KV, Hyperdrive, Queues, Vectorize, Workers AI, and Durable Objects — all declared in nextdeploy.yml and provisioned automatically via nextdeploy plan / nextdeploy ship.
This documentation site (https://nextdeploy.org) itself runs Next.js 16.4.6 + Turbopack + React 19.2.0 on Cloudflare Workers via NextDeploy's nextserver engine.
Production Capabilities Matrix
| Capability | Status | Notes |
|---|---|---|
| Next.js 14 / 15 / 16 & Native Turbopack | ✅ Ready | Auto-selects the nextserver engine for Turbopack builds (no --webpack workaround needed). |
App Router & Pages Router SSR (ƒ) | ✅ Ready | Executed by Next.js's own NextNodeServer inside workerd (nodejs_compat_v2). |
Static & SSG (○, ●, generateStaticParams) | ✅ Ready | Served from R2 (env.ASSETS) for both HTML and client-side RSC Flight navigations (rsc: 1). |
Progressive RSC Streaming (Suspense, loading.tsx) | ✅ Ready | Zero-buffering Web ReadableStream ↔ Node ServerResponse HTTP bridge. |
ISR & On-Demand Revalidation ("use cache") | ✅ Ready | R2 + KV CloudflareCacheHandler (entry + 16 MiB byte-budget LRU) registered for FetchCache, Default, and Remote on Symbol.for("@next/cache-handlers"). |
| API Routes & Server Actions | ✅ Ready | Full App Router Route Handlers, mutations, revalidatePath, revalidateTag, cookies, and redirects. |
Middleware & Proxy (proxy.ts) | ✅ Ready | Runs ahead of route rendering for auth, headers, redirects, and rewrites. |
Custom not-found.tsx & error.tsx | ✅ Ready | Preserves true HTTP 404 / 500 status codes with custom error pages. |
| Edge Protection Guard | ✅ Ready | IPv4 & IPv6 CIDR allow/deny rules, KV or native Cloudflare ratelimit binding rate limiting, and HMAC session cookie auth ahead of Next.js. |
| Cron Triggers, Queues & Workflows | ✅ Ready | Protected internal triggers for /api/cron and /api/queue/[name] (granular { ack, retry } + DLQ), plus self-hosted Durable Objects & Workflows via extensions. |
| Multi-Environment Isolation & Canaries | ✅ Ready | Per-environment resource auto-suffixing (-e staging / -e pr-42), environments.* overrides, --canary <pct> gradual rollouts, nextdeploy promote, nextdeploy types, and nextdeploy dev. |
| Custom Domains, Static Assets & Atomic Releases | ✅ Ready | Automatic custom domain attachment, versioned R2 releases with 5-build auto-GC, optional native workers_assets mode, and scoped edge cache purge. |
Architecture at a Glance
next build (Turbopack or Webpack, output: "standalone")
│
▼
nextcompile (Go) + in-process esbuild (~170 ms)
├── Virtual FS (vfs.mjs) — all .next/*.json manifests + BUILD_ID
├── Static Server Chunk Registry (chunks.mjs) — Turbopack/Webpack thunks
├── Streaming HTTP Bridge + CloudflareCacheHandler (R2 + KV)
└── Single ESM Worker bundle (worker.mjs, ~1.60 MB gzipped)
│
▼
nextdeploy ship
├── Auto-provisions R2, D1, KV, Queues, Hyperdrive (drift-checked via plan)
├── Syncs static & prerendered .html/.rsc assets to R2 (versioned keys)
├── Uploads Worker + secret bindings + custom domains via Cloudflare API
└── Runs post-deploy SmokeVerify on live routes
How NextDeploy Compares to Wrangler / OpenNext
- No
wrangler.tomlor Node adapter packages required: NextDeploy compiles.next/standalonedirectly in Go, bundles via in-processesbuild, uploads straight to the Cloudflare API, and reconciles bindings + secrets + custom domains from onenextdeploy.yml. - Unified multi-target workflow: Switch between VPS, AWS Lambda, and Cloudflare Workers using the same CLI (
init,plan,build,ship,status,logs,rollback).
Where to Go Next
- Cloudflare Quickstart — deploy your first app in 5 minutes.
- Workers Runtime — compatibility flags, bundle sizes, and
workerdshims. - NextCompile Reference — full engine internals.
- Running Next.js 16 Turbopack on Cloudflare Workers — engineering deep dive with code and 10 lessons learned.