Multiple instances of node-red using PM2?



I run node-red with pm2 using :-

pm2 start node-red

which works fine.

I can manually start a second instance with its own settings file from the command line :-

node-red -s node-red2/settings.js -u node-red2 &

and this works fine . . .

Any ideas how I can manage the second instance through pm2 aswell, so it autostarts etc. ?

I've tried

pm2 start node-red --name "node-red2" --node-args="-s node-red2/settings.js -u node-red2"

which errored trying to start node-red2 and also had the interesting side effect of killing the initial node-red instance :wink:

any ideas appreciated,


Hi Gav,

The first thing I would try is setting the port number on the pm2 call ... i.e. -p. If the two instances of node-red are fighting for the same port that might be the problem.


You will need to create a process file with your 2 instances, see