This package enables PM2 (Process Manager 2) to automatically resurrect its saved process list upon Windows operating system startup. It achieves this by adding a specific entry to the Windows Registry that triggers PM2 on boot, leveraging the `start-on-windows-boot` library for low-level registry manipulation. The current stable version is 1.0.3, indicating a mature and stable utility that is likely in maintenance mode rather than active feature development. Its primary differentiator is its focused solution for automating PM2 process continuity specifically within Windows environments, which is crucial for server stability and uptime after system reboots. It serves as a dedicated tool for system administrators and developers deploying Node.js applications with PM2 on Windows servers.
npm install pm2-windows-startupVerified import paths — ran on the pinned version, not inferred.
Demonstrates global installation of the utility, then how to register PM2 for Windows startup, and finally how to save the current PM2 process list for resurrection.
Run your terminal (Command Prompt, PowerShell, Git Bash) as an Administrator before executing `pm2-startup install`.
Always execute `pm2 save` immediately after making changes to your PM2 process list (e.g., starting new apps, deleting apps) to ensure those changes are reflected on the next system reboot.
Test thoroughly with your target Node.js version. If issues arise, consider alternatives or checking for forks that support newer Node.js runtimes, as the package itself hasn't seen recent updates.
Close your current terminal, then restart it by right-clicking and selecting 'Run as administrator'. Execute `pm2-startup install` again.
Ensure the current user has write permissions to the `.pm2` directory (usually in the user's home folder). If this persists, try reinstalling PM2 and `pm2-windows-startup` globally.
First, ensure `pm2-startup install` completed successfully (run as Administrator). Then, make sure you've started your applications with PM2 and explicitly run `pm2 save` to persist the process list.