Enable Node-Red Login Screen

Hi,

I freshly installed a node-red server in my raspberry pi and I wanted to enable authentication. I edited the setting.js to add enable the adminAuth and added the password using the encrypting feature to add the password.

However, every time I log into node-red it logs me directly without showing the login screen to enter password and username. Am I missing some configuration to be enabled?

Thanks in advance.

Best Regards,

André

Hello @andrejost,

Welcome to the forum!

Do you mean the login to the dashboard or to the admin panel? Which parameters did you set?

In general authentification is cached on the device, which should be a feature than a bug :upside_down_face:

Cheers
Ranki

Which settings.js file? What directory is it in?

Hi @Ranki , I mean the standard login screen when I try to access any file in the URL "Servername:1880".

I only uncommented this option: adminAuth:

I edited the setting.js file which is in /usr/lib/node_modules/node-re

Wrong settings file. If you start node red in a terminal it will tell you which one it is using. Usually it is in your .node-red folder.

Hi @andrejost,

Beside using the correct settings file, please have a look to the following guide: Securing Node-RED : Node-RED

The setting you adjusted is for the editors page.

Cheers
Ranki

Awesome! For the help guys! Now I can see the login screen correctly!

If I might suggest something ... The documentation on this link you mentioned @Ranki should perhaps improve the explanation on how the node-red settings files works when it gets copied from the original folder. On Steve`s Node Red awesome guides he makes it more explicit:

On Linux the settings.js file is copied from the /usr/lib/node-modules/node-red/ folder to your .node-red folder in your home directory when you start node-red, and there is no settings.js file present.

Pehaprs adding such a comment would improve the documentation.

Everything working like a charm now :slight_smile:

Best Regards,

André Souto

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