Debian 12 HA Supervisor installation

Created a VM on Proxmox to run Home Assistant Suprevised. Followed the installation here GitHub - home-assistant/supervised-installer: Installer for a generic Linux system and have a number of years Linux experience. The host has internet access, but HA throws a warning that the node does not have access. This is likely caused by the NM warning of being mis-configured.

Here’s some output:

root@debian-home1:~# nmcli d
DEVICE       TYPE      STATE                   CONNECTION 
lo           loopback  connected (externally)  lo         
docker0      bridge    unmanaged               --         
hassio       bridge    unmanaged               --         
eth0         ethernet  unmanaged               --         
veth486986b  ethernet  unmanaged               --         
veth781900d  ethernet  unmanaged               --         
veth7b67e6a  ethernet  unmanaged               --         
veth8d888fa  ethernet  unmanaged               --         
vethb66a630  ethernet  unmanaged               --         
vethc173334  ethernet  unmanaged               --
root@debian-home1:~# cat /etc/NetworkManager/NetworkManager.conf
[main]
dns=default
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file
managed=true

[keyfile]
unmanaged-devices=type:bridge;type:tun;driver:veth

[logging]
backend=journal

[connection]
connection.mdns=2
connection.llmnr=2

[connectivity]
uri=http://checkonline.home-assistant.io/online.txt

[device]
wifi.scan-rand-mac-address=no
root@debian-home1:~# cat /etc/network/interfaces 
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

I read the interface needs to be managed, and I had them managed, but that was only after editing the config put in by home-assistant.deb package; which seemed wrong, and even when managed home assistant still warned that network manager was not configured correctly.

I’m close, but would appreciate any tips or advice. Thanks in advance!

Could someone do me a favour and post the output of a working system of the above commands? At least I could try and match that. Again, thanks in advance.

image

1 Like

1 Like

Thanks for the posts. Well, I have some real strange activity.

After running the installer instructions I have the output I printed above. I have to then manually active Supervisor eth0 with nmtui which changes the IP.

I am unable to connect to home assistant via a browser at any point, despite the python -m homeassistant process running.

1 Like

Has anyone successfully installed HA Supervisor on Debian 12 recently? Just I’m stepping through each of the manual steps methodically, but after installing the home-assistant .deb networking is broken.

Could someone post their /etc/NetworkManager/NetworkManager.conf, /etc/NetworkManager/system-connections/default, and /etc/network/interfaces files. Thanks!

/etc/NetworkManager/NetworkManager.conf

[main]
dns=default
plugins=keyfile
autoconnect-retries-default=0
rc-manager=file

[keyfile]
unmanaged-devices=type:bridge;type:tun;driver:veth

[logging]
backend=journal

[connection]
connection.mdns=2
connection.llmnr=2

[connectivity]
uri=http://checkonline.home-assistant.io/online.txt

[device]
wifi.scan-rand-mac-address=no


source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback


I don’t have that one

afbeelding

My mistake, I have /etc/NetworkManager/system-connections/Supervisor\ eth0.nmconnection not default. But still, it looks sane.

This is so strange then, because everything looks like it should, I just can’t connect to the HA instance that’s being hosted.

On boot I have this:

debian@home1:~$ nmcli d
DEVICE       TYPE      STATE                   CONNECTION 
lo           loopback  connected (externally)  lo         
docker0      bridge    unmanaged               --         
hassio       bridge    unmanaged               --         
eth0         ethernet  unmanaged               --         
veth4bace57  ethernet  unmanaged               --         
veth78ecc14  ethernet  unmanaged               --         
veth988c9c7  ethernet  unmanaged               --         
vethb77e99d  ethernet  unmanaged               --         
vethc68ce32  ethernet  unmanaged               --         
vethea96991  ethernet  unmanaged               --

It is my understanding, and from the helpful posts here, that eth0 should be managed. I can achieve that by using nmtui and activating eth0. At which point the IP address changes, the device state updates to managed, but still the HA instance is not available.

debian@home1:~$ nmcli d
DEVICE       TYPE      STATE                   CONNECTION      
eth0         ethernet  connected               Supervisor eth0 
lo           loopback  connected (externally)  lo              
docker0      bridge    unmanaged               --              
hassio       bridge    unmanaged               --              
veth4bace57  ethernet  unmanaged               --              
veth78ecc14  ethernet  unmanaged               --              
veth988c9c7  ethernet  unmanaged               --              
vethb77e99d  ethernet  unmanaged               --              
vethc68ce32  ethernet  unmanaged               --              
vethea96991  ethernet  unmanaged               --

So very strange! Any suggestions?

I checked all the container logs and there’s a log of no supervisor internet connection. I have HA running in a firewalled vLAN. Does the installer need internet access to operate locally?

I did test allowing all traffic from the host IP on eth0 but the supervisor still complained about not having internet access. I’m a bit lost at this point.

Okay. I found out at least part of the problem, it’s between the chair and computer … sitting comfortably, I was visiting :80 but HA is :8123.

Still complaining about network manager though:

Unsupported system - Network Manager issues
System is unsupported because Network Manager is missing, inactive or misconfigured. Use the link to learn more and how to fix this.

Found out the reason and workaround to my problem, it is because the interface is not NM managed. I can manually activate the connection and restart all the containers and then HA is happy, but the configuration does not persist over reboots.

