Skip to main content
NextStarter
Menu

Deployment

Deploy to Vercel or any Node host, and the checks worth running once the site is live.

Before you deploy

  • Set the site variables on your host. NEXT_PUBLIC_SITE_URL must be the production URL, because canonical URLs, the sitemap, and social share images are built from it.
  • Set a privacy contact.
  • Run npm run build locally once. It catches anything the host would fail on.

Vercel

Vercel detects Next.js and needs no build settings.

  1. Push the project to GitHub, GitLab, or Bitbucket.
  2. In Vercel, choose Add New → Project and import the repository.
  3. Add your variables under Settings → Environment Variables, for Production and, if you want pull-request previews to look right, for Preview.
  4. Deploy.

Vercel reads the Node version from engines in package.json, which is pinned to 24 to match .node-version.

Any Node host

The starter is a standard Next.js app and runs anywhere Node 24 does: a VM, a container, Render, Fly.io, Railway, and so on.

npm ci
npm run build
npm run start   # serves on $PORT, default 3000

Put it behind a reverse proxy such as nginx or Caddy to terminate TLS, and set the environment variables before the build step. There is no Dockerfile in the repository. A standard multi-stage Node 24 build works, and for the smallest image you can enable output: "standalone" in next.config.ts and copy only the standalone output.

After the first deploy

  • /robots.txt and /sitemap.xml load on the live domain, and the URLs in them use that domain.
  • Pasting a page link into a chat app or social network shows the right title, description, and image.
  • /privacy shows your contact address and describes the analytics you actually configured.
  • If analytics is on, page views appear in PostHog after a few minutes. If they do not, check cookieless server hash mode.
  • The CI workflow passes on main, with your site URL and repository variables set.