• Support
  • PM2 Manager empty after server restart

a month later

node js проекты не сохраняются.
после перезагрузки сервера пропадают
приходиться снова прописывать

5 days later
7 months later

https://gist.github.com/derakula/ab51fa7c14e59a7524bca04c60924922
here is the solution it worked for me
note :
to find files in this solution use aapanel "Files"
to find the code "Change User=undefined" press "ctrl+f" and type what you are searching for
remember that pm2 setting contains two of "'pm2 save && pm2 startup'" please remember to replace both of them


what is inside the link above:

/etc/systemd/system/pm2-undefined.service
Change User=undefined
To User=root

/www/server/panel/plugin/pm2/pm2_main.py
change 'pm2 save && pm2 startup'
to 'pm2 cleardump && pm2 save && pm2 startup -u root'

    Having same issue , thought latest version will fix it

    mohamedemara77 there is a security risk in starting the project by the root user. We will develop the pm2 launcher in the next version to solve this problem

    7 months later

    faced the same problem here, i run pm2 service in terminal it exists but in GUI/pm2 manager it is empty. Still not fixed?

    15 days later

    mohamedemara77

    Here you can see both screenshots:
    Through the terminal I can see all processes

    But when I go to the PM2 Manager, it only shows the running ones

    Even this only happened after I did what Mohamed posted, before that the PM2 Manager said there was no node installed and couldn't see any processes, even though my apps were running.

    11 days ago, when I last restarted the server, everything was working fine, did not touch the panel after that till now, and YES, I did try running the FIX button, with no success.

    3 months later
    2 years later