Node-Red on Synology

#1

Hello,
Did somebody wrote a good instruction how to install Node-RED on a Synology NAS?
I'm not very good at linux.
Regards
Otto

#2

Depends on your NAS and its capabilities e.g. if you want to use Docker
But try https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas

(the first hit on google for "Node-red synology install)

#3

I can't really recommend docker on the Synology NAS's unless you have one with a good amount of memory. However, it should work OK as long as you don't try to do too much with it. It is certainly the easiest way to get started as long as you have a NAS that will run docker (not all of them will).

I think that there is a 3rd party NodeJS package for them which would be your other starting point. However, the disadvantage of this approach is that you will likely need to get a bit more familiar not just with Linux but with the way that the Synology NAS uses Linux since Synology don't really want you messing around with the command line.

Personally, though I have one and though it can run Docker - and I have done - I'm already doing quite a lot with my NAS and though I've upgraded the RAM, it still gets bogged down with big backup jobs. So I leave the NAS to do what it is good at - handling files - and use the Pi for Node-RED.

#4

Many thanks for your help.
The link from ukmoose will help me a lot. I can use docker with my DS214!

#5

HI! I tried to install node-red on my synology ds115j. node.js ist running and works but when installing with
"sudo npm install -g --unsafe-perm node-red" i get this?! Any ideas?

npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
/volume1/@appstore/Node.js_v8/usr/local/bin/node-red -> /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/red.js
/volume1/@appstore/Node.js_v8/usr/local/bin/node-red-pi -> /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/bin/node-red-pi

bcrypt@2.0.1 install /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v57-linux-arm-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@2.0.1 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 "/volume1/@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=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding" "--napi_version=1" "--node_abi_napi=napi"
gyp ERR! cwd /volume1/@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 '/volume1/@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=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/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 "/volume1/@appstore/Node.js_v8/usr/local/bin/node" "/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /volume1/@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.9.1
node-pre-gyp ERR! not ok
Failed to execute '/volume1/@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-bu ild --module=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 (node_modules/node-red/node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 install: node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • node-red@0.19.4
    added 321 packages in 197.725s
#6

Hi guys,
I've got a couple of QNAP NAS units.
I assume that I can use the same procedure to install Node-RED using Docker on a QNAP ???
Or is there a better way/method to get Node-RED and Mosquitto up and running on a QNAP???

Cheers from David

#7

You seem to be missing the Linux build utils so the compile fails for gyp.

If you have a NAS with sufficient memory and the right processor, you should be able to use Docker on either QNAP or Synology.

#8

@joachim198 - did that actually fail in the end ? It WARNed about an optional bcrypt dependancy - but may have succeeded at the end.

#9

Hello Node-Red work well on my Synology.
But as soon I close the Putty remote connection the Node-RED process stop.

To start Node-Red I do this : /volume2/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/nod.js
How I can I keep the process alive? Sorry I'm not at home with linux...
Regards
Otto

Welcome to Node-RED

27 Oct 17:21:13 - [info] Node-RED version: v0.19.4
27 Oct 17:21:13 - [info] Node.js version: v8.9.4
27 Oct 17:21:13 - [info] Linux 3.2.40 arm LE
27 Oct 17:21:18 - [info] Loading palette nodes
27 Oct 17:21:20 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
27 Oct 17:21:21 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
27 Oct 17:21:27 - [info] Settings file : /var/services/homes/admin/.node-red/settings.js
27 Oct 17:21:27 - [info] Context store : 'default' [module=memory]
27 Oct 17:21:27 - [info] User directory : /var/services/homes/admin/.node-red
27 Oct 17:21:27 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 Oct 17:21:27 - [info] Flows file : /var/services/homes/admin/.node-red/flows_SERLIX.json
27 Oct 17:21:27 - [info] Creating new flow file
27 Oct 17:21:27 - [warn]


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

27 Oct 17:21:27 - [info] Starting flows
27 Oct 17:21:27 - [info] Started flows
27 Oct 17:21:28 - [info] Server now running at http://127.0.0.1:1880/

#10

if you have installed Node-RED directly on your synology box following the instructions I linked to above the instructions include a section on how to make Node-RED autostart

#11

@ukmoose
Hello,
I have nas synology DS216J, I installed OpenHab is it works.
I would also like to install node-red, I followed your guide I have an error, I do not know how to move forward
I would not do mess!
A help .. thanks

sudo npm install -g --unsafe-perm node-red
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
/volume1/@appstore/Node.js_v8/usr/local/bin/node-red -> /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/red.js
/volume1/@appstore/Node.js_v8/usr/local/bin/node-red-pi -> /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/bin/node-red-pi

bcrypt@2.0.1 install /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v57-linux-arm-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@2.0.1 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.10.105
gyp ERR! command "/volume1/@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=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding" "--napi_version=1" "--node_abi_napi=napi"
gyp ERR! cwd /volume1/@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 '/volume1/@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=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/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.10.105
node-pre-gyp ERR! command "/volume1/@appstore/Node.js_v8/usr/local/bin/node" "/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /volume1/@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.9.1
node-pre-gyp ERR! not ok
Failed to execute '/volume1/@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=/volume1/@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=/volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding --napi_version=1 --node_abi_napi=napi' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 (node_modules/node-red/node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 install: node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+node-red@0.19.5
updated 1 package in 35.667s

#12

The error is that you are missing some low-level tools that allow you to build (compile) one of the components in Node-RED - bcrypt. However, that is an optional compile and it should still work. Have you tried running it?

#13

I do not know how.
Can you give me directions?

#14

Hi ohaldi,
I have synology DS 718 and I installed docker on it , and is very easy, you can install several nodered instances

On synology package center install docker.


then: click in image, double click node-red docker image and before going to advanced settings you can chance the container name if you like.


Set desired local port:

next:

go to overview you will see all your containers running.
you can install node-red docker image from the SSH interface if you like

#15

I had that problem a year ago.. then appear dockers!! since then every piece of software that install on my nas is using docker

#16

Intially my synology nas has only 2gb of ram, and I have several node-red instances running , no problem.. it works very well.

#17

Indeed. Sadly, I also use my NAS as a NAS with a couple of TB of data. This runs fine most of the time. But when it needs to index and when it needs to run backups, it rapidly grinds to a halt if you aren't careful.

So it just depends what you are running on it.

#19

Hi Joachim198,

I'm trying to install node-red on a DS214play and I get exactly the same error (bcrypt related).
Where you able to solve this issue?
Can you please share how?

Thank you!

#20

There was a warning not an error.. Are you sure you have an error ?

#21

You might want to look at this install...

https://www.rs-online.com/designspark/installing-node-red-on-a-synology-nas