Next.js on Cloudflare Workers — Starter Template

An empty, production-ready Next.js starter that runs on Cloudflare Workers. Next.js runs on Cloudflare Workers using the @opennextjs/cloudflare adapter. Clone it with one command, run locally with no login, then let your agent add modules.

cloudflare-workers next.js @opennextjs/cloudflare

Next.js on Workers is powered by the OpenNext adapter (@opennextjs/cloudflare), which converts the Next.js output into a format that runs natively on the Cloudflare edge — no Node.js runtime required.

Get started

  1. 1
    pnpm create microservices-app@latest my-app --template nextjs Scaffolds an empty Next.js app wired for Cloudflare Workers — no login, no account.
  2. 2
    cd my-app && pnpm install && pnpm dev Starts the Next.js dev server; edit app/layout.tsx to make it yours.
  3. 3
    pnpm microservices add auth Composes a verified module (swap auth for billing, booking, email, …).
  4. 4
    pnpm dlx wrangler deploy Ships to your own Cloudflare account when you're ready.

What's wired

  • Cloudflare Workers runtime
  • Next.js
  • @opennextjs/cloudflare
  • wrangler.toml — ready to deploy
  • microservices.lock.json — module pinning

Add backend modules

Once scaffolded, extend your app with production-ready modules — auth, billing, booking, email, audit, and more — without writing the dangerous plumbing yourself:

pnpm microservices add auth

Swap auth for any module id. See what's available in product templates or browse modules.