Docs / Programming & Development / How to Install and Use PM2 for Node.js

How to Install and Use PM2 for Node.js

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 225 views · 1 min read

PM2 is a production process manager for Node.js that keeps your apps running.

Install

npm install -g pm2

Start Your App

pm2 start app.js --name myapp

Common Commands

pm2 list                    # List all processes\npm2 stop myapp              # Stop app\npm2 restart myapp            # Restart app\npm2 delete myapp             # Remove app\npm2 logs myapp               # View logs\npm2 monit                   # Real-time monitor

Startup on Boot

pm2 startup\npm2 save

Cluster Mode

pm2 start app.js -i max     # Use all CPU cores

Was this article helpful?