PM2 doesn't start after server reboot
Hi,
I have a weird problem, if I restart the remote server and do not log in after wards to it the pm2 doesn't start automatically, however if after restart I log in to the server the pm2 starts as expected.
What can be the issue? I'm using Windows Server 2012 R2.
+1
Yes same here. I am using it on a Win10 SBC. PM2 only seem to start when I log in with a user.
Everyone who is looking this issue, I have found this article: https://blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75 I have implemented Solution 2 (installing pm2-windows-service), and it works. Now I have a system service and Node Red is being started on Windows startup.
I used an easier solution - created a windows scheduled task which runs "pm2 resurrect" on start up as SYSTEM user. Works without anyone having to log in.
I used an easier solution - created a windows scheduled task which runs "pm2 resurrect" on start up as SYSTEM user. Works without anyone having to log in.
did you create a .bat file that only contains "pm2 resurrect" in it and set it to run on startup from Win Task Scheduler? Is that what you mean?