All processes start the same.

pm2 start /var/www/example.org/index.js –name=example-website


This applies to any node process, you only need to specify the correct path.

README has all the instructions:

  • Install system packages
  • Upload project files to any directory on your server, we store our project in /var/www
  • You can create a new directory called /bot-example and upload the extracted archive there
  • Create a new .env file and add TOKEN=your-token
  • Install npm pagaes, npm i
  • cd into the directory and run: pm2 start index.js --name=bot-example

To stop the running process: pm2 stop bot-example

To remove it: pm2 delete example-website