Skip to content

Home Assistant

Compiled from these sources: * https://docs.docker.com/engine/install/debian/ * https://www.home-assistant.io/installation/linux#install-home-assistant-supervised * https://github.com/home-assistant/supervised-installer * https://github.com/home-assistant/os-agent

local user: homeassistant installation path: /opt/homeassistant

  • Install Debian 11
    # Docker
    apt install ca-certificates curl gnupg lsb-release
    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    apt update
    apt install docker-ce docker-ce-cli containerd.io
    # to test
    docker run hello-world
    # Home Assistant via pip, alternative further below via docker
    apt install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0 tzdata
    apt install -y jq wget curl udisks2 libglib2.0-bin network-manager dbus
    useradd -rm homeassistant
    mkdir /opt/homeassistant
    chown homeassistant:homeassistant /opt/homeassistant
    sudo -u homeassistant -H -s
    cd /opt/homeassistant
    python3.9 -m venv .
    source bin/activate
    python3 -m pip install wheel
    pip3 install homeassistant
    # run for the first time
    hass
    # Home Assistant via Docker, alternative to the pip variant, see further above
    # Install OS-Agent, select the latest dpkg version from here and adjust the link
    # https://github.com/home-assistant/os-agent/releases/tag/1.2.2
    wget https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_x86_64.deb
    dpkg -i os-agent_1.2.2_linux_x86_64.deb
    # Run installation script
    wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
    dpkg -i homeassistant-supervised.deb
    ###
    ###
    ### I stopped here
    ### Docker interfered with my nftables firewall rules
    ### supervised container complained about not being able to connect to the internet
    ### Docker is just crap
    
    At this point the service is running. I recommend exposing it through a reverse proxy with SSL offloading.