How to change default directory for invocation of pm2

Viewed 232

I've got a nodejs server that is being managed to pm2, but it is running as a different user (www-data, via su). I need to start a second server run as my own user id, but when I try to start it, I get an access error as ~/.pm2 is owned by www-data, not myself. I tried using the --log option to pm2, but that doesn't let me set the global pm2 directory, just the log file.

How can I specify a different directory for pm2 to use?

0 Answers
Related