Skip to content

Instantly share code, notes, and snippets.

@brccabral
Last active August 24, 2026 06:42
Show Gist options
  • Select an option

  • Save brccabral/8f4fb1481b8e7aacf50d27a1d7d0c456 to your computer and use it in GitHub Desktop.

Select an option

Save brccabral/8f4fb1481b8e7aacf50d27a1d7d0c456 to your computer and use it in GitHub Desktop.
Home Assistant

Home Assistant

Suggested docker compose uses network as host and there is no /media volume.
https://www.home-assistant.io/installation/raspberrypi-other

Add http section to use it behind a reverse proxy.
https://www.home-assistant.io/integrations/http/

docker-compose.yaml

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./config:/config
      - ./media:/media
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    # network_mode: host
    ports:
      - 127.0.0.1:8123:8123
    environment:
      TZ: America/Los_Angeles
    # net capabilities needed for Bluetooth integration
    cap_add:
      - NET_ADMIN
      - NET_RAW

./config/configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.28.0.0/16 # docker network created with docker-compose.yaml
    - 172.16.0.0/12 # all docker subnets

Trusted proxies are also saved in ./config/.storage/http...

Setup HACS - Home Assistant Community Store: integrations created by the community
https://www.hacs.xyz/docs/use/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment