Make Home Assistant publicly reachable via Cloudflare

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-18 15:10:08 +02:00
co-authored by Claude Opus 5.5
parent 9c7b029d65
commit daf87b7b7c
2 changed files with 10 additions and 10 deletions
+6 -3
View File
@@ -4,9 +4,12 @@ Helm chart for [Home Assistant](https://www.home-assistant.io/) (container insta
single-node cluster (`loki`), deployed by ArgoCD via the `apps-in-apps` repo into the single-node cluster (`loki`), deployed by ArgoCD via the `apps-in-apps` repo into the
namespace `homeassistant`. namespace `homeassistant`.
URL: https://homeassistant.smokyzone.de (LAN / Tailscale only; the DNS record URL: https://homeassistant.smokyzone.de - **public**, like git: the DNS record is a
points at the node's private IP `192.168.2.218`). Certificate from Cloudflare-proxied CNAME to `git.smokyzone.de` (public IP kept current by the ddns
`letsencrypt-dns-cloudflare` (DNS-01). CronJob), the router forwards 443 to the ingress. The companion app works without VPN.
Protection is HA itself: every user needs MFA (TOTP), and the HTTP settings ban an IP after
5 failed logins (ingress-nginx passes the real client IP from Cloudflare's
`CF-Connecting-IP`). Certificate from `letsencrypt-dns-cloudflare` (DNS-01).
## Design ## Design
+4 -7
View File
@@ -43,7 +43,10 @@ seedConfiguration: |
ingress: ingress:
enabled: true enabled: true
className: nginx className: nginx
# https://homeassistant.smokyzone.de (ingress-nginx hostPort 443; NodePort :30444 also works) # Public like git (user decision 2026-10-18): the DNS record is a Cloudflare-proxied
# CNAME to git.smokyzone.de (kept current by the ddns CronJob), the router forwards 443
# to the ingress. So the companion app works without Tailscale. No source allow-list on
# purpose; protection is HA's login + MFA + ip_ban. The other apps stay LAN/Tailscale-only.
host: homeassistant.smokyzone.de host: homeassistant.smokyzone.de
clusterIssuer: letsencrypt-dns-cloudflare clusterIssuer: letsencrypt-dns-cloudflare
annotations: annotations:
@@ -51,12 +54,6 @@ ingress:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-body-size: 100m nginx.ingress.kubernetes.io/proxy-body-size: 100m
# LAN-only: home network + pods (incl. the Tailscale subnet router, 10.1.0.0/16), but
# NOT 192.168.2.218 - the router's internet forward (443 -> NodePort 30444, for git)
# arrives SNATed as the node's own IP. So internet clients that send this hostname
# get 403, while LAN clients reach the ingress directly on hostPort 443 with their
# real IP. Side effect: LAN access via :30444 is blocked too (use the URL without port).
nginx.ingress.kubernetes.io/whitelist-source-range: "192.168.2.0/25,192.168.2.128/26,192.168.2.192/28,192.168.2.208/29,192.168.2.216/31,192.168.2.219/32,192.168.2.220/30,192.168.2.224/27,10.1.0.0/16"
# USB radios (Zigbee/Z-Wave sticks), e.g. /dev/serial/by-id/usb-...; needs privileged. # USB radios (Zigbee/Z-Wave sticks), e.g. /dev/serial/by-id/usb-...; needs privileged.
devices: [] devices: []