Deployment

The starter deploys to Vercel in zero config. It also runs anywhere Node.js 20+ is supported: Docker, Railway, Fly.io, your own VPS.

Vercel (recommended)

1. Push to GitHub

git remote add origin git@github.com:you/your-repo.git
git push -u origin main

2. Import on Vercel

Go to vercel.com/new, pick your repo. Vercel auto-detects Next.js and uses the right build command.

3. Set environment variables

In the Vercel dashboard → Settings → Environment Variables:

VariableRequiredValue
NEXT_PUBLIC_APP_URLyeshttps://yourdomain.com
NEXT_PUBLIC_GSC_VERIFICATIONnoGoogle Search Console token

4. Deploy

Vercel builds and deploys on push. Production domain is *.vercel.app by default: add your custom domain in Settings → Domains.

Docker

A Dockerfile isn't bundled (to keep scope minimal). Here's a standard one:

FROM node:20-alpine AS base
RUN corepack enable

FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

FROM base AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build

FROM base AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package.json ./
COPY --from=deps /app/node_modules ./node_modules
EXPOSE 3000
CMD ["pnpm", "start"]

Static export (Cloudflare Pages / S3)

If you need a fully static site (no Next.js server), add to next.config.ts:

export default {
  output: "export",
};

Then pnpm build produces out/: upload to any static host. Caveat: OG images via next/og require a runtime; static export disables them. Bake a static /opengraph-image.png into public/ instead.

Env checklist

Before your first production deploy:

  • NEXT_PUBLIC_APP_URL matches your production domain
  • Every config email in src/config/brand.ts is a real inbox you monitor
  • Legal pages have your company name (not "Your Company" placeholder)
  • Footer social links go to your actual accounts (not yourcompany placeholders)
  • Replace public/logo/*.svg with your brand logo
  • Replace src/app/favicon.ico with your favicon

Post-deploy checks

  • Visit /sitemap.xml: should list real production URLs
  • Visit /robots.txt: should reference production sitemap
  • Visit /opengraph-image: OG card should render
  • Submit sitemap to Google Search Console
  • Run a Lighthouse audit: target 95+ on Performance, SEO, Accessibility

Performance notes

  • Static pages (home, blog list, docs list) pre-render at build time
  • Blog posts and doc pages use ISR with 1-hour revalidation: writes are cheap
  • next/font pre-loads fonts and sets font-display: swap to avoid FOIT
  • Turbopack dev server is already on; production build is the standard webpack-based Next.js compiler

Next