# Installing node-red on Synology NAS

**URL:** <https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329>\
**Category:** General\
**Created:** [14 August 2019 20:34 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329 "2019-08-14T20:34:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbc99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbc99/32/13764_2.png) [@mbc99](https://discourse.nodered.org/u/mbc99)\
**Post date:** [14 August 2019 20:34 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/1 "2019-08-14T20:34:25Z")

</div>

Hi there.  
I won't there are tons of resources on the internet on how to install node-red on a Synology NAS without Docker. But I'm still strugling.

I've alredy enabled user home under user-advanced  
I've installed node.js package from the Package center (I installed all the versions since I was desperate)  
When running the command from SSH the installation throws errors. Node-red isn't installed.  
Here are the errors:

```auto
sudo npm install -g --unsafe-perm node-red
Password:
/volume2/@appstore/Node.js_v8/usr/local/bin/node-red-pi -> /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/bin/node-red-pi
/volume2/@appstore/Node.js_v8/usr/local/bin/node-red -> /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/red.js

> bcrypt@3.0.6 install /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/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 Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v57-linux-arm-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@8.9.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 3.2.40
gyp ERR! command "/volume2/@appstore/Node.js_v8/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding" "--napi_version=1" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/volume2/@appstore/Node.js_v8/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 3.2.40
node-pre-gyp ERR! command "/volume2/@appstore/Node.js_v8/usr/local/bin/node" "/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/volume2/@appstore/Node.js_v8/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 (node_modules/node-red/node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red@0.20.7
updated 1 package in 556.392s

```

Note that at the end it says updated 1 package because this was the second time trying to install it

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [14 August 2019 20:56 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/2 "2019-08-14T20:56:56Z")

</div>

The reason you won't find many resources is because you will need to install various packages with a package manager that is not available. So you will first need to install the package manager (opkg, entware), then install a compiler and very much depending on your CPU it will either build or not.

Your solution: install docker and run it in docker.

---

<div class="post-metadata">

**Author:** ![mbc99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbc99/32/13764_2.png) [@mbc99](https://discourse.nodered.org/u/mbc99)\
**Post date:** [14 August 2019 20:58 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/3 "2019-08-14T20:58:18Z")

</div>

I thought it was much easier. At least this tutorial seemed like it: [https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas](https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas)

I will try to install docker but my NAS is not suported...

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [14 August 2019 21:01 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/4 "2019-08-14T21:01:42Z")

</div>

You could try to install the bcrypt binary directly  
`npm install -g --save bcrypt-nodejs`

Retry installing node-red after that

---

<div class="post-metadata">

**Author:** ![mbc99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbc99/32/13764_2.png) [@mbc99](https://discourse.nodered.org/u/mbc99)\
**Post date:** [14 August 2019 21:15 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/5 "2019-08-14T21:15:07Z")

</div>

Still no luck. And I have found out that Docker is not compatible with my NAS

```auto
admin@server:~$ sudo npm install -g --save bcrypt-nodejs
Password:
npm WARN deprecated bcrypt-nodejs@0.0.3: bcrypt-nodejs is no longer actively maintained. Please use bcrypt or bcryptjs. See https://github.com/kelektiv/node.bcrypt.js/wiki/bcrypt-vs-brypt.js to learn more about these two options
+ bcrypt-nodejs@0.0.3
added 1 package in 6.675s
admin@server:~$ sudo npm install -g --unsafe-perm node-red
/volume2/@appstore/Node.js_v8/usr/local/bin/node-red -> /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/red.js
/volume2/@appstore/Node.js_v8/usr/local/bin/node-red-pi -> /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/bin/node-red-pi

> bcrypt@3.0.6 install /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/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 Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v57-linux-arm-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@8.9.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 3.2.40
gyp ERR! command "/volume2/@appstore/Node.js_v8/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding" "--napi_version=1" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
gyp ERR! cwd /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/volume2/@appstore/Node.js_v8/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 3.2.40
node-pre-gyp ERR! command "/volume2/@appstore/Node.js_v8/usr/local/bin/node" "/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/volume2/@appstore/Node.js_v8/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 (node_modules/node-red/node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red@0.20.7
updated 2 packages in 240.386s

```

---

<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:** [14 August 2019 21:18 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/6 "2019-08-14T21:18:19Z")

</div>

@mbc99 despite all the errors, that is actually a successful install of Node-RED.

The key thing to spot is that all of the errors are followed by the line:

```auto
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 (node_modules/node-red/node_modules/bcrypt):

```

The `bcrypt` module is the only one we have that contains native code that needs building. On some platforms that can cause issues - such as you are seeing.

For this reason, it is marked as an optional dependency as we can tolerate it not installing. We can do that because we also depend on `bcryptjs` which is a pure javascript implementation of the same functionality - albeit much slower.

---

<div class="post-metadata">

**Author:** ![mbc99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbc99/32/13764_2.png) [@mbc99](https://discourse.nodered.org/u/mbc99)\
**Post date:** [14 August 2019 21:21 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/7 "2019-08-14T21:21:59Z")

</div>

So you are saying that node-red should work anyway. However if I try to launch node-red (by simply typing node-red) I get and error: command not found

---

<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:** [14 August 2019 21:23 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/8 "2019-08-14T21:23:05Z")

</div>

That's probably a separate issue of whether your PATH is properly setup to include things installed as npm modules.

---

<div class="post-metadata">

**Author:** ![mbc99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mbc99/32/13764_2.png) [@mbc99](https://discourse.nodered.org/u/mbc99)\
**Post date:** [14 August 2019 21:25 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/9 "2019-08-14T21:25:40Z")

</div>

Ok. So then I should first search where node-red was really installed to be able to run it from that path right?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [14 August 2019 21:29 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/10 "2019-08-14T21:29:14Z")

</div>

I clearly need to read, this part (bcrypt) gave me a lot of headaches trying to install on a syno before.

---

<div class="post-metadata">

**Author:** ![DillonJ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dillonj/32/5678_2.png) [@DillonJ](https://discourse.nodered.org/u/DillonJ)\
**Post date:** [18 November 2019 10:29 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/11 "2019-11-18T10:29:37Z")

</div>

Hi folks,

I've ended up on this thread a few times while working with my node red installation. I thought I would post some things that helped me.

First of all, this thread is very helpful : [https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas](https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas)

However, for some reason I have different paths to this guy - perhaps because of the account I was logged in to?

First point is that I received errors during the install process, but it all works fine, so don't assume it's not working..

To get it to run so that the process is persistent, you need to run it using pm2 - and, in my case, I need to use explicit paths as follows:

`/volume1/@appstore/Node.js_v8/usr/local/bin/pm2 start /volume1/@appstore/Node.js_v8/usr/local/bin/node-red -- -v`

(there is no newline character in the above btw).

To get the process to run automatically on boot is not as straight forward as it should be and the guy in the post above doesn't explain the script. First of all, you need to run the script as the user you installed it with and there is a bug in Synology DSM when you try to run a script as a user which isn't the root - see here: [http://www.damirscorner.com/blog/posts/20190301-SchedulingATaskOnASynologyNas.html](http://www.damirscorner.com/blog/posts/20190301-SchedulingATaskOnASynologyNas.html)

The script I use to run on boot is as follows:

```auto

#!/bin/bash
export USER=[my username]
export HOME="/var/services/homes/[my username]"
cd $HOME
/volume1/@appstore/Node.js_v8/usr/local/bin/pm2 start /volume1/@appstore/Node.js_v8/usr/local/bin/node-red -- -v

```

The bug linked to above means that scripts run as non-root users will still have the home directory as /root and the $USER is root. The first three lines take care of this by setting the appropriate environment variables and then changing directory to your home directory.

You need to replace [my username] with your username.

Hope this helps someone.

---

<div class="post-metadata">

**Author:** ![maru](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maru/32/99601_2.png) [@maru](https://discourse.nodered.org/u/maru)\
**Post date:** [18 November 2019 16:38 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/12 "2019-11-18T16:38:08Z")

</div>

I also have a working node RED on a Synology DS214e (also no docker support). Indeed lots of bcrypt-nodejs warnings, but everything looks fine.  
I can start it via this path (from my documentation):  
me @ syno: /volume1/@appstore/Node.js\_v8/usr/local/lib/node\_modules/node-red/bin$ ./node-red-pi  
13 Sep 21:24:54 - [info]

# Welcome to Node-RED

13 Sep 21:24:54 - [info] Node-RED version: v0.20.8  
13 Sep 21:24:54 - [info] Node.js version: v8.9.4  
13 Sep 21:24:54 - [info] Linux 3.2.40 arm LE  
13 Sep 21:25:03 - [info] Loading palette nodes

Kind regards,

---

<div class="post-metadata">

**Author:** ![juan](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@juan](https://discourse.nodered.org/u/juan)\
**Post date:** [6 December 2019 15:26 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/13 "2019-12-06T15:26:50Z")

</div>

Had the same problem as mbc99 when installing as admin user. Changed to default user and reinstalled with less errors.

The command node-red also did not work. I managed to start it with:

`/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/red.js`

---

<div class="post-metadata">

**Author:** ![unholyhimura](https://avatars.discourse-cdn.com/v4/letter/u/48db29/32.png) [@unholyhimura](https://discourse.nodered.org/u/unholyhimura)\
**Post date:** [26 September 2020 16:20 UTC](https://discourse.nodered.org/t/installing-node-red-on-synology-nas/14329/14 "2020-09-26T16:20:42Z")

</div>

Hello, if you are looking for an easier way to install Node-Red on a Synology NAS & Docker, there is this website that contains step-by-step instructions on how to do it. You can take a look:

[https://www.atomicha.com/synology-nas-docker-installing-node-red-part-1-node-red-requirements/](https://www.atomicha.com/synology-nas-docker-installing-node-red-part-1-node-red-requirements/)
