Article Details

Haseeb

Haseeb

CEO

A complete guide to deploying and managing Next.js apps on a VPS using Node.js and PM2.

Published
September 19, 2025
Reading time
1 min read
Category
Hosting

Topics

#javascript#nextjs#vps

Share Article

Deploying Next.js Apps on VPS with PM2
Hosting

Deploying Next.js Apps on VPS with PM2

Deploying Next.js on VPS with PM2

To run a Next.js app on your VPS:

  1. 2
    Build your app using npm run build
  2. 4
    Start with pm2 start npm --name "nextjs-app" -- run start
  3. 6
    Enable PM2 startup script for auto-restart

This ensures your Next.js app stays live even after server restarts.