{"id":22039523,"url":"https://github.com/mpolinowski/instar_nodered_docker","last_synced_at":"2026-05-09T17:40:24.004Z","repository":{"id":42258446,"uuid":"276045304","full_name":"mpolinowski/instar_nodered_docker","owner":"mpolinowski","description":"Running a Node-RED Dashboard for your INSTAR MQTT Camera in Docker","archived":false,"fork":false,"pushed_at":"2022-11-23T20:08:04.000Z","size":10890,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T19:17:43.721Z","etag":null,"topics":["camera","docker","instar","mqtt","nodered"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpolinowski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-30T08:44:35.000Z","updated_at":"2020-06-30T10:07:14.000Z","dependencies_parsed_at":"2022-08-20T19:32:31.074Z","dependency_job_id":null,"html_url":"https://github.com/mpolinowski/instar_nodered_docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Finstar_nodered_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Finstar_nodered_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Finstar_nodered_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpolinowski%2Finstar_nodered_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpolinowski","download_url":"https://codeload.github.com/mpolinowski/instar_nodered_docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245104529,"owners_count":20561380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camera","docker","instar","mqtt","nodered"],"created_at":"2024-11-30T11:11:06.131Z","updated_at":"2026-05-09T17:40:23.954Z","avatar_url":"https://github.com/mpolinowski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run a INSTAR Node-RED Dashboard in Docker\n\n\n![Run a INSTAR Node-RED Dashboard in Docker](./INSTAR_Dashboard_Docker_Node-RED_01.png)\n\n\n\n\u003c!-- TOC --\u003e\n\n- [Install Docker on Ubuntu 20.04](#install-docker-on-ubuntu-2004)\n- [Download Node-RED Configuration](#download-node-red-configuration)\n- [Run Node-RED in Docker](#run-node-red-in-docker)\n- [Configuring your Dashboard](#configuring-your-dashboard)\n    - [Used Node-RED Nodes:](#used-node-red-nodes)\n\n\u003c!-- /TOC --\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\nDocker is an application that simplifies the process of managing application processes in containers. Containers let you run your applications in resource-isolated processes. They’re similar to virtual machines, but containers are more portable, more resource-friendly, and more dependent on the host operating system.\n\n\n## Install Docker on Ubuntu 20.04\n\nFirst, update your existing list of packages:\n\n```bash\nsudo apt update\n```\n\nNext, install a few prerequisite packages:\n\n\n```bash\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\n```\n\n\nThen add the GPG key for the official Docker repository:\n\n\n```bash\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\n```\n\nAdd the Docker repository to APT sources:\n\n\n```bash\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable\"\n```\n\n\nNow update the package database with the Docker packages:\n\n\n```bash\nsudo apt update\n```\n\n\nFinally, install Docker:\n\n\n```bash\nsudo apt install docker-ce\n```\n\nDocker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:\n\n\n```bash\nsudo systemctl status docker\n\ndocker.service - Docker Application Container Engine\n     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)\n     Active: active (running)\n```\n\n\nIf you want to avoid typing sudo whenever you run the docker command, add your username to the docker group:\n\n\n```bash\nsudo usermod -aG docker ${USER}\n```\n\n\nTo apply the new group membership, log out of the server and back in, or type the following:\n\n\n```bash\nsu - ${USER}\n```\n\n\nNow test that everything is set up by typing:\n\n\n```bash\ndocker info\n```\n\n\n## Download Node-RED Configuration\n\n\nWe now need a folder that the Node-RED container can use to persist it's data. Clone or download this repository and save it into the `/opt` directory. Make sure that the Docker user has access to this directory and is allowed to write into it. E.g. :\n\n\n```bash\nchown -R nodered:nodered /opt/nodered/*\nchmod -R 777 /opt/nodered\n```\n\n\n## Run Node-RED in Docker\n\nStart by pulling the [official Node-RED image from Docker Hub](https://hub.docker.com/r/nodered/node-red):\n\n\n```bash\ndocker pull nodered/node-red:latest\n```\n\n\nNow run the Node-RED container with the following command:\n\n\n```bash\ndocker run -d --rm --privileged --net=host -v /opt/nodered/data:/data --name nodered nodered/node-red:latest\n```\n\n| | |\n| -- | -- |\n| `-d`  | Run the container `detached` from my terminal in the background |\n| `-rm` | When I stop the container remove it |\n| `--privileged` | This is a bit like running the process with _sudo_ and prevents you from running into LINUX security restrictions. You can remove this flag. If your permissions are set correctly the container should work without it. |\n| `--net=host` | Usually Docker container are executed in an virtual network. To be able to access a service outside of localhost you have to open the necessary ports - you can replace this flag with `-p 1880:1880` to only open the port that the Node-RED UI needs. If you install additional services in Node-RED that requirer different ports you have to add all of them in the __RUN__ command. Setting the network to `host` is just a shortcut for local development. |\n| `-v /opt/Node-RED/data:/data` | This mounts the folder that you created into the container. All data that is stored by Node-RED inside the container will be persisted inside this folder. |\n| `--name nodered` | Give your container a name so you can address it by this name instead of having to know it's ID |\n| `nodered/node-red:latest` | Is the image that you want to spin up into this container |\n\n\n\n\n## Configuring your Dashboard\n\n### Used Node-RED Nodes:\n\n* [node-red-contrib-ui-state-trail](https://flows.nodered.org/node/node-red-contrib-ui-state-trail)\n* [node-red-contrib-onvif](https://flows.nodered.org/node/node-red-contrib-onvif) (Optional - [there are other ways to embed the live video](https://wiki.instar.com/Advanced_User/Node-RED_Dashboard_Live_Video/))\n* [node-red-contrib-moment](https://flows.nodered.org/node/node-red-contrib-moment)\n[node-red-contrib-alasql](https://flows.nodered.org/node/node-red-contrib-alasql)\n* [node-red-node-base64](https://flows.nodered.org/node/node-red-node-base64)\n\n\n![Run a INSTAR Node-RED Dashboard in Docker](./INSTAR_Dashboard_Docker_Node-RED_00.png)\n\n\nTo connect your INSTAR Full HD camera you need to:\n\n1. Double-click the ONVIF node and add you cameras [IP Address](https://wiki.instar.com/Web_User_Interface/1080p_Series/Network/IP_Configuration/), [ONVIF Port](https://wiki.instar.com/Web_User_Interface/1080p_Series/Network/ONVIF/) and [Admin Login](https://wiki.instar.com/Web_User_Interface/1080p_Series/System/User/).\n2. Double-click the __GET Snap__ HTTP node and add your cameras [snapshot URL](https://wiki.instar.com/Indoor_Cameras/IN-8015_HD/Video_Streaming/):\n     * JPG Path 1: `http://192.168.x.x/tmpfs/snap.jpg?usr=usernam\u0026pwd=password`\n     * JPG Path 2: `http://192.168.x.x/tmpfs/auto.jpg?usr=usernam\u0026pwd=password`\n     * JPG Path 3: `http://192.168.x.x/tmpfs/auto2.jpg?usr=usernam\u0026pwd=password`\n3. Double-click the __Alarmserver__ MQTT IN node and click to edit the __Server__ (Broker). Now you can add your cameras [MQTT broker configuration](https://wiki.instar.com/Advanced_User/INSTAR_MQTT_Broker/Node-RED/).This is the broker that is used by all MQTT nodes - so you only have to change it in one place. __Note__ that if you are using an external MQTT Broker and your camera is connected as a client you can use your broker configuration here. __But__ you will have to change the MQTT Topics in __ALL__ MQTT nodes from the [local topic to the camera specific topic using your cameras MQTT ID](https://wiki.instar.com/Advanced_User/INSTAR_MQTT_Broker/).\n\n\n\n![Run a INSTAR Node-RED Dashboard in Docker](./INSTAR_Dashboard_Docker_Node-RED_02.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpolinowski%2Finstar_nodered_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpolinowski%2Finstar_nodered_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpolinowski%2Finstar_nodered_docker/lists"}