Heroku | Integration | PM2 Plus Documentation

Monitor your Node.js app in Heroku

In seconds, this tutorial will show you how to monitor a Node.js application with PM2 Plus in Heroku.

We assume that your app has already been wrapped with PM2. If not, follow the PM2 Heroku Tutorial.

Create an account

Register here.

In order to connect PM2 to the dashboard, you need to add your public and private keys in the environment.

To add your keys, run:


You can access your keys at the top right of your dashboard

Set the server name in PM2 Plus

Set the PM2_MACHINE_NAME environment variable to specify a server name:

heroku config:set PM2_MACHINE_NAME=heroku-server

The default server name is the hostname (HOST environment variable) with a few random characters.

Be careful, in case of duplicate hostnames the dashboard will receive data from both instances and flicker.

Next Steps

Complete your dashboard configuration.