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