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.

Evaluated Mar 07, 2026 (0d ago) v5.x
Homepage ↗ Repo ↗ Developer Tools process-manager node deployment cluster daemon monitoring log-management startup
⚙ Agent Friendliness
63
/ 100
Can an agent use this?
🔒 Security
79
/ 100
Is it safe for agents?
⚡ Reliability
84
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
78
Auth Simplicity
90
Rate Limits
90

🔒 Security

TLS Enforcement
88
Auth Strength
78
Scope Granularity
72
Dep. Hygiene
78
Secret Handling
78

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

Uptime/SLA
90
Version Stability
82
Breaking Changes
80
Error Recovery
85
AF Security 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

REST API
Yes
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No auth for local PM2. PM2 Plus (cloud dashboard) requires API keys. Local PM2 daemon uses Unix socket authentication via user permissions.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

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

Pagination
none
Idempotent
Full
Retry Guidance
Documented

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

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6328
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered