# Node red admin login failed

**URL:** <https://discourse.nodered.org/t/node-red-admin-login-failed/52622>\
**Category:** General\
**Created:** [23 October 2021 16:41 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed/52622 "2021-10-23T16:41:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbartling](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bbartling](https://discourse.nodered.org/u/bbartling)\
**Post date:** [23 October 2021 16:41 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed/52622/1 "2021-10-23T16:41:15Z")

</div>

I am trying to follow this [tutorial](https://randomnerdtutorials.com/access-node-red-dashboard-anywhere-digital-ocean/#:~:text=install%20node-red-admin%20package%20to%20make%20it%20available%20globally%3A) to create a login for node red.

From what I can gather `node-red admin` is built into node red so why would I need to install a package? I get an error when using the tutorial trying `npm install -g --unsafe-perm node-red-admin`

Anyways but in Linux terminal this command works:  
`node-red-admin hash-pw`

To retrieve the hash and `sudo nano ~/.node-red/settings.js` following the tutorial to uncomment the correct lines on my end it looks like this:

```auto
    /** To password protect the Node-RED editor and admin API, the following
     * property can be used. See http://nodered.org/docs/security.html for details.
     */
    adminAuth: {
        type: "credentials",
        users: [{
            username: "ben",
            password: "supersecretP@$$word",
            permissions: "*"
        }]
    },

    /** The following property can be used to enable HTTPS
     * This property can be either an object, containing both a (private) key
     * and a (public) certificate, or a function that returns such an object.
     * See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
     * for details of its contents.
     */

```

And then thru nano writing the file and doing a `sudo reboot` I cant login with this username and password, any ideas to try?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4a20547cf285d39dfec65ef2d5a3e522fd5043e7.png)

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [23 October 2021 17:45 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed/52622/2 "2021-10-23T17:45:58Z")

</div>

Just double checking that you put the hash in the settings file not the actual password.

---

<div class="post-metadata">

**Author:** ![bbartling](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bbartling](https://discourse.nodered.org/u/bbartling)\
**Post date:** [23 October 2021 19:07 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed/52622/3 "2021-10-23T19:07:19Z")

</div>

Thanks that was totally it...

---

<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:** [22 December 2021 19:08 UTC](https://discourse.nodered.org/t/node-red-admin-login-failed/52622/4 "2021-12-22T19:08:16Z")

</div>

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