Is a flows_cred.json created on one node-RED instance valid for a different node-RED instance too?

I have some node-RED flow that I create via a Docker container, e.g., node-red-instance-1. Now I can copy the respective flows.json and flows_cred.json file from node-red-instance-1's volume mount and I wish to spin up another container e.g., node-red-instance-2 and mount the respective JSON files to the volume of the container.

Will the node-red-instance-2 be able to decrypt the flows_cred.json file and fill out the respective credentials in the flow again?

This is with an assumption that I have not set any particular key value in the settings.js.

If you haven't set your own credentialSecret in the settings file, then both instances will have generated their own key and stored it in .config.runtime.json file.

Meaning instance-2 will have a different key to instance-1 and it will not be able to decrypt.

You could copy the value from .config.runtime.json (stored as _credentialSecret) into instance-2's settings.js file.

Or just set a proper value in all of your settings file.

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