Skip to content

Instantly share code, notes, and snippets.

@ofstudio
Created September 25, 2017 22:47
Show Gist options
  • Save ofstudio/aa33af60987298d63c17c51d7635eaba to your computer and use it in GitHub Desktop.
Save ofstudio/aa33af60987298d63c17c51d7635eaba to your computer and use it in GitHub Desktop.
PM2 initial setup on Ubuntu 16.04
# Replace USERNAME with user name
sudo su -c 'env PATH=\$PATH:/usr/bin pm2 startup ubuntu -u USERNAME --hp /home/USERNAME'
sudo env PATH=\$PATH:/usr/bin pm2 logrotate -u USERNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment