# Automatic update of Flows on a 2nd machine?

**URL:** <https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143>\
**Category:** General\
**Created:** [14 January 2021 18:30 UTC](https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143 "2021-01-14T18:30:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)\
**Post date:** [14 January 2021 18:30 UTC](https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143/1 "2021-01-14T18:30:55Z")

</div>

I wrote an NR application that manages a Photovoltaic installation.  
I also installed it at a friend's house that has almost the same inverter.

For the flow updates, I do it in the following way:

- I stop Node Red
- I make a copy of his file; flows\_Raspberry.json
- I completely erase this one
- I restart Node Red, which creates an empty file, so the flows are empty too.
- I export all my flows in a flow.json file and I import them on his Pi via the NR import function.

It works. I do it this way because I have found that the layout can be damaged if I selectively delete a flow and then import it.  
But, I have nodes that **have specific values** for its configuration, such as: the mail node, or telegram node, etc...  
So with my manipulation, after importing the flows I have to **define again** its own values such as its email, password, etc...

**So my question is:**  
Is there a much better way to update your configuration in a more fluid way and without having to retype your information at each update?

Oops, I've been a bit long, but I hope it's clear enough 🙂

---

<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:** [14 January 2021 20:17 UTC](https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143/2 "2021-01-14T20:17:41Z")

</div>

If you want to copy over all of your flows onto another system - replacing everything that was there, then the easiest way to do it would be to copy over you flow and credentials files.

You are losing the passwords because Node-RED doesn't export credentials from the editor. But if you copy over your credentials file, then that should all just work.

You will need to make sure both of your systems have the same `credentialSecret` setting - as that is used to encrypt/decrypt the credentials file.

---

<div class="post-metadata">

**Author:** ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)\
**Post date:** [15 January 2021 12:50 UTC](https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143/3 "2021-01-15T12:50:19Z")

</div>

Thanks for the help.

I have to say that I don't quite understand.  
Are all credentials/passwords stored in this flows: **Raspberry\_cred.json** file?  
If so I just have to keep this file and not overwrite it.  
If no, the credentials for the mail node for example are stored somewhere in a file in the .node\_red tree ?  
I didn't know the existence of this key **credentialSecret** encryption key located in the settings.js file.  
So I can define a sentence for encryption, but I don't see how this can help me on the other machine.  
I obviously don't know my friend's password for example and so I would like to keep it somehow when I make my update.

P.S :The 2nd Pi is not a clone of mine. It has another name and another config.

---

<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:** [16 March 2021 12:50 UTC](https://discourse.nodered.org/t/automatic-update-of-flows-on-a-2nd-machine/39143/4 "2021-03-16T12:50:31Z")

</div>

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