Deploy guide · runtime = "node"
Deploy Next.js on Percher
Next.js with the App Router and React Server Components. Percher's Node runtime detects `next.config.js` and builds with `bun run build`. Standard features — Server Components, Server Actions, ISR, middleware, image optimization — work without changes.
Why Percher fits
- Long-running container model means ISR with on-demand revalidation works the way Next.js documents it; no edge-runtime caveats.
- Auto-forwards `NEXT_PUBLIC_*` env vars to the build container, so client-side config (analytics keys, API URLs) is baked in without TOML edits.
Quick start
bunx percher create my-app --template nextjs
cd my-app
bunx percher publishThe first command scaffolds a working Next.js project plus a `percher.toml`. Publish builds and deploys it; the live URL prints on completion.
percher.toml
The canonical config for a Next.js app on Percher. `bunx percher init` generates this automatically when it detects Next.js in your project.
[app]
name = "my-app"
runtime = "node"
framework = "nextjs"
[build]
command = "bun run build"
output = ".next"
[web]
port = 3000
health = "/api/health"
Common gotchas
- Vercel Edge Functions (`export const runtime = "edge"`) need to be converted back to the default Node runtime — Percher's compute is regional containers, not edge.
- Add `app/api/health/route.ts` returning `Response.json({ status: "ok" })` so the deploy health check succeeds.
- Vercel KV / Postgres / Blob have no direct equivalent; opt into the managed PocketBase sidecar with `[data] mode = "pocketbase"` for the SQLite + auth + file-storage shape, or point `DATABASE_URL` at any external Postgres.
Related docs
Ready to deploy Next.js?
Free plan, no credit card. Live in under a minute.
Sign up free