aristosv
(Aristos)
January 4, 2026, 6:07am
1
home-assistant:
image: homeassistant/home-assistant
container_name: home-assistant
hostname: home-assistant
restart: unless-stopped
cap_add:
- NET_RAW
- NET_ADMIN
user: "0"
network_mode: host
environment:
TZ: ${TZ}
volumes:
- /run/dbus:/run/dbus:ro
- ./config/home-assistant:/config
depends_on:
mariadb:
condition: service_healthy
extra_hosts:
- "mariadb:172.20.0.101"
- "frigate:172.20.0.102"
- "mosquitto:172.20.0.103"
Is there a health check I can add to home assistant, that will not only make sure that home assistant has started, but also all the integrations have been started also?
The reason is that other containers, like node-red, depend on home assistant being fully started before they start, otherwise they produce errors, and some of the flows don’t activate unless home assistant is fully started.
If you just want to know when HA has fully started & loaded all integrations, you could use the homeassistant_started event as a trigger to let your other containers know it’s safe to start.
Not sure how you’d pass that info to your other containers because I know next to nothing about Docker, but hopefully it’s enough to get you started.
aristosv
(Aristos)
January 4, 2026, 11:33am
3
Ideally it should be done in docker. For example mariadb uses this for health checks. Note the healthcheck: section
mariadb:
image: mariadb
container_name: mariadb
hostname: mariadb
restart: unless-stopped
user: "0"
environment:
TZ: ${TZ}
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
ports:
- 3306:3306
volumes:
- ./config/mariadb/mysql:/var/lib/mysql
- ./config/mariadb:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
networks:
network:
ipv4_address: 172.20.0.101
aristosv
(Aristos)
February 4, 2026, 4:46pm
4
Happy to report that this is working
home-assistant:
image: homeassistant/home-assistant
container_name: home-assistant
hostname: home-assistant
restart: unless-stopped
cap_add:
- NET_RAW
- NET_ADMIN
user: "0"
network_mode: host
environment:
TZ: ${TZ}
HA_TOKEN: ${HA_TOKEN}
volumes:
- /run/dbus:/run/dbus:ro
- ./config/home-assistant:/config
depends_on:
mariadb:
condition: service_healthy
extra_hosts:
- "piper:${IP_PIPER}"
- "mariadb:${IP_MARIADB}"
- "frigate:${IP_FRIGATE}"
- "whisper:${IP_WHISPER}"
- "mosquitto:${IP_MOSQUITTO}"
- "wyoming-openai:${IP_WYOMING_OPENAI}"
healthcheck:
test: ["CMD-SHELL", "sh -c 'curl -s -H \"Authorization: Bearer $HA_TOKEN\" http://127.0.0.1:8123/api/config | grep -o \"\\\"state\\\":\\\"RUNNING\\\"\" > /dev/null'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
and now I can have node-red start after home-assistant has started and finished loading all integrations.
node-red:
image: nodered/node-red
container_name: node-red
hostname: node-red
restart: unless-stopped
user: "0"
environment:
TZ: ${TZ}
ports:
- 1880:1880
volumes:
- ./config/node-red:/data
entrypoint: >
sh -c "
echo 'checking if required modules exist';
if [ ! -d /data/node_modules/node-red-contrib-home-assistant-websocket ]; then
echo 'installing required modules';
npm install --prefix /data --no-audit --no-update-notifier --no-fund node-red-contrib-home-assistant-websocket@latest;
else
echo 'required modules exist';
fi;
echo 'starting node-red';
exec node-red --userDir /data"
depends_on:
home-assistant:
condition: service_healthy
networks:
network:
extra_hosts:
- "home-assistant:host-gateway"