# Set password for node-red on Raspberry Pi

**URL:** <https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244>\
**Category:** General\
**Created:** [25 February 2020 15:40 UTC](https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244 "2020-02-25T15:40:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Belgium](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@Belgium](https://discourse.nodered.org/u/Belgium)\
**Post date:** [25 February 2020 15:40 UTC](https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244/1 "2020-02-25T15:40:57Z")

</div>

Hello  
We recently bought a raspberry Pi 4 and we tried to set up a password for node-red.  
We went to settings.js but this seemed to be empty. Then we filled in this:

adminAuth: {  
type: "credentials",  
users: [  
{  
username: "admin",  
password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",  
permissions: "\*"  
}]  
But when we tried to start our node-red there was a error with the users. Does anybody have advice on how to password protect node-red or does anybody know how to solve this problem?

---

<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:** [25 February 2020 15:45 UTC](https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244/2 "2020-02-25T15:45:43Z")

</div>

Hi @Belgium

which settings file did you edit exactly? If it was empty then I guess you had not yet run Node-RED. The best thing to do is to delete (or move) the settings file, run node-red and it will copy into place a default settings file. It logs exactly which settings file it is using when it starts up. You can then edit that file and restart Node-RED.

If you get any errors, please share the actual error message

---

<div class="post-metadata">

**Author:** ![Belgium](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@Belgium](https://discourse.nodered.org/u/Belgium)\
**Post date:** [26 February 2020 08:33 UTC](https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244/3 "2020-02-26T08:33:55Z")

</div>

Hello

The file that i edited was settings.js. The error was that the : after users was not recognised.  
I tried using your solution by deleting all files of the Node-red folder (.node-red), and it works.

Thanks a lot!

---

<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:** [11 March 2020 08:34 UTC](https://discourse.nodered.org/t/set-password-for-node-red-on-raspberry-pi/22244/4 "2020-03-11T08:34:02Z")

</div>

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