Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Docker] Node-red docker!

Featured Replies

This is how I got my version of Node-Red running on docker on Unraid..

 

What is Node-Red? Please have a look at http://Nodered.org and http://www.techrepublic.com/article/node-red/

(spoiler, it is an amazing application to enable the Internet of Things. I use it to monitor sensors around my house and to send alerts to my phones using PushBullet).

 

First of all, create a Dockerfile containing:

# Dockerfile for Node-RED - pulls latest master code from git
#FROM ubuntu:12.04
FROM phusion/baseimage:0.9.11

# based on the original by @cpswan
MAINTAINER ceejay
# some changes by Spants

# add universe repository to /etc/apt/sources.list
# we need it later as rlwrap is required by node.js
#RUN sed -i s/main/'main universe'/ /etc/apt/sources.list

# make sure everything is up to date - update and upgrade
RUN apt-get update -y
# RUN apt-get upgrade -y

# install dependencies
#RUN apt-get install python-software-properties python g++ make software-properties-common wget curl unzip git -y
RUN apt-get install python-software-properties wget curl unzip git -y

# add node.js repo
RUN add-apt-repository ppa:chris-lea/node.js -y

# another update so added repo can be used
RUN apt-get update

# install node.js
RUN apt-get install nodejs -y --force-yes

# download latest node-red
RUN cd /opt && git clone https://github.com/node-red/node-red.git

# remove some nodes
RUN cd /opt/node-red/nodes/core && rm -rf hardware deprecated
RUN cd /opt/node-red/nodes/core/io && rm -f 25-serial*

# install node-red node_modules
RUN cd /opt/node-red && npm install --production && npm install eyes js2xmlparser pushbullet fs.notify

# add extra nodes project so we have the lot just in case.
RUN cd /opt/node-red/nodes && git clone https://github.com/node-red/node-red-nodes.git

# expose port
EXPOSE 1880

# Set the default command to execute
# when creating a new container
CMD /usr/bin/node /opt/node-red/red.js -v /config/flow.json

 

I changed the base image to match my use, added the /config and also added pushbullet

Save this file to a directory on your unraid system

 

Build the image/container:

 

From this directory:

docker build --tag="nodered” .

  (dont forget the trailing . !)

 

and then: (/mnt/disk9/appdata/nodered is my data directory for node-red)

docker run -d --name nodered -p 1880:1880 -v /etc/localtime:/etc/localtime:ro -v /mnt/disk9/appdata/nodered:/config:rw nodered

 

Then check if it is running with http://192.168.1.22:1880 (change the IP to suit!)

 

I don't know how to make a template, sorry.

 

** Just one gotcha, you will get an error if you change a flow and deploy. If you delete the flow from the disk then deploy it will work ok. I don't know why yet. **

Tony

 

** edit added --force-yes to nodejs install line **

now we just need a mosquitto in a docker container to add MQTT to the mix

This is how I got my version of Node-Red running on docker on Unraid..

 

What is Node-Red? Please have a look at http://Nodered.org and http://www.techrepublic.com/article/node-red/

(spoiler, it is an amazing application to enable the Internet of Things. I use it to monitor sensors around my house and to send alerts to my phones using PushBullet).

 

First of all, create a Dockerfile containing:

# Dockerfile for Node-RED - pulls latest master code from git
#FROM ubuntu:12.04
FROM phusion/baseimage:0.9.11

# based on the original by @cpswan
MAINTAINER ceejay
# some changes by Spants

# add universe repository to /etc/apt/sources.list
# we need it later as rlwrap is required by node.js
#RUN sed -i s/main/'main universe'/ /etc/apt/sources.list

# make sure everything is up to date - update and upgrade
RUN apt-get update -y
# RUN apt-get upgrade -y

# install dependencies
#RUN apt-get install python-software-properties python g++ make software-properties-common wget curl unzip git -y
RUN apt-get install python-software-properties wget curl unzip git -y

# add node.js repo
RUN add-apt-repository ppa:chris-lea/node.js -y

# another update so added repo can be used
RUN apt-get update

# install node.js
RUN apt-get install nodejs -y

# download latest node-red
RUN cd /opt && git clone https://github.com/node-red/node-red.git

# remove some nodes
RUN cd /opt/node-red/nodes/core && rm -rf hardware deprecated
RUN cd /opt/node-red/nodes/core/io && rm -f 25-serial*

# install node-red node_modules
RUN cd /opt/node-red && npm install --production && npm install eyes js2xmlparser pushbullet fs.notify

# add extra nodes project so we have the lot just in case.
RUN cd /opt/node-red/nodes && git clone https://github.com/node-red/node-red-nodes.git

# expose port
EXPOSE 1880

# Set the default command to execute
# when creating a new container
CMD /usr/bin/node /opt/node-red/red.js -v /config/flow.json

 

I changed the base image to match my use, added the /config and also added pushbullet

Save this file to a directory on your unraid system

 

Build the image/container:

 

From this directory:

docker build --tag="nodered” .

  (dont forget the trailing . !)

 

and then: (/mnt/disk9/appdata/nodered is my data directory for node-red)

docker run -d --name nodered -p 1880:1880 -v /etc/localtime:/etc/localtime:ro -v /mnt/disk9/appdata/nodered:/config:rw nodered

 

Then check if it is running with http://192.168.1.22:1880 (change the IP to suit!)

 

I don't know how to make a template, sorry.

 

** Just one gotcha, you will get an error if you change a flow and deploy. If you delete the flow from the disk then deploy it will work ok. I don't know why yet. **

Tony

 

AWESOME!  I gotta try this!!

  • 3 years later...

Will add mosquitto mqtt docker tmrw.

  • Author

Why would you create another nodered docker and mosquito docker? What was missing from mine? 

@spants These templates I created from official Nodered & Eclipse-Mosquitto docker hub repos. I think they are better maintained - thats the reason.

Edited by tokra

  • Author

My node red template is for the official docker.... I used to work with the guys that wrote node red!... The mqtt one needed work to support passwords - these are imported and encrypted when the docker starts. 

I wonder if there's a way to make the feedparser node have a "state" of sorts? Because every time the docker image is updated, the feedparser flow is executed and it sends old posts again to my email. Is there a way to prevent the feedparser node from sending duplicates?

As of now, I'm back to using IFTTT to get RSS feed updates.

 

  • Author
5 hours ago, ICDeadPpl said:

I wonder if there's a way to make the feedparser node have a "state" of sorts? Because every time the docker image is updated, the feedparser flow is executed and it sends old posts again to my email. Is there a way to prevent the feedparser node from sending duplicates?

As of now, I'm back to using IFTTT to get RSS feed updates.

 

The best way is to find the author of the node on flows.Nodered.org and raise an issue on github/slack/Google groups

 

Tony

  • 10 months later...

Hi,

 

I am wondering how I could manually install plugins?

 

Br,

Johannes

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.