# Save nodes password for backups

**URL:** <https://discourse.nodered.org/t/save-nodes-password-for-backups/79402>\
**Category:** General\
**Tags:** security\
**Created:** [25 June 2023 12:16 UTC](https://discourse.nodered.org/t/save-nodes-password-for-backups/79402 "2023-06-25T12:16:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre\_x](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@andre\_x](https://discourse.nodered.org/u/andre_x)\
**Post date:** [25 June 2023 12:16 UTC](https://discourse.nodered.org/t/save-nodes-password-for-backups/79402/1 "2023-06-25T12:16:07Z")

</div>

Hi all!  
When I restore a flow from backup I have to reinsert all the password of nodes (MQTT, email, etc.).  
Is there a way to save them?  
Thanks!

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [25 June 2023 12:28 UTC](https://discourse.nodered.org/t/save-nodes-password-for-backups/79402/2 "2023-06-25T12:28:20Z")

</div>

I think it depends how you restore from backup.  
Your flows are saved in flows.json and the passwords etc in flows\_cred.json.  
So if you restore both of these files it should all be working.

If instead you are backing up with export and restoring with import, the credentials are not exported.  
This is a good thing if you are posting your flows in public, eg this forum.  
Perhaps there should be an option in the export dialog to export credentials as well as the flows.

Some nodes do let you override the stored password with a message property. You can use context variables for this -  
Flow 1 set global.emailpassword "Password1"  
Flow 2 set msg.password from global.emailpassword

---

<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:** [25 June 2023 13:18 UTC](https://discourse.nodered.org/t/save-nodes-password-for-backups/79402/3 "2023-06-25T13:18:11Z")

</div>

As well as restoring the credentials file, you also need to make sure the Secret is set the same in the restored system.

For backups you should generally backup everything in your .node-red folder except for the node\_modules folder.  
If restoring to a new system, then after restoring .node-red, go into that folder and run  
`npm install`  
which will regenerate the node\_modules folder and install any missing nodes.

---

<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:** [24 August 2023 13:18 UTC](https://discourse.nodered.org/t/save-nodes-password-for-backups/79402/4 "2023-08-24T13:18:56Z")

</div>

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