Our Next.js templates deploy on any platform that runs Node 20. We test heavily on Vercel and Render.
Vercel
Push the code to a Git repo.
Import the project in Vercel.
Add environment variables (the same set as local).
Vercel runs
npm install && npm run buildautomatically.Done — you'll get a deploy URL and free TLS.
If your product uses Prisma, add "postinstall": "prisma generate" to package.json so Vercel rebuilds the client on every deploy.
Render / Fly / Railway
All three support Next.js 14 standalone output. Set the build command to npm run build and the start command to npm run start. Configure the same env vars and a Postgres connection string.
Self-hosted (AWS, DigitalOcean, bare metal)
Bring pm2 or systemd to keep the Node process alive. Run behind nginx or a load balancer for TLS. Make sure your NEXT_PUBLIC_BASE_URL matches the public URL the world sees.
Common gotchas
Image domains: add your CDN domain to
next.config.mjs→images.remotePatterns.Database SSL: Neon, Supabase, and most managed Postgres providers require
?sslmode=requirein the URL.Background jobs: serverless platforms shut idle workers down — use a queue or cron service for long-running tasks.