
Cloudflare Opennext
This is the official adapter for running Next.js on Cloudflare Workers instead of Vercel. It handles both App Router and Pages Router, supports ISR and SSG, and critically uses the Node.js runtime, not Edge, which means you get full Node.js APIs and broader Next.js feature support. You access Cloudflare bindings like KV, R2, and D1 through getCloudflareContext() in any route or component. The setup requires specific wrangler.jsonc config with nodejs_compat flags and a self-referencing service binding that must match your worker name. The caching system is flexible but needs configuration, with options for R2, KV, or D1 depending on whether you need ISR, time-based revalidation, or tag-based invalidation.
- skills.sh installs
- 466
- last updated
- Aug 21, 2026
Install
$ npx -y skills add null-shot/cloudflare-skills --skill cloudflare-opennext --agent claude-codeInstalls into .claude/skills of the current project.
Files
Cloudflare OpenNext
Deploy Next.js applications to Cloudflare Workers using the @opennextjs/cloudflare adapter with full support for App Router, Pages Router, ISR, SSG, and Cloudflare bindings.
When to Use
- Creating new Next.js apps for Cloudflare Workers
- Migrating existing Next.js apps to Cloudflare
- Configuring ISR/SSG caching with R2, KV, or D1
- Accessing Cloudflare bindings (KV, R2, D1, Durable Objects, AI)
- Using databases and ORMs (Drizzle, Prisma) in Next.js
- Troubleshooting deployment issues or bundle size problems
Getting Started
New App
npm create cloudflare@latest -- my-next-app --framework=next --platform=workers
cd my-next-app
npm run dev # Local development with Next.js
npm run preview # Preview in Workers runtime
npm run deploy # Deploy to Cloudflare
Existing App Migration
# 1. Install dependencies
npm install @opennextjs/cloudflare@latest
npm install --save-dev wrangler@latest
# 2. Create wrangler.jsonc (see Configuration section)
# 3. Create open-next.config.ts
# 4. Update next.config.ts
# 5. Add scripts to package.json
# 6. Deploy
npm run deploy
Core Concepts
How OpenNext Works
Sponsors
Details
- Repository
- github.com/null-shot/cloudflare-skills
- Categories
- Frontend Development, DevOps & CI/CD, Release Management, Cloud & Infrastructure
- First seen
- Jun 3, 2026