# Transfer mqtt username/password as part of flow.json file

**URL:** <https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161>\
**Category:** General\
**Created:** [14 April 2021 12:19 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161 "2021-04-14T12:19:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![proloy03](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@proloy03](https://discourse.nodered.org/u/proloy03)\
**Post date:** [14 April 2021 12:19 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/1 "2021-04-14T12:19:14Z")

</div>

I have a node red flow that involves sending data to a mqtt server. But the problem I am facing is when I export that flow and try to install that in another node-red instance it's not receiving the username/password. apart from these two all details are transferred correctly to the new node-red server.

Please let me know how I can transfer the credentials as part of the flow file.

I am using snap to install the node-red in both the servers/machines.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [14 April 2021 12:27 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/2 "2021-04-14T12:27:45Z")

</div>

you also need to copy over the flows\_cred.json file that is in same directory as the flows.json file. They are not stored in the flows file so that they don't get exported by mistake.

---

<div class="post-metadata">

**Author:** ![eddee54455](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eddee54455/32/43350_2.png) [@eddee54455](https://discourse.nodered.org/u/eddee54455)\
**Post date:** [14 April 2021 12:32 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/3 "2021-04-14T12:32:03Z")

</div>

@dceejay

Sorry to jump in... I have a similar query, but the exact opposite...

Could you confirm that all "confidential" data such as api keys etc are held apart from the export... A couple of lads have asked me for flow copies, but I have been dead worried that they would install and end up with my keys...

Ta  
Ed

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2021 13:10 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/4 "2021-04-14T13:10:12Z")

</div>

That depends on whether the nodes you are using have used the credentials feature to store the data. Which nodes are you using that store the keys?

---

<div class="post-metadata">

**Author:** ![proloy03](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@proloy03](https://discourse.nodered.org/u/proloy03)\
**Post date:** [14 April 2021 13:26 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/5 "2021-04-14T13:26:03Z")

</div>

@dceejay thanks for your reply.  
The issue here is I will need to install the flow file once created on multiple instances of the node-red but the credentials will be different each time. Also, I m using the node-red snap.

---

<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:** [13 June 2021 13:26 UTC](https://discourse.nodered.org/t/transfer-mqtt-username-password-as-part-of-flow-json-file/44161/6 "2021-06-13T13:26:38Z")

</div>

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