← All PostsDevOps

Deploying Next.js to Production

From Vercel to self-hosted Docker containers, a comprehensive guide to deploying Next.js apps in 2026 — including multi-zone deployments.

CD
Clara Dubois
·Apr 7, 2026·11 min read
DeploymentDevOpsNext.js

Deploying Next.js has never had more options. Here's a tour of the most common approaches and when to use each.

Option 1: Vercel (Recommended)

Vercel is built by the Next.js team and offers the smoothest zero-config experience: - Automatic preview deployments for every PR - Edge network with 100+ PoPs - Built-in analytics and observability - Automatic Multi-Zone support with rewrites

Deploy with one command: `vercel --prod`

Option 2: Node.js Server

Run Next.js as a long-lived Node process. Good when you need full control or custom middleware:

next build
node .next/standalone/server.js

Use `output: 'standalone'` in `next.config.ts` to get a self-contained bundle.

Option 3: Docker

Package your app into a container for Kubernetes or any OCI-compatible platform:

FROM node:22-alpine AS runner
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000
CMD ["node", "server.js"]

Multi-Zone Deployments

For multi-zone setups, deploy each zone independently. The marketing zone acts as the reverse proxy with the `rewrites()` config pointing to the production domains of blog and dashboard zones.

Use environment variables to switch between local dev (`localhost:3001`) and production (`blog.acmecorp.com`) domains.

CI/CD

Set up a pipeline that: 1. Runs `npm run lint` and tests 2. Runs `next build` to catch build errors 3. Deploys to staging on PR 4. Deploys to production on merge to main

GitHub Actions + Vercel handles this out of the box.