# How to change a node in a stream file

**URL:** https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627
**Category:** General
**Created:** [3 June 2021 05:24 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627 "2021-06-03T05:24:33Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![lei1](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lei1](https://discourse.nodered.org/u/lei1)
#### Post date: [3 June 2021 05:24 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/1 "2021-06-03T05:24:33Z")

</div>

How can I change the node in the stream file and then restart nodered to detect the changed part and redeploy it?

---

<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: [3 June 2021 06:16 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/2 "2021-06-03T06:16:05Z")

</div>

I do not understand your question. Can you expand your explaination.

---

<div class="post-metadata">

### Author: ![lei1](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lei1](https://discourse.nodered.org/u/lei1)
#### Post date: [3 June 2021 06:32 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/3 "2021-06-03T06:32:38Z")

</div>

thank you  
I now have a requirement：  
Take a nodered stream running on a host, send it to a nodered on another host, and let it run. (The existing method is to import the stream manually and then import the stream in another nodered, but I want to be able to deploy the stream automatically on that other host)

---

<div class="post-metadata">

### Author: ![lei1](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lei1](https://discourse.nodered.org/u/lei1)
#### Post date: [3 June 2021 06:55 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/4 "2021-06-03T06:55:28Z")

</div>

The simplest to understand. How to automate the stream import function, and automatic deployment.

---

<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: [3 June 2021 07:07 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/5 "2021-06-03T07:07:43Z")

</div>

I am confused on your use of the word ‘stream’. I believe you mean the ‘flow’.

‘Flow’ is used to describe an instance of all the nodes that are connected together on a tab in the editor AND it also describes the contents of everything in the editor.

There is no built-in method to automatically send a flow to another device and have it import and deploy.

There have been similar questions similar to yours and you can do a search of the forum to see what is happening with them.

---

<div class="post-metadata">

### Author: ![lei1](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lei1](https://discourse.nodered.org/u/lei1)
#### Post date: [3 June 2021 07:19 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/6 "2021-06-03T07:19:22Z")

</div>

How can I call the import function function in the editor? I can use external node.js to embed nodered and control the automation of the import

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [3 June 2021 07:26 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/7 "2021-06-03T07:26:32Z")

</div>

You cannot remotely import flows into the editor.

You can use the http admin API to update the flows in another runtime: [Admin API Methods : Node-RED](https://nodered.org/docs/api/admin/methods/)

---

<div class="post-metadata">

### Author: ![lei1](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lei1](https://discourse.nodered.org/u/lei1)
#### Post date: [3 June 2021 07:52 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/8 "2021-06-03T07:52:01Z")

</div>

How do I call the import function in the editor?

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

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [3 June 2021 08:01 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/9 "2021-06-03T08:01:37Z")

</div>

You cannot, from node.js/runtime code, import flows into the editor.

Do you mean "how can I set/change the flows used by Node-RED in the runtime?"

If you are trying to do this remotely, the HTTP Admin API I have linked you to is what you use. The `/flows` API is what the editor uses when you click the Deploy button.

---

<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: [2 August 2021 08:02 UTC](https://discourse.nodered.org/t/how-to-change-a-node-in-a-stream-file/46627/10 "2021-08-02T08:02:05Z")

</div>

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