PM2 don't restart automaticaly after system reboot
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hey there!
I'm really embarrassed with this problem: pm2 don't restart after a system crash (or just a simple system reboot).
I had read the documentation and maked the stratup strategy like that:
- Add my NodeJS conf into ecosystem file
- Start this ecosystem file with pm2
- Generate a startup script with
pm2 startup - Copy/paste the command to add the script on systemd
- Save the state with
pm2 save - Try a reboot and see that pm2 is not up after reboot
If i do a systemctl status , i see the error bellow:

But, if i do manually pm2 resurrect, pm2 start and my app is alive. .
Thank's a lot for your help!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pm2 startup and pm2 save flow, then inspect the generated systemd service using systemctl status and compare it with manually running pm2 resurrect. Reproduce the reboot scenario and verify that the saved ecosystem starts automatically and the application is alive afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100