Installing Node-RED in a Container

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.

Running Node-RED is easiest in a Docker container. This is really easy to set up.

docker pull nodered/node-red

Pull the container from the Docker Repository

sudo docker run -d -p 1880:1880 -v /home/ubuntu/docker-nodered/data:/data --name mynodered nodered/node-red

Start Mosquitto.

The default port for Node-RED is 1880. Also ensure that the volumes are mapped to a local folder on the host to preserve the configuration.

Installing Eclipse Mosquitto in a Container

Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers.

The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers.

Running Mosquitto is easiest in a Docker container. This is really easy to set up.

docker pull eclipse-mosquitto

Pull the container from the Docker Repository

sudo docker run -d -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/home/ubuntu/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto

Start Mosquitto.

The default port for Mosquitto is 1883. Also ensure that the volumes are mapped to a local folder on the host to preserve the configuration.