Install pm2

With yarn:

yarn global add pm2

With npm:

npm install pm2 -g

With debian, use the install script:

apt update && apt install sudo curl && curl -sL | sudo -E bash -

With docker, follow this tutorial.

CLI autocompletion

By default, CLI autocompletion is not installed with PM2, we recommend it:

pm2 completion install

Source map support

Source map files are autodetected by default if they are present ( for app.js).

What are source map files ? If using Babel, Typescript or any other Javascript superset, you may have noticed that stacktraces are not meaningful, errors not pointing to the right line. Source map files can be used to solve this problem.


Keep your pm2 up to date with:

npm install pm2 -g && pm2 update

pm2 update is necessary in order to refresh the PM2 daemon.

Next Steps

Ecosystem File