question

antoine-ataum avatar image
antoine-ataum asked

Set a Node-Red password

Hello,

I'm trying to set a password for Node-Red only but I can't do it and I don't want it to be the same as the remote console. I already know that if you set a password for the remote console it will set the same password to Node-Red.

I tried to add a password via SSH in the /usr/lib/node_modules/node-red/venus-setting.js, it works until you do a software change/upgrade. It's normal because every files not contained in the /data is being erased. So I tried to do a script that place the adminAuth in the right place in the venus-setting.js and try to do it on the reboot in a crontab, but even this crontab is being erased on a software change/upgrade. On a post from @mvader (Victron Energy) https://community.victronenergy.com/questions/155949/node-red-config-files.html it's been said that a file named /data/home/nodered/.node-red/settings-user.js exists to do some code but I can't find it.


If there is a way to password protect Node-Red and not the remote console can you tell me ?

Otherwise if there's currently no way, a quick fix by Victron is just to add a node-red_password.txt in the /data/conf and using this file in /usr/lib/node_modules/node-red/user-authentication.js L6 const passwordFileName = '/data/conf/node-red_password.txt'. And than add the feature to the remote console, asking the old password if you want to change it.

Best Regards

Venus OSNode-REDremote console
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
nickdb avatar image
nickdb answered ·

Hi. This topic is for modifications. Please check the old modification section for the new location of that category, which is pinned as a topic.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.