← Back to all services
Process Managers

PM2 Node.js Process Manager Configuration

pm2 systemctl: pm2-{user} (after pm2 startup)

Production process manager for Node.js. Clustering, load balancing, monitoring.

🔌 Default Port

N/A
N/A
Manages app ports, doesn't listen itself

📦 Installation Command

npm install -g pm2

⚙️ Configuration Files

  • ecosystem.config.js (project-level)
  • ~/.pm2/conf.js

📂 Default Directories

  • config: ~/.pm2
  • data: ~/.pm2
  • logs: ~/.pm2/logs
  • pids: ~/.pm2/pids

🔐 Default Credentials

Username:N/A
Password:N/A
💡 Runs as installing user. Use pm2 startup to configure system service.

📌 Dependencies

nodejsnpm

⚠️ Conflicts

N/A Port: N/A

✅ Works With

nodejspythonbash scriptsany executable

🛡️ Security Notes

Use non-root user, set max_memory_restart, configure log rotation

❓ Frequently Asked Questions

What port does PM2 use?
PM2 web interface uses port 9615 when pm2-web or pm2 plus is enabled.
How to start app with PM2?
Run: pm2 start app.js or pm2 start ecosystem.config.js
How to enable PM2 on startup?
Run: pm2 startup, then pm2 save