Monday, 2 July 2018

PM2 run on startup [Ubuntu Server 18.04]

Trying to get PM2 to run on startup, and then have it run Parsoid for a MediaWiki server.After running parsoid, I've attempted to Save the instance and then add it to the startup sequence, with the following commands:sudo pm2 start /usr/local/lib/node_modules/parsoid sudo pm2 save sudo pm2 startup systemd However I've run in to a few issues with PM2 starting, it apparently references files in /home/[user]/.pm2 - going through logs it appears the user does not have access to that (hidden) folder in their own home directory for some reason. CHMOD/CHOWN don't appear to save permission changes post reboot.Of course if PM2 doesn't start than neither does Parsoid and that of course breaks the VisualEditor component of MediaWiki.Ninja Edit: I've also tried the following command as I had read about it on a forum:sudo env PATH=$PATH:/usr/local/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup -u [username] --hp /home/[username]

Submitted July 03, 2018 at 12:45AM by burnbyAdmin

No comments:

Post a Comment