{"id":24761785,"url":"https://github.com/cumulocity-iot/cumulocity-node-red","last_synced_at":"2025-10-11T09:31:03.392Z","repository":{"id":41847395,"uuid":"327688609","full_name":"Cumulocity-IoT/cumulocity-node-red","owner":"Cumulocity-IoT","description":"This repository contains a node red microservice that runs within cumulocity.","archived":false,"fork":false,"pushed_at":"2025-08-25T22:01:50.000Z","size":2519,"stargazers_count":7,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-25T22:29:03.751Z","etag":null,"topics":["c8y","cumulocity","cumulocity-extension","cumulocity-iot","cumulocity-package","cumulocity-webapp","extension","iot-analytics","microservice","node-red","nodered","webapp"],"latest_commit_sha":null,"homepage":"https://github.com/Cumulocity-IoT/cumulocity-node-red","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cumulocity-IoT.png","metadata":{"files":{"readme":"README.backend.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-07T18:04:18.000Z","updated_at":"2025-08-25T21:08:13.000Z","dependencies_parsed_at":"2024-01-08T15:58:15.154Z","dependency_job_id":"7e86b13b-67b2-45b1-bb33-7f1346eda2f5","html_url":"https://github.com/Cumulocity-IoT/cumulocity-node-red","commit_stats":null,"previous_names":["cumulocity-iot/cumulocity-node-red","softwareag/cumulocity-node-red"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/Cumulocity-IoT/cumulocity-node-red","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fcumulocity-node-red","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fcumulocity-node-red/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fcumulocity-node-red/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fcumulocity-node-red/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cumulocity-IoT","download_url":"https://codeload.github.com/Cumulocity-IoT/cumulocity-node-red/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cumulocity-IoT%2Fcumulocity-node-red/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006777,"owners_count":26084179,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c8y","cumulocity","cumulocity-extension","cumulocity-iot","cumulocity-package","cumulocity-webapp","extension","iot-analytics","microservice","node-red","nodered","webapp"],"created_at":"2025-01-28T19:19:32.596Z","updated_at":"2025-10-11T09:31:02.729Z","avatar_url":"https://github.com/Cumulocity-IoT.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cumulocity - Node-RED backend\nThis docker image provides Node-RED as a microservice to Cumulocity.\nYou are also able to directly access the Node-RED frontend by navigation to the `/service/node-red/` endpoint of your tenant. Additionally there is an optional frontend application within this repository to integrate the Node-RED frontend seamlessly into Cumulocity.\n\n## How to build \u0026 deploy\n\nbuild the docker image from the Dockerfile\n```shell script\ndocker build -t node-red-ms .\n```\nstore the docker image in tar archive\n```shell script\ndocker save node-red-ms -o image.tar\n```\nZIP the docker image and the application manifest (`cumulocity.json`). Depending on your operating system, you can do so by executing:\n```shell script\nzip node-red cumulocity.json image.tar\n```\nor\n```shell script\ntar -a -c -f node-red.zip image.tar cumulocity.json\n```\n\nMake sure that the name of the resulting ZIP file is `node-red.zip` as the file name is also being used a application key within Cumulocity.\nThe structure of the resulting ZIP file should then look like this:\n```bash\n├── cumulocity.json\n└── image.tar\n```\n## Run locally\nTo run the docker container within your local environment for testing purposes, you can create a copy of the `env.list.default` file and rename it to `env.list`. This file contains some of the environment variables that will be provided to the microservice once it is running within Cumulocity. Please edit those variables to match your tenant.\nAfterwards you can start a new container by executing:\n```shell script\ndocker run -it -p 80:80 --name mynodered --env-file env.list node-red-ms\n```\n## Access Rights\nThis microservice provides two roles which you can use to limit the access rights to Node-RED. \nThere is an `ROLE_NODE_RED_READ` role, which allows read access (`GET` method) to all endpoints.\nThe other role is `ROLE_NODE_RED_ADMIN`, which is required for all other methods then `GET`.\nSome endpoints/directories like `/red/images` and `/icons/` are freely accessible because they only contain images/icons. \n\nWithin the `cumulocity.json` you can find underneath the `requiredRoles` attribute an array of roles that are provided to the microservices user. This array currently only contains **READ** and **ADMIN** rights for the usual device APIs:\n\n- ROLE_INVENTORY_READ\n- ROLE_INVENTORY_ADMIN\n- ROLE_EVENT_READ\n- ROLE_EVENT_ADMIN\n- ROLE_ALARM_READ\n- ROLE_ALARM_ADMIN\n- ROLE_DEVICE_CONTROL_READ\n- ROLE_DEVICE_CONTROL_ADMIN\n- ROLE_MEASUREMENT_READ\n- ROLE_MEASUREMENT_ADMIN\n\nYou can add all the desired roles to this array in case you need more.\n\n## Data persistence\nTo persist the created flows and store settings the microservice uses a [custom storage plugin](data/node-red-c8y-storage-plugin/README.md) for Node-RED to store those settings within Cumulocity's inventory.\n\n## :bangbang: Credential encryption :bangbang:\nAs credentials are as well stored within cumulocity (encrypted tenant option), please make sure that all users who somehow have access to the those encrypted tenant options are also allowed to see those credentials.\nEncrypted tenant options can only be decrypted by using a service user to access them.\nAdditionally to the encryption done with the encrypted tenant option, the tenant option is aswell encrypted via the Node-RED itself.\nThis additional encryption can be configured using the [settings.js](data/settings.js) file, you just need to modify the value of `credentialSecret`. By default a very weak secret is used, so please change it so something different and stronger.\n\n## Connecting to the tenant via MQTT\nIf you want to use MQTT to connect to your Cumulocity tenant, you can use the credentials which are provided in the following environment variables: `MQTT_USER` and `MQTT_PASSWORD`.\nYou can use these environment variables directly within the your MQTT credentials by placing `$(MQTT_USER)` and `$(MQTT_PASSWORD)` in the Username and Password input fields.\nThe `MQTT_USER` follows the following schema: `\u003ctenantId\u003e/\u003cusername\u003e`.\n\n## Default nodes\nPrepackaged with this Node-RED microservice you are also receiving some [basic Cumulocity nodes](data/node-red-contrib-c8y-client/README.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulocity-iot%2Fcumulocity-node-red","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcumulocity-iot%2Fcumulocity-node-red","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcumulocity-iot%2Fcumulocity-node-red/lists"}