# RPi 3 installation

**URL:** <https://discourse.nodered.org/t/rpi-3-installation/23085>\
**Category:** General\
**Created:** [13 March 2020 20:13 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085 "2020-03-13T20:13:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert126](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Robert126](https://discourse.nodered.org/u/Robert126)\
**Post date:** [13 March 2020 20:13 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/1 "2020-03-13T20:13:34Z")

</div>

I followed

This installation  
[https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi)  
I trying to make it secure following this link:  
[https://nodered.org/docs/user-guide/runtime/securing-node-red#user-permissions](https://nodered.org/docs/user-guide/runtime/securing-node-red#user-permissions)

I Cann't run the following command:'

```auto
node-red-admin hash-pw

```

or

```auto
node -e "console.log(require('bcryptjs').hashSync(process.argv[1], 8));" your-password-here

```

Hopefully some one can help me out?

I installed Node Red on a RPi3 (headless installation).  
Working on a Mac and command line tool installing.

Thank you for your time!  
Robert

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 March 2020 20:28 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/2 "2020-03-13T20:28:09Z")

</div>

Hi @Robert126 - welcome to the forum.

The Pi install script does not install `node-red-admin` (perhaps it should... @dceejay)

So you should first run:

```auto
sudo npm install -g node-red-admin

```

Then you should be able to run the `node-red-admin hash-pw` command.

---

<div class="post-metadata">

**Author:** ![Robert126](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Robert126](https://discourse.nodered.org/u/Robert126)\
**Post date:** [13 March 2020 21:05 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/3 "2020-03-13T21:05:59Z")

</div>

> [@knolleary](#):
>
> sudo npm install -g node-red-admin

Hi knolleary,

First of all thank you for your quick response!  
If I do that I get the following:  
**pi@raspberrypi** : **~ $** sudo npm install -g node-red-admin

[sudo] password for pi:

npm WARN deprecated request@2.88.2: request has been deprecated, see [Request’s Past, Present and Future · Issue #3142 · request/request · GitHub](https://github.com/request/request/issues/3142)

/usr/bin/node-red-admin -\> /usr/lib/node\_modules/node-red-admin/node-red-admin.js

> bcrypt@3.0.8 install /usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt

> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download

node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.8 and node@12.16.1 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)

node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib'

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.16.1"

gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/build'

gyp ERR! System Linux 4.19.97-v7+

gyp ERR! command "/usr/bin/node" "/usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding/bcrypt\_lib.node" "--module\_name=bcrypt\_lib" "--module\_path=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding" "--napi\_version=5" "--node\_abi\_napi=napi" "--napi\_build\_version=0" "--node\_napi\_label=node-v72"

gyp ERR! cwd /usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.1.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding/bcrypt\_lib.node --module\_name=bcrypt\_lib --module\_path=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding --napi\_version=5 --node\_abi\_napi=napi --napi\_build\_version=0 --node\_napi\_label=node-v72' (1)

node-pre-gyp ERR! stack at ChildProcess. (/usr/lib/node\_modules/node-red-admin/node\_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20)

node-pre-gyp ERR! stack at maybeClose (internal/child\_process.js:1021:16)

node-pre-gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:286:5)

node-pre-gyp ERR! System Linux 4.19.97-v7+

node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node\_modules/node-red-admin/node\_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt

node-pre-gyp ERR! node -v v12.16.1

node-pre-gyp ERR! node-pre-gyp -v v0.14.0

node-pre-gyp ERR! not ok

Failed to execute '/usr/bin/node /usr/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding/bcrypt\_lib.node --module\_name=bcrypt\_lib --module\_path=/usr/lib/node\_modules/node-red-admin/node\_modules/bcrypt/lib/binding --napi\_version=5 --node\_abi\_napi=napi --napi\_build\_version=0 --node\_napi\_label=node-v72' (1)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.8 (node\_modules/node-red-admin/node\_modules/bcrypt):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

- node-red-admin@0.1.5

updated 1 package in 16.637s

**pi@raspberrypi** : **~ $**

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 March 2020 21:26 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/5 "2020-03-13T21:26:12Z")

</div>

Despite all those warnings, it has actually installed.

You should now be able to run the `node-red-admin` command.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 March 2020 22:05 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/6 "2020-03-13T22:05:53Z")

</div>

Rather than add something we had to maintain just for that one command (it really bloated the dpkg install size) - I offered this PR a while back.. [https://github.com/node-red/node-red/pull/1917](https://github.com/node-red/node-red/pull/1917)

---

<div class="post-metadata">

**Author:** ![Robert126](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Robert126](https://discourse.nodered.org/u/Robert126)\
**Post date:** [13 March 2020 22:51 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/7 "2020-03-13T22:51:21Z")

</div>

the node-red-admin hash-pw works now!  
Thank you.

But when I they to create a password for an other user  
node-red-john hash-pw  
I get the following  
**pi@raspberrypi** : **/ $** node-red-john hash-pw

-bash: node-red-john: command not found

I created the John user in the settings.js file

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 March 2020 22:54 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/8 "2020-03-13T22:54:52Z")

</div>

The command is `node-red-admin hash-pw` regardless of the username.

---

<div class="post-metadata">

**Author:** ![Robert126](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Robert126](https://discourse.nodered.org/u/Robert126)\
**Post date:** [13 March 2020 23:02 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/9 "2020-03-13T23:02:20Z")

</div>

Thank you. Sorry for my stupidity.

When I start **node-red-start**

I'm receiving the following error  
Starting as a systemd service.  
Error loading settings file: /home/pi/.node-red/settings.js  
/home/pi/.node-red/settings.js:222  
functionGlobalContext: {  
^^^^^^^^^^^^^^^^^^^^^  
SyntaxError: Unexpected identifier  
at wrapSafe (internal/modules/cjs/loader.js:1072:16)  
at Module.\_compile (internal/modules/cjs/loader.js:1122:27)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1178:10)  
at Module.load (internal/modules/cjs/loader.js:1002:32)  
at Function.Module.\_load (internal/modules/cjs/loader.js:901:14)  
at Module.require (internal/modules/cjs/loader.js:1044:19)  
at require (internal/modules/cjs/helpers.js:77:18)  
at Object. (/usr/lib/node\_modules/node-red/red.js:119:20)  
at Module.\_compile (internal/modules/cjs/loader.js:1158:30)  
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1178:10)  
nodered.service: Succeeded.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [13 March 2020 23:13 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/10 "2020-03-13T23:13:47Z")

</div>

The usually means you've missed off the comma `,` between `functionGlobalContext` and whatever setting is immediately before it.

---

<div class="post-metadata">

**Author:** ![Robert126](https://avatars.discourse-cdn.com/v4/letter/r/8dc957/32.png) [@Robert126](https://discourse.nodered.org/u/Robert126)\
**Post date:** [14 March 2020 09:53 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/11 "2020-03-14T09:53:43Z")

</div>

Thank Knolleary for your help it is working!

Let's get started with Node Red 😉

---

<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:** [28 March 2020 09:54 UTC](https://discourse.nodered.org/t/rpi-3-installation/23085/12 "2020-03-28T09:54:27Z")

</div>

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