I’m searching for the solution, and would be interested if any one else knows of one, or the reason why it doesn’t persistent in the first place!

Still not working. Tried a number of tests to resolve the problem:

  • Verified that the managed=true line is present in the connection profile
  • Checked the autoconnect-priority in the connection profile. Tried setting it to a slightly higher value.
  • Verified UUID
  • Verified autoconnect-configuration with managed=true in NetworkManager.conf
  • Disabled systemd-networkd in case of conflicts
  • Verified ifupdown section with managed=true is present
  • Checked networkmanager logs
  • Restarted networkmanager service

Is anyone else running HA in a Proxmox VM? I’m wondering if there are any oddities to running it in this environment.

You might find the following useful. HAOS runs with no issues under Proxmox VE. From someone managing more than 100 instances.

1 Like

Appreciate it, will definitely take a look. I am so close to having Supervisor sorted though, not that I need it for anything specific, but that I’ve put a bunch of time into automating cloud-init and home-assistant installation that it would seem like a waste to change now :rofl:

I have a sneaking suspicion the issues I have are because the base Linux image is cloud-init based, and it’s doing something with the networking. Only guessing at the moment, no evidence to support the theory.

I got it working in a very inelegant way. Created a systemd service unit that runs nmcli dev set eth0 managed yes on boot after NetworkManager. It’s nasty, but the interface is now managed and connected.

The latter seems to be the culprit of the issue you ran into.

From the Debian 12 news:

The new systemd-resolved package will not be installed automatically on upgrades as it has been split into a separate package. If using the systemd-resolved system service, please install the new package manually after the upgrade, and note that until it has been installed, DNS resolution may no longer work as the service will not be present on the system.

Please also note:

Installing this package will automatically give systemd-resolved control over /etc/resolv.conf. If you don’t want this, follow this post to regain control over /etc/resolv.conf.

In case systemd-resolved is not installed on your system simply running

sudo apt-get install systemd-resolved

should do to solve the issue.

I think I’ve found a solution. The problem is indeed with the cloud images of Debian. They come with netplan and systemd-networkd. This prevents Network Manager from taking over the interface. So the solution is:

$ sudo apt remove netplan.io
$ sudo systemctl disable systemd-networkd

Now when you reboot, Network Manager should take over the interface and the HA Supervisor should be happy.

FWIW this is also what prevents restoring from backup when you first install HA.

Here is my ansible playbook for installing HA Supervised on Debian 12 cloud image:

- hosts: homeassistant
  gather_facts: false
  become: true

  tasks:
  - name: install required packages
    ansible.builtin.apt:
      name:
        - apparmor
        - bluez
        - ca-certificates
        - cifs-utils
        - curl
        - dbus
        - gnupg
        - jq
        - libglib2.0-bin
        - lsb-release
        - network-manager
        - nfs-common
        - systemd-journal-remote
        - systemd-resolved
        - udisks2
        - usbutils
        - wget
      update_cache: yes
      cache_valid_time: 3600
      state: latest
      
  - name: Check if Docker is installed
    command: docker -v
    register: docker_installed
    ignore_errors: true

  - name: Install Docker
    block:
      - name: Add Docker GPG key
        ansible.builtin.shell:
          cmd: |
            install -m 0755 -d /etc/apt/keyrings
            curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --yes --dearmor -o /etc/apt/keyrings/docker.gpg
            chmod a+r /etc/apt/keyrings/docker.gpg
          creates: /etc/apt/keyrings/docker.gpg

      - name: Add Docker Repo
        ansible.builtin.shell:
          cmd: |
            echo \
            "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
            "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
            tee /etc/apt/sources.list.d/docker.list > /dev/null
          creates: /etc/apt/sources.list.d/docker.list

      - name: Install Docker Packages
        ansible.builtin.apt:
          name:
            - docker-ce
            - docker-ce-cli
            - containerd.io
            - docker-buildx-plugin
            - docker-compose-plugin
          update_cache: yes
          state: latest
    when: docker_installed.failed

  - name: Disable systemd-networkd
    ansible.builtin.service:
      name: systemd-networkd
      state: stopped
      enabled: false
  
  - name: Remove netplan
    ansible.builtin.package:
      name: netplan.io
      state: absent

  - name: Install HA OS Agent
    ansible.builtin.apt:
      deb: https://github.com/home-assistant/os-agent/releases/download/1.6.0/os-agent_1.6.0_linux_x86_64.deb 

  - name: Install HA Supervised
    ansible.builtin.apt:
      deb: https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
1 Like

I just changed the configuration of Netplan to hand over control to NetworkManager. HA Supervisor seemed happy with it. Quick fix for my network issues in HA.

"Without configuration, Netplan will not do anything. The simplest configuration snippet (to bring up things via DHCP on workstations) is as follows:

network:
  version: 2
  renderer: NetworkManager

This will make Netplan hand over control to NetworkManager, which will manage all devices in its default way (i.e. any ethernet device will come up with DHCP once carrier is detected)."

" Users should save configurations under /etc/netplan with a .yaml extension (e.g. /etc/netplan/config.yaml).

Then run sudo netplan apply and the configuration is parsed, written, and applied to the system. Since the file is written to disk the the configuration will persist between reboots."

1 Like