PM2 Node.js Production Process Manager with Load Balancing
PM2 is a production-grade process manager for Node.js and Bun applications with a built-in load balancer. It keeps applications alive forever, enables zero-downtime reloads, and provides comprehensive process monitoring with cluster mode support.
Installation
Use the upstream install or setup path that matches your environment:
- $ npm install pm2 -g
- RUN npm install pm2 -g
- $ npm install pm2@latest -g
Requirements and caveats from upstream:
- PM2 is a production process manager for Node.js/Bun applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin t...
- PM2 is constantly assailed by a comprehensive test suite.
- Works on Linux, macOS, and Windows. Supports Node.js 18+ and Bun 1+.
Basic usage or getting-started notes:
Source: https://github.com/Unitech/pm2
Extracted from upstream docs: https://raw.githubusercontent.com/Unitech/pm2/HEAD/README.md