# Authentication on settings.js doesn't work

**URL:** <https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008>\
**Category:** General\
**Created:** [28 April 2023 12:34 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008 "2023-04-28T12:34:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [28 April 2023 12:34 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/1 "2023-04-28T12:34:00Z")

</div>

Hello everyone,

I have developed an application in Node Red to which I was able to assign an administrator username and password to access the nodes I created, and another one for the dashboard. However, I want to upload this project to oracle cloud to be able to access at any time and place. To do this I created a VM and installed Node Red on it. Everything works fine, but when I modify the settings.js file, to create the username and password that I had in my local project, this modification does not work, and no matter how many times I use different browsers or incognito mode, it never asks me for authentication.

Can anyone help me?

Thanks in advance.

---

<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:** [28 April 2023 13:24 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/2 "2023-04-28T13:24:29Z")

</div>

Have you restarted Node-RED after making the changes to settings.js?

Have you checked you are editing the same settings.js file that Node-RED is using? Node-RED logs the full path to the file it is using when it starts up.

---

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [1 May 2023 09:54 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/3 "2023-05-01T09:54:12Z")

</div>

Hi @knolleary

Yes to both questions. I have retarted Node-RED after making those changes. First of all, I stop Node-RED execution, make the changes, then I restarted it.

The settings.js path is the same that I edited. I thought that it was the problem but it didn't. Even I created aother settings.js file and tried to start up with this file, but i didn't work.

---

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [4 May 2023 16:49 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/4 "2023-05-04T16:49:20Z")

</div>

Edit:

I tried again, and I saw that my settings.js file is here: /home/nodered/.node-red/settings.js but I can't get in there, I got this error: -bash: cd: /home/nodered/.node-red/: Permission denied

Someone can help me with this?

Thank you!

---

<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:** [4 May 2023 17:02 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/5 "2023-05-04T17:02:23Z")

</div>

Are you logged in as the user nodered?

---

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [4 May 2023 17:31 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/6 "2023-05-04T17:31:15Z")

</div>

Hi @Colin

No, I didn't. I just installed it on my VM, tried to modify my settings.js. Then I saw that my settings file path was inside of nodered folder which I cannot access because that error in my last comment. Where or how I have to login? Could you tell me how to do it please?

Thank you. Regards

---

<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:** [4 May 2023 18:03 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/7 "2023-05-04T18:03:09Z")

</div>

How did you install node-red on the VM? Presumably that it where it got installed as that user.

---

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [4 May 2023 18:09 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/8 "2023-05-04T18:09:20Z")

</div>

I installed it manually using this command: bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/rpm/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/rpm/update-nodejs-and-nodered)).

When it asked me to create the directory under nodered user, I said yes. Could it be the problem?.

---

<div class="post-metadata">

**Author:** ![JuanN\_18](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JuanN\_18](https://discourse.nodered.org/u/JuanN_18)\
**Post date:** [4 May 2023 18:27 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/9 "2023-05-04T18:27:23Z")

</div>

Guys, finally I could make it.

I reinstalled Node Red on my VM. Then I changed the user to root, and installed nodered again. Then I modified my settings.js, restarted and woolaa I worked.

Thank you for your help, time and patience. Greetings.

---

<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:** [4 May 2023 19:35 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/10 "2023-05-04T19:35:44Z")

</div>

> [@JuanN\_18](#):
>
> Then I changed the user to root, and installed nodered again

That is almost certainly a bad plan. The install script will, by default, install it to run as the user logged on when you run the installer.

---

<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:** [18 May 2023 19:36 UTC](https://discourse.nodered.org/t/authentication-on-settings-js-doesnt-work/78008/11 "2023-05-18T19:36:38Z")

</div>

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