Node-Red on Synology/QNAP NAS

Well I kind of did it in a "roundabout" way. I installed a Debian docker first, and then did the manual way of installing. At least this gave me VNC etc, This is the docker I used. Just search for Debian.

Then installed Node Red

sudo npm install -g --unsafe-perm node-red

Reason for this was so I could easily backup the flows etc, using docker on QNAP, I couldnt find the right way to have the drive mapped, so back up was easier. Its all a little temporary not, as I've just bought a PI 4, so it will be going on there when I can face up to moving it all across :wink:

1 Like

You need to throw in a notice here that only the PLUS models of Synology NAS devices (Intel processors) support Docker. This does not work on the "J" models, probably not on the "play" models, and all of the others using ARM chips and not Intel. Ask me how I know, having whacked the web interface on my DS216j to the point of needing to factory reset and start over from scratch trying to side-load an ARM Docker package onto it. Don't say I didn't warn you. :wink:

On the bright side, the DS918+ that I replaced it with runs Intel Docker containers really nice. I'm running HOOBS/HomeBridge, Pi-Hole, and the UniFi controller in Docker containers on it right now, and will be porting AlarmDecoder over when I get a chance....

1 Like

Super easy on the QNAP. Just open up container station (install that if you have it uninstalled) and then click "create" which will pull up this screen:

type "nodered" into the search bar and the click on the "Docker" tab underneath it.

you should see this: (THE SECOND ONE DOWN IS THE LATEST VERSION)

Once installed (it will download first) you will see it listed under "Containers" on the left menu like this:

The little chain link is a link to run it. OR you can open up the container by clicking it's name. It will then show you the IP and PORT that it is running on. Again...you do need to know and understand networking to do this. That page is found under the "Advanced Settings" for the container.


Here is the container's page. You will see that "settings" button. Which will bring you here:

Click advanced, then "network on the left" you'll see this screen.

2 Likes

Had to go hunting for the link button but yeah pretty easy, thanks for sharing!

Can you add this to your post, so when I link it's included? :+1:

To open Node-Red click the chain link icon in ContainerStation (unless you know a different way to guess the port QNAP picked?)

thanks again for the assist.

1 Like

The thing I couldnt find for Node Red was the set up for the folders. This means you can find all your config easily and back it up.

Even though I set it, there is nothing there. Instead you have to go find it via SSH to back it up.

Edit.
Unlike my HA setup in docker, where you can add the folder /config and all your config will be in the physical path you specify (if you get me).

2 Likes

@jrfarrar Actually it looks like the container store only has the old version 0.28

I just backup the entire image.

**Note...I'm not using node red...just showing how to install it on a QNAP. Also again, different versions can be found under the Docker images.

Ok, so if you want to map a mount in your image to a location on the NAS here is how:
In that same advanced settings under "Shared Folders" you can do something like this.

Then the location of that folder is here:

Again..I'm not using this...(I use other containers) so hopefully this helps someone get going with it.

3 Likes

This guide is missing a step that will improve your seup a lot: Create a volume mapping to store your user data outside the container. This way you can update NR just by destroying the old one and creating a new. If your running "nodered/node-red:latest" you can just update the image from the registry tab followed by "stop", "clear" and "start" on the running container.

In Synology you can easily configure a mapping of the /data directory in the container through the interface.
edit_volume

4 Likes

Yep

fixed my post for relevancy

2 Likes

Yeah true, I appreciate that. :+1:

1 Like

Ah this is the nugget :smiley: Thx!!

1 Like

Not anymore, assist added, thank you. And added to my NR install TY!!

Testing a QNAP now with the /data added :+1:

1 Like

Let me know how that goes. Quite honestly I'm going to have to start at the top of this thread to even get this working with HE at this point...I mean...I'm half way there now.... :joy:

2 Likes

Yeah it works :slight_smile:

I set the Advanced, "Add volume from host" as below.

Created a flow and checked the folder.

This would make backup so much easier :wink:

3 Likes

Same for Synology, sweet!

1 Like

Apparently you were using an older version of node-red when you wrote this. The current version probably will not work on Synology and you'll get an error similar to:

Error: EACCES: permission denied, copyfile '/usr/src/node-red/node_modules/node-red/settings.js' -> '/data/settings.js'

Using your example, you need to execute this command:

sudo chown -R 1000:1000 /volume1/docker/node-red

Details are here: Permissions and Persistence · node-red/node-red-docker Wiki · GitHub

Doesn't matter if you give the folder full permissions to everyone in the world, node-red requires the owner to be 1000. No idea why, but I'm not a Linux guy.

1 Like

Thanks for posting this. I've moved my NR off the Synology. I was too complicated (for me) to update it, so I move it to a headless mac mini. I'll edit my OP to include your update for those that run on a Synology docker.

The Docker way of updating is to delete the container and create a new one with the updated image. As long as the container's data is stored outside of the container, you won't lose any configuration or data.

It's really easy using Synology's Docker UI. Go to the Registry section, search for "node-red" (or whatever image you want to update) , click the Download button and select what image you want (generally you would select "Latest"). It shouldn't take long, but you'll get a notification in the NAS UI when the download is complete.

Then go to the Container section, highlight the container, click Action -> Stop, Action -> Clear, then click Action -> Start.

That's it, you're updated. I haven't had to do this with node-red yet, but I do it with pihole and it's a piece of cake.

I like running stuff like this on the NAS because it's always up, it's reliable and I rarely have to tinker with it.

1 Like

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