How to Self-Host a Next.js App on a VPS (No Vercel)

A practical guide for deploying your Next.js app on your own virtual private server.

R

Written by

Redoxx

Read Time

6 min read

Posted on

2025-06-01

A practical guide for deploying your Next.js app on your own virtual private server.

Self-Hosting Next.js

Deploying your Next.js app outside of Vercel gives you more control and lower cost in the long run.

🧰 Requirements

  • A Linux VPS (e.g., Ubuntu)
  • Node.js + PM2 or Docker
  • Nginx (for SSL and reverse proxy)

🛠 Basic Steps

  1. npm run build
  2. Serve with next start
  3. Use Nginx to proxy port 80/443 to 3000
  4. Add SSL via Let's Encrypt

Use Docker for better scaling and process management.