1.9 KiB
Node-RED
Docker deployment for Node-RED with the Home Assistant websocket integration. Run all commands from the repository root.
Appdata Location
The setup script creates appdata/node-red in the project root. Do not create
it inside docker-compose-files/.
Installation
-
Deploy the Home Assistant stack first, then create
.envif needed:cp -n .env.sample .env -
Set the required values in
.env:TZ=Africa/Johannesburg HA_URL=http://homeassistant:8123 HA_TOKEN=<home-assistant-long-lived-access-token> DOCKERLOGGING_MAXFILE=3 DOCKERLOGGING_MAXSIZE=10msetup-node-red.shgeneratesNODE_RED_CREDENTIAL_SECRETif it is empty. -
Create appdata, render settings, and generate Compose:
./setup-node-red.sh -
Validate, build, and start Node-RED:
docker compose -f docker-compose.node-red.yml config --quiet docker compose -f docker-compose.node-red.yml up -d --build -
Verify the container and open
http://<HOST_IP>:1880:docker compose -f docker-compose.node-red.yml ps docker compose -f docker-compose.node-red.yml logs --tail=100 node-red
Apply Configuration Changes
./setup-node-red.sh
docker compose -f docker-compose.node-red.yml up -d --build
Do not change NODE_RED_CREDENTIAL_SECRET after saving credentials.
Initial Setup
Add a Home Assistant server node using $(HA_URL) and $(HA_TOKEN).
Network Requirements
The Home Assistant stack must be running because Node-RED joins the external
ha_network.
Troubleshooting
If startup fails with a missing network, start docker-compose.homeassistant.yml
first.
Useful Commands
docker compose -f docker-compose.node-red.yml restart node-red
Backup
Back up appdata/node-red and preserve NODE_RED_CREDENTIAL_SECRET.