Hello all,
Let me explain my setup to you:
I have home assistant as container running an an Intel NUC and together with all the other addons like e.g. Cloudflare, Zigbee2MQTT or Portainer managed via docker-compose.
My Home Assistant Container is reachable via a Cloudflare Tunnel.
docker-compose.yml:
[...]
cloudflare:
container_name: cloudflare
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
restart: unless-stopped
environment:
- TZ=Europe/Brussels
volumes:
- /home/sebastian/docker/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro # Bluetooth adapther
privileged: true
network_mode: host
depends_on:
- mariadb
- influxdb
- mosquitto
[...]
My goal is to access home assistant itself and all the other addons on the sidebar via my DNS name and the Cloudflare tunnel.
The Cloudflare tunnel is forwarding to http://<my_local_IP>:8123.
As a result, I can access my home assistant via https://<my_DNS_name>.
My issue:
When accessing the other addons e.g. zigbee2mqtt on the side bar of home assistant via their local IP (http:<container_ip:) I’m getting the following error:
Workaround: Subdomain in Cloudflare for every add-on and pointing to the Subdomain DNS name in the sidebar of home assistant (https).
But the issue of this approach is that the addons themselves are unprotected accessible via the public internet.
=> Do you have an idea how I could protect these subdomains without limiting the access for myself or how to get it working using the http addresses for the addons?
If I add an Application Authentication via Cloudflare for the subdomains, iOS will not be able to handle that and I cannot limit it via IP address as I also want to access it via mobile network without VPN.