Need help about Securing Node-RED on Docker

Hi, I just installed node-red on docker and need to use username and password to login before go to node-red page

install
sudo docker run -d --restart=always -p 1880:1880 -v node_red_data:/data --name node-red nodered/node-red

create password
sudo docker exec -it node-red npx node-red admin hash-pw

edit <setting.js> file
vi node_modules/node-red/settings.js

adminAuth: { type: "credentials", users: [{ username: "admin", password: "xxxxxxxxxx" permissions: "*" }] }

restart node-red
sudo docker restart node-red

that what I did I still can go to node-red no login need did I miss songthing??

Thank you :slight_smile:

the settings.js file is located in your node_red_data volume.

2 Likes

thank you

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