Automatic update of Flows on a 2nd machine?

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 :slightly_smiling_face:

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.

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.