# Multiple Instances of Node Red

**URL:** <https://discourse.nodered.org/t/multiple-instances-of-node-red/5076>\
**Category:** General\
**Created:** [20 November 2018 17:33 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076 "2018-11-20T17:33:43Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![deven2020](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deven2020/32/3901_2.png) [@deven2020](https://discourse.nodered.org/u/deven2020)\
**Post date:** [20 November 2018 17:33 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/1 "2018-11-20T17:33:44Z")

</div>

Good Day all

I am working on a project where i have multiple Raspberry PI. Each PI controls a room where node red install in it. The node red will control devices like smart lights within each room.

I have a created a flow which to be deployed on each of the PI. The flow is same for all of them.

if i make a change in the flow, i need to copy and paste and test in all the PIs. This is time consuming.

Is there a way for me to centrally manage this and push changes to all PIs where node red is installed?

What are other option available in terms of a central node red that communicates to all PIs?

Any help will be much appreciated.

regards  
deven

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [20 November 2018 17:38 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/2 "2018-11-20T17:38:25Z")

</div>

Have a look at the "Projects" feature of Node Red.  
[https://nodered.org/docs/user-guide/projects/](https://nodered.org/docs/user-guide/projects/)

---

<div class="post-metadata">

**Author:** ![deven2020](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deven2020/32/3901_2.png) [@deven2020](https://discourse.nodered.org/u/deven2020)\
**Post date:** [20 November 2018 18:22 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/3 "2018-11-20T18:22:13Z")

</div>

thanks. i will.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 November 2018 20:24 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/4 "2018-11-20T20:24:41Z")

</div>

> [@ghayne](#):
>
> Have a look at the "Projects" feature

I don't think that lets you push to multiple Pis from the controlling one. Certainly using git to store the flow (whether via projects or otherwise) could help as then you just need to run a script on each one that pulls the new flow file and restarts node-red. Then you could run a script on the controller that runs the pull/restart script on all the other ones by using ssh to run a command remotely.

---

<div class="post-metadata">

**Author:** ![deven2020](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deven2020/32/3901_2.png) [@deven2020](https://discourse.nodered.org/u/deven2020)\
**Post date:** [20 November 2018 20:44 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/5 "2018-11-20T20:44:53Z")

</div>

Thanks for the feedback Colin. I am completely new on this. Is there a sample script already available for this?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 November 2018 20:49 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/6 "2018-11-20T20:49:20Z")

</div>

The script is trivial once you get your head round git.

---

<div class="post-metadata">

**Author:** ![deven2020](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deven2020/32/3901_2.png) [@deven2020](https://discourse.nodered.org/u/deven2020)\
**Post date:** [20 November 2018 21:02 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/7 "2018-11-20T21:02:59Z")

</div>

😃ok will do. thanks

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [20 November 2018 22:48 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/8 "2018-11-20T22:48:36Z")

</div>

Another possibility is to use the "Admin APIs" to push a new flow from the master node-red server to multiple slave instances.

Normally, the deploy button does an [Http POST to the internal admin endpoint](https://nodered.org/docs/api/admin/methods/post/flows/) called `/flows` -- here is the [documentation for this and all the other internal admin apis](https://nodered.org/docs/api/admin/methods/). What I have done in the past is to use `http response` nodes to POST the new flow.json to remote node-red instances (running, of course). This causes the remote servers to immediately replace their current runtime flows with the newly posted version and restart their runtimes.

Potentially dangerous -- but very powerful!

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 November 2018 00:24 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/9 "2018-11-21T00:24:33Z")

</div>

This came up 3 weeks ago i believe (at most 4 weeks ago) someone wanting to have a central script that was deployed to multiple Pis - have a look at the ideas in here

> [@Tips For Managing Several Node-Reds?](https://discourse.nodered.org/t/tips-for-managing-several-node-reds/4406):
>
> I have many RPis all running the same Node-Red flow with the same UI. If a revision or update is needed, it must be implemented for every RPi I have. While it is not too bad for two or three, I am on track to having 12 all running the same flow. Are there any tips/tricks or tribal knowledge that could help me speed up the flow updates? Serving all twelve from one instance comes to my mind but I do not believe that would be possible for my situation. Not even sure how it would perform serving …

Craig

---

<div class="post-metadata">

**Author:** ![deven2020](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/deven2020/32/3901_2.png) [@deven2020](https://discourse.nodered.org/u/deven2020)\
**Post date:** [21 November 2018 01:02 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/10 "2018-11-21T01:02:48Z")

</div>

Thanks a lot for guidance. Certainly will give it a go.

I also came to know this option while googling.

Distributed Node Red-Editor from giang nam.

It's ready available contrib in Node Red.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 06:23 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/11 "2018-11-21T06:23:40Z")

</div>

Wow impressive! Thanks for the link!! Would be nice to hear some pros and cons from the other forum members...

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 08:36 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/12 "2018-11-21T08:36:30Z")

</div>

Hey guys,

For anybody interested in the movie, these are the contribution links:

- [DNR editor](https://github.com/namgk/dnr-editor)
- [DNR daemon](https://github.com/namgk/node-red-contrib-dnr)

Looks really cool, but does anybody know what the relationship is to the standard Node-RED flow editor? I assume that both editors have nothing in common? I.e. when something is added in a new release to the standard editor, that won't be available in the DNR editor?

It looks to me that it offers some of the functionality from this [Trello item](https://trello.com/c/J7UDbQVP/66-pluggable-message-routing) on the Node-RED roadmap. But (again) I assume there is no connection whatsoever between the both?

Would be nice to hear some thoughts about it...

Bart

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [22 November 2018 03:31 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/13 "2018-11-22T03:31:06Z")

</div>

I still like the idea of one day having the option to “Deploy To Fleet”

Configure the host names or IP addresses of the node-red instances you would like to deploy to and then click the button. Done.

---

<div class="post-metadata">

**Author:** ![mikeyd0407](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mikeyd0407](https://discourse.nodered.org/u/mikeyd0407)\
**Post date:** [26 November 2018 14:45 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/14 "2018-11-26T14:45:29Z")

</div>

Hi Deven

Advantech have done a lot of work on creating and reading nodes from sources and I wondered if this could be of use. Here are a few links to the relevant youtube channel pages and the NPM source page:

Node-Red Flow Communicator Demo:  
https://www.youtube.com/embed/2JRANG7prSw?feature=oembed&wmode=opaque&list=PLhBpZ8HU3KsQunQSAUigkVK6vR0_Bojtf

Here is a link to the Node-Red flow:

> **[node-red-contrib-flow-dispatcher](https://flows.nodered.org/node/node-red-contrib-flow-dispatcher)**
>
> Node-Red nodes for reading and writing Node-Red flows

And a link to the NPM package page:

> **[node-red-contrib-flow-dispatcher](https://www.npmjs.com/package/node-red-contrib-flow-dispatcher)**
>
> Node-Red nodes for reading and writing Node-Red flows

They also have Node-Red flow Cloner:  
https://www.youtube.com/embed/58aG4UzwIn8?feature=oembed&wmode=opaque&list=PLhBpZ8HU3KsQunQSAUigkVK6vR0_Bojtf

And Node-Red Flow Reader Writer:  
https://www.youtube.com/embed/2JRANG7prSw?feature=oembed&wmode=opaque&list=PLhBpZ8HU3KsQunQSAUigkVK6vR0_Bojtf

Also, Node-Red Flow Communicator Demo:  
https://www.youtube.com/embed/9b_ZajgX29g?feature=oembed&wmode=opaque&list=PLhBpZ8HU3KsQunQSAUigkVK6vR0_Bojtf

Many thanks

Michael

---

<div class="post-metadata">

**Author:** ![namgk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/namgk/32/4050_2.png) [@namgk](https://discourse.nodered.org/u/namgk)\
**Post date:** [27 November 2018 10:32 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/15 "2018-11-27T10:32:18Z")

</div>

Hi guys,

This is Nam, from DNR Editor, I try to keep DNR Editor up to date with upstream (Node-RED) editor as much as I can while being a PhD student.

I also work with FRED if you ever heard of ([fred.sensetecnic.com](http://fred.sensetecnic.com)), DNR was initially an idea of Mike, the co-founder of FRED and a very cool guy. I've been pushing it forward ever since.

Glad to hear it might be of use somewhere.

For the question about multi device deployment, here is a sample flow that can be done through DNR Editor, this will help to deploy the same flow to different device. It's a bit hacky but currently work that way.

The constraints 1, 2, 3 is based on device Id, which you assign when register each device to DNR Editor. The participating Node-RED needs to have node-red-contrib-dnr installed to be able to register to DNR Editor.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8a086fe6b9065494965b1b9b6a44fbd196831f79.png)

The main goal of the project is to assign portions of the flow on different devices. But since nothing prevents you from having multiple clones of the same flow on the same tab, it will work.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 January 2021 20:36 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/17 "2021-01-17T20:36:33Z")

</div>

Please do not post the same question in multiple threads. Since buth posts are over a year old, I will close them and ask you to opn a new thread.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 January 2021 20:36 UTC](https://discourse.nodered.org/t/multiple-instances-of-node-red/5076/18 "2021-01-17T20:36:36Z")

</div>


