Copy flows_compName.json to another computer

Hello nodered experts,

This is actually a question not related to programming but I am hoping that someone can help me here.

I have nodered running locally at my development Laptop (installed on specific folder). I used to copy this folder on a separate computer (production computer).

Now my problem is, everytime I copied it, my configuration inside the nodered was reset. For example I have an influxDB node, my condiguration of the influxdb server of username and password was reset, so I need to type in again the credentials.

So my question is..
Is it possible to retain those information when I copied nodered to separate computer?

Thanks in advance.

With kind regards,

You need to copy the credentials file too as that is where the user/pwd details are saved (encrypted). That is flow_<host>_cred.json. You also need to make sure the two systems have the same credentials secret used to encrypt the data. You may be setting that in settings.js.

Thanks Colin!

You mean the password that should have same password is the AuthAdmin settings ?

With kind regards,

No, this is not about adminAuth. This is about the credentialSecret setting.

When Node-RED starts, if you have not set credentialSecret yourself, there will be a big warning message telling you to set it.

If you haven't done so, then it will be using a randomly generated key to encrypt the credentials file.

  1. Set credentialSecret in your settings file to some random string.
  2. Restart Node-RED.
  3. Make a minor change in the editor and hit deploy.
    It will reencrypt your credentials file using your preferred key.

Once you've done all that, you can copy your flow/creds files to another machine and ensure the credentialSecret value has been set in the settings file. You will also need to edit ~/.node-red/.config.runtime.json and delete the _credentialSecret entry.

1 Like

Oh I see..

Thanks for this info!

Never knew about this secret credentials.

With kind regards,

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