Build a personal website from 0
Next.js on Cloudflare in 2026: What to Do Now That next-on-pages Is Deprecated
Cloudflare's next-on-pages is deprecated and its repo was archived in October 2026. To run Next.js on Cloudflare today, Cloudflare recommends vinext on Workers, with the OpenNext adapter for apps that can't switch yet. Plus how our 2023 upgrade from Next.js 13 to 14 got stuck on the deploy tool, and what to check before picking a framework.
Kelvin Wang · · 6 min read
A purely static site can still use output: 'export' and ship the static files. We learned this the hard way: in 2023, upgrading a Next.js project from 13 to 14 got stuck because next-on-pages didn’t support the new version yet, and the way we deployed had to change along with it. Since then I check who maintains the deploy tooling before I pick a framework.
What happened to us
We’d built that site with Next.js and wanted it to deploy to Cloudflare Pages automatically. The tool in between was @cloudflare/next-on-pages. Going back to the deploy settings from that time, these were the fields:
Build command: npx @cloudflare/next-on-pages@
Build output: .vercel/output/static
Build comments: Enabled
It worked like an adapter plug, reshaping the Next.js build output into something Cloudflare Pages could deploy. So besides Next.js and Cloudflare, we also had to keep track of which versions this adapter supported.
Upgrading Next.js was already on our list, because we wanted the newer features. In 2023, going from 13 to 14, @cloudflare/next-on-pages didn’t support the new version yet, and the deploy setup that had worked with the old Next.js became one more thing the upgrade had to fix. The tool was deprecated later; its official README now clearly marks it deprecated, the repository was archived in October 2026, and it points to other tools to migrate to.

So that job covered two things: upgrading Next.js and changing how we deployed. We had no AI coding help back then, and it took a lot of effort to get from 13 to 14 and to get automatic deploys on Cloudflare running again.
A deprecated tool doesn’t stop an old site from running; the deployed version keeps working. For a project that wants to keep upgrading, though, the deploy path needs another look.
What next-on-pages was, and where it stands
next-on-pages was Cloudflare’s adapter: it ran the Next.js build, then converted the output into something Cloudflare Pages could execute. It only supported Next.js’s Edge runtime, not the Node.js runtime 3.
Where it stands now:
- The README says the package is deprecated and the repo archived, and points new projects and migrations to vinext 1.
- The repo was archived on 1 October 2026, so no more updates or fixes 1.
- Cloudflare’s Next.js guide targets Workers. Pages only comes up for static exports you specifically want on Pages 2.
If your project still uses next-on-pages, the site will keep running, but expect to change how you deploy the next time you upgrade Next.js across a major version.
Your options for Next.js on Cloudflare in 2026
| Option | Good for | Status (2026-11-07) |
|---|---|---|
| vinext, deployed to Workers | New projects, or projects migrating off next-on-pages | The default in Cloudflare's Next.js guide. An open-source Vite-based reimplementation of the Next.js API; its site lists about 94% coverage of the Next.js 16 API surface, and Cloudflare's guide labels it beta |
OpenNext Cloudflare adapter (@opennextjs/cloudflare), deployed to Workers | Existing OpenNext apps, or apps hitting a vinext compatibility gap | Uses the Next.js Node.js runtime. Supports every Next.js 16 release and the latest minors of 15 (support for 14 was announced to end in Q1 2026). Node Middleware (Next.js 15.2+) isn't supported yet |
| Static export on Cloudflare | Sites with no server-side features | Static files only: no SSR, no API routes |
| Stay on Vercel | People who want Next.js's home platform | The Hobby plan is free but limited to personal, non-commercial use |
Sources: Cloudflare Next.js guide [2], vinext [4], OpenNext Cloudflare [3], Vercel Hobby [5].
A few things to keep in mind:
- vinext isn’t Next.js itself. It reimplements the Next.js API, so your
app/,pages/andnext.config.jscarry over, but the coverage isn’t 100% 4. Cloudflare’s guide suggests runningnpx vinext checkbefore adopting it for a production app 2. - OpenNext converts the real Next.js build output into something Workers can run. That’s closer to what next-on-pages did, but on the Node.js runtime, which supports more features than the Edge runtime 3.
- Vercel Hobby limits how you use it. Vercel’s docs restrict the Hobby plan to non-commercial, personal use 5. A personal site is fine; a site with ads or paid client work needs Pro.
Migrating off next-on-pages
With vinext
The migration flow from Cloudflare’s guide 2:
# 1. Check compatibility; lists anything unsupported
npx vinext check
# 2. Add vinext: generates a Vite config, installs dependencies, adds vinext scripts
npx vinext init
# 3. Run and build locally with vinext
npm run dev:vinext
npm run build:vinext
# 4. Deploy to Cloudflare Workers
npx @vinext/cloudflare deploy
vinext init leaves your existing setup alone and next dev keeps working 4, so you can run both side by side and switch once you’re confident. If you use an AI coding tool, Cloudflare also publishes a vinext agent skill (npx skills add cloudflare/vinext) so the tool follows the official steps 2.
For a new project, start with C3:
npm create cloudflare@latest -- my-next-app --framework=next
With OpenNext
If vinext check reports gaps you can’t close yet, use the OpenNext Cloudflare adapter. New projects start with 3:
npm create cloudflare@latest -- my-next-app --framework=next --platform=workers
For an existing app, follow Get Started in the OpenNext docs: the adapter runs the Next.js build, then converts the output so Wrangler can deploy it 3.
Steps for either path
Whichever you choose:
- Move from a Pages project to a Worker. Both paths deploy to Workers, so the Pages build settings (the three fields above) no longer apply.
- Reconnect automatic deploys. Workers uses Workers Builds, which is configured differently from Pages.
- Move your environment variables. Variables set on the Pages project don’t follow you to the Worker. Set them again, and keep build-time and runtime variables apart.
- Repoint your domain. Move the custom domain from the Pages project to the new Worker.
Check deploy support before you pick a framework
After that upgrade, I check a few more things before choosing a framework:
- Who maintains the deploy adapter? The framework team, the hosting platform, or the community? next-on-pages came from Cloudflare itself and was still deprecated, so “official” isn’t enough. Look at whether it’s actively maintained.
- Does the framework’s own documentation cover the platform? Platforms listed in the framework’s deploy docs are less likely to be left behind on an upgrade.
- When was the last release? Check releases and issues. An archived or long-quiet repo is a warning.
- Which framework versions are supported? Deploy tooling usually trails new framework releases. Check before a major upgrade.
- Which runtime does it use? The Edge and Node.js runtimes expose different APIs. If the adapter supports only one, some features won’t work.
Why this site moved to Astro
So for this site, my fourth, I started by looking at how the framework and the hosting platform fit together. Having decided to stay on Cloudflare, I cared even more about who maintains that deploy path and what I’d have to change when versions move.
That’s also why I picked Astro. The Cloudflare adapter is one of Astro’s official integrations, documented on Astro’s own site 6, and its upgrade notes say what changes between versions. The path still moves, though: Astro 6’s adapter dropped Cloudflare Pages support in favour of Workers 6. So even with “official support”, I keep an eye on maintenance status and upgrade notes.
After that upgrade, how nice a framework is to write is only part of it. Whether a change goes live smoothly, and what the whole thing costs to maintain, count just as much.
Go deeper Choosing a Stack for a Personal Website: Astro + Cloudflare vs Next.js vs WordPress The options this site weighed before settling on its stack.Sources
Kelvin Wang
Electrical engineer building tools with AI agents, sharing hands-on notes on engineering and investing.
More about me