# Credentials keep disappearing

**URL:** <https://discourse.nodered.org/t/credentials-keep-disappearing/35934>\
**Category:** General\
**Created:** [14 November 2020 23:33 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934 "2020-11-14T23:33:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![patricker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patricker/32/23863_2.png) [@patricker](https://discourse.nodered.org/u/patricker)\
**Post date:** [14 November 2020 23:33 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/1 "2020-11-14T23:33:43Z")

</div>

The credentials for all of my various NodeRed connections keep disappearing. MQTT, Email user/pass, Google Home, etc... Any node that stores credentials will have it's credentials wiped out from time to time when I make a flow change. Restarting NodeRed will also cause it to lose the credentials.

I've tried running NodeRed from the command line so I can easily see what the logs show, but there is no error message when the credentials.

The flow.json I'm running used to be part of a NodeRed server with Projects enabled. I turned off projects and migrated the flow. Everything runs fine, until the credentials disappear...

Any ideas why this is happening?

---

<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:** [14 November 2020 23:39 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/2 "2020-11-14T23:39:22Z")

</div>

What version of Node-RED are you using?

Have you set `credentialSecret` in your settings file? If not, it is possible something is corrupting the .config.json file that stores the auto-generated encryption key. If that gets lost, the runtime won't be able to decrypt the credentials file and they will get reset - the runtime does log in the console if that happens.

This is why we strongly recommend setting `credentialSecret`

---

<div class="post-metadata">

**Author:** ![patricker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patricker/32/23863_2.png) [@patricker](https://discourse.nodered.org/u/patricker)\
**Post date:** [14 November 2020 23:59 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/3 "2020-11-14T23:59:22Z")

</div>

Yes, I do have a credentialSecret in my settings.js file. I'm running v1.0.5.

---

<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:** [15 November 2020 09:25 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/4 "2020-11-15T09:25:09Z")

</div>

Is this a local installation or cloud? What OS and how did you install? Are you using Docker?

---

<div class="post-metadata">

**Author:** ![patricker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/patricker/32/23863_2.png) [@patricker](https://discourse.nodered.org/u/patricker)\
**Post date:** [15 November 2020 21:15 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/5 "2020-11-15T21:15:37Z")

</div>

I resolved this, but I'll answer the questions just in case it's helpful to someone in the future.

This was a local install on Raspbian (buster). Installed via NPM.

I resolved my issue by exporting my flow json, deleting the entire flow json file, and re-importing it all. Once I did that, credentials started saving as expected again.

---

<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:** [14 January 2021 21:15 UTC](https://discourse.nodered.org/t/credentials-keep-disappearing/35934/6 "2021-01-14T21:15:42Z")

</div>

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