# Is a flows\_cred.json created on one node-RED instance valid for a different node-RED instance too?

**URL:** <https://discourse.nodered.org/t/is-a-flows-cred-json-created-on-one-node-red-instance-valid-for-a-different-node-red-instance-too/73918>\
**Category:** General\
**Tags:** docker\
**Created:** [19 January 2023 14:50 UTC](https://discourse.nodered.org/t/is-a-flows-cred-json-created-on-one-node-red-instance-valid-for-a-different-node-red-instance-too/73918 "2023-01-19T14:50:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)\
**Post date:** [19 January 2023 14:50 UTC](https://discourse.nodered.org/t/is-a-flows-cred-json-created-on-one-node-red-instance-valid-for-a-different-node-red-instance-too/73918/1 "2023-01-19T14:50:11Z")

</div>

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`.

---

<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:** [19 January 2023 14:57 UTC](https://discourse.nodered.org/t/is-a-flows-cred-json-created-on-one-node-red-instance-valid-for-a-different-node-red-instance-too/73918/2 "2023-01-19T14:57:33Z")

</div>

> [@Shan](#):
>
> 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.

---

<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 February 2023 14:58 UTC](https://discourse.nodered.org/t/is-a-flows-cred-json-created-on-one-node-red-instance-valid-for-a-different-node-red-instance-too/73918/3 "2023-02-02T14:58:20Z")

</div>

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