# Propblem running node-red with pm2 cluster mode

**URL:** <https://discourse.nodered.org/t/propblem-running-node-red-with-pm2-cluster-mode/32228>\
**Category:** General\
**Created:** [30 August 2020 18:08 UTC](https://discourse.nodered.org/t/propblem-running-node-red-with-pm2-cluster-mode/32228 "2020-08-30T18:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![divyanshverma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/divyanshverma/32/34271_2.png) [@divyanshverma](https://discourse.nodered.org/u/divyanshverma)\
**Post date:** [30 August 2020 18:08 UTC](https://discourse.nodered.org/t/propblem-running-node-red-with-pm2-cluster-mode/32228/1 "2020-08-30T18:08:03Z")

</div>

In my current setup, I am running node-red using pm2 in cluster mode.  
When I deploy changes, I realized that only the current instance picks up the changes while other instance is still running the old version of the flow.

How can I make the other instance purge the old version of the flow and reload the new one ?

Node version : 12.16.1  
Node-red : 1.0.6

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 August 2020 19:11 UTC](https://discourse.nodered.org/t/propblem-running-node-red-with-pm2-cluster-mode/32228/2 "2020-08-31T19:11:03Z")

</div>

Maybe you can use PM2's watch feature to run a script? Said script would, when your flow changes, copy it to the other nodes and then restart them?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 October 2020 19:11 UTC](https://discourse.nodered.org/t/propblem-running-node-red-with-pm2-cluster-mode/32228/3 "2020-10-30T19:11:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
