PM2 is a production process manager for Node.js and Bun applications with a built-in load balancer.
PM2 solves the problem of keeping applications alive and managing them in production environments. It daemonizes applications, monitors their health, and automatically restarts them if they crash. The tool includes a cluster mode that distributes HTTP, TCP, and UDP traffic across multiple Node.js processes running on available CPU cores, enabling load balancing and zero-downtime reloads. This approach allows developers to update applications without service interruption by gracefully restarting processes one at a time while others continue handling requests.
Developers should choose PM2 if they need straightforward process management for Node.js or Bun applications in production. It suits projects ranging from simple single-process applications to multi-core deployments that benefit from load balancing. The tool works across Linux, macOS, and Windows, supports Node.js 18 and later as well as Bun 1 and later, and can manage applications written in various languages including Python and Ruby. PM2 provides command-line utilities for listing running applications, viewing logs, monitoring custom metrics, and managing individual processes through start, stop, restart, and delete operations.
The project maintains a comprehensive test suite that validates functionality across supported environments. Development activity shows consistent attention to reliability and compatibility across multiple platforms and runtimes.