PM2
Production process manager for Node.js applications. PM2 provides process daemonization, automatic restart on crash, cluster mode (multi-core load balancing), log management, startup scripts, and a monitoring dashboard. The most-used Node.js production deployment tool for bare-metal and VM deployments before container/Kubernetes adoption. PM2 still dominates non-containerized Node.js deployments.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Process manager with root-level capabilities on startup setup. Ecosystem config files may contain environment variable secrets — secure permissions on ecosystem.config.js. PM2 API endpoint (if enabled) should be firewalled.
⚡ Reliability
Best When
Deploying Node.js services to Linux VMs or bare-metal servers without container infrastructure — PM2 provides production-grade process management with minimal setup.
Avoid When
Using Docker or Kubernetes — container orchestration handles process management better than PM2 inside containers.
Use Cases
- • Deploy Node.js agent services to production VMs with automatic restart on crash, startup persistence, and log rotation via PM2
- • Enable multi-core CPU utilization for Node.js agent services using PM2 cluster mode without writing cluster code
- • Monitor running agent processes in real-time via pm2 monit — CPU, memory, restart count, uptime for each process
- • Manage zero-downtime deployments for agent services using PM2 reload which gracefully restarts cluster workers one by one
- • Configure agent service environment variables and startup parameters declaratively using PM2 ecosystem.config.js
Not For
- • Container-based deployments (Docker, Kubernetes) — use Docker's restart policies or Kubernetes liveness probes instead of PM2 inside containers
- • Complex orchestration — Kubernetes handles scaling, health checks, and rollbacks better than PM2 at scale
- • Windows production servers — PM2 on Windows has known stability issues; use Windows Service wrappers or containerization
Interface
Authentication
No auth for local PM2. PM2 Plus (cloud dashboard) requires API keys. Local PM2 daemon uses Unix socket authentication via user permissions.
Pricing
PM2 core is open source and free. PM2 Plus adds cloud dashboard, alerting, and distributed monitoring. Core process management features need no account.
Agent Metadata
Known Gotchas
- ⚠ PM2 cluster mode uses Node.js cluster module — only HTTP/TCP servers work correctly with cluster; non-HTTP agent processes should use fork mode, not cluster
- ⚠ PM2 saves process list with pm2 save — without this, processes don't restart after server reboot even with pm2 startup configured; always save after changes
- ⚠ PM2 log rotation must be configured via pm2-logrotate module — by default logs grow indefinitely and fill disk in long-running production deployments
- ⚠ ecosystem.config.js env_production variables require --env production flag — pm2 start ecosystem.config.js without --env uses default env variables, not env_production
- ⚠ PM2 inside Docker containers is an antipattern — PM2 adds overhead and Docker already handles restart policies; use CMD or ENTRYPOINT directly in Dockerfile
- ⚠ pm2 delete removes the process from PM2 management but pm2 save after delete is required — without save, deleted processes restart after server reboot until save is called
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for PM2.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-07.