Benutzer-Werkzeuge

Webseiten-Werkzeuge


content:serverbasics:docker-homeassistant
This version is outdated by a newer approved version.DiffThis version (2025/08/12 08:03) was approved by obel1x.The Previously approved version (2025/08/12 08:02) is available.Diff

Dies ist eine alte Version des Dokuments!


Docker: Homeassistant

Homeassistant is a powerful Homeautomation- Software you can get from here: https://www.home-assistant.io/

Docker

In your Docker- Compose Directory, create the folder homeassistant and a new file docker-compose.yml as always and add:

services:
  homeassistant:
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - homeassistant_config:/config
      - /run/dbus:/run/dbus:ro
    ports:
      - 8123:8123
    restart: unless-stopped
#    environment : {}
    networks:
      - default

volumes:
  homeassistant_config:

networks:
# Still needs to be defined while without it won't enable ipv6
  default:
    driver: bridge
    enable_ipv6: true

Thats all - you can start Homeassistant.

Caddy integration

After getting a subdomain for homeassistant, add to your Caddyfile:

# Homeassistant - Postgres- Administration
https://homeassistant.domain.tld:443 {
        header Strict-Transport-Security max-age=31536000;
        reverse_proxy dockerstack-homeassistant-1:8123
}

And Restart your Caddy- Container.

If you get 400: Bad Request with your HA- Logs saying no proxy configured, got to the config-volume of ha and add to configuration.yaml the following lines:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - XXX.XXX.XXX.XXX # Add the IP address of the proxy server

Where that adress really needs to be the IPv4 of the docker Container, not the external IP and also not its name in Docker.

Furtunatelly you can give the Network- Mask, so 172.19.0.0/16 will work too.

content/serverbasics/docker-homeassistant.1754978614.txt.gz · Zuletzt geändert: von obel1x

Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki