Guide: How to install Home Assistant supervised on Rpi4 with RaspiOS (64 bit) - October 2022

Thank you, @valkanoise !

That was a much better guide than others. Definitely better this way as I have several other things to install and I don’t want HA hogging an entire machine.

Shame the narrative from HA here is “don’t do this, things WILL break”. It should be enough to say “we won’t support you” so that people can make their own decisions.

2 Likes

Don’t do that, things will break :wink:

1 Like

Thank you @valkanoise for your contribuition… I´ll try that today!
Something seems wierd when using Home Assistant OS, it’s strange not being able to take control of a system that is running on my own equipment.
It’s hard to even access the host system over ssh.
I´ve just plugged the SD card on my laptop and I saw that partitioning system only shows the boot and a RAW partition…
It’s like it wants to hide something, leave the user captive of what you want to show him and nothing else.

That’s why I appreciate initiatives like yours.

I saw here above that some version of supervisor is no longer installable on raspberry pi OS, so I thought “why all this effort to prevent users from following this solution? let people try it at their own risk.”

Like I said, it’s weird in the opensource world…

PS: I´m sorry if anything seem odd, I´m not a native english speaker. :sweat_smile:

Anyway… best wishes!

That’s because your OS (likely Windows) doesn’t know about the Linux ext file system format. If you were to try it on a Linux system, or install drivers for the ext file system, you’d see them.

That´s the weird thing I´ve found… My system has ext drivers because I work with linux and windows users, soon I must have ways to deal both systems…

And anyway the ext filesystem didn´t show up…

Like many who commented above, I am running a few different things on my Rasbperry Pi and don’t want to start from scratch with Debian.

From my perspective @valkanoise has done a helpful service to those of us who understand what we’re getting into running on an unsupported distribution.

I don’t understand a few things —

  1. What the issues would have been with running on RaspiOS — since RaspiOS is debian-based anyway I don’t understand why there would have been a huge difference in the setup?
  2. Why the admins feel the need to continuously say “don’t do that”… seems like at this point you’ve spent as much energy saying “no no no no” as you would have explaining the actual issues you thought we would run into.
  3. Why it was necessary to completely disable the installer on non-debian… again, seems like a non-community-friendly response to what I get could. “INSTALLING ON THIS OS IS NOT SUPPORTED” seems like a more common way to handle this situation… leaving the warning sign rather than spending the extra time to build a wall.

At this point it may be moot and I think I may just try to install debian from scratch and re-create my setup (which is annoying partly bc the Raspberry Pi imager does not come with Debian so I have to run out and try to find an img to install), but I wanted to comment as someone new to the forum.

1 Like
  1. Because based on isn’t identiical. There will be differences in package versions, some minor some very not minor and resulting in things failing
  2. Because nobody believes that it’ll break on them and assumes that those who claim it are lying
  3. Because everybody believes that it doesn’t apply to them, and then blames the devs when it breaks

And … you’ve already decided the requirements don’t apply to you :man_shrugging:

Hello there!

I am seeking advice. Current status is a freshly installed debian 11 on a raspberry PI 4/4GB and a 240GB Kingsston SSD, most of the requirements check out so far:


root@homeassistant-ssd:/home/X# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

X@homeassistant-ssd:~$ apt list systemd udisks2 apparmor
Listing... Done
apparmor/stable,now 2.13.6-10 arm64 [installed]
systemd/stable,now 247.3-7+deb11u2 arm64 [installed]
udisks2/stable,now 2.9.2-2+deb11u1 arm64 [installed]

When with step 2 the attempt on the install is made the installer fails: (ran uptime to prove its a freshly rebooted system)

X@homeassistant-ssd:~$ uptime
 06:10:26 up 3 min,  1 user,  load average: 0.03, 0.03, 0.00
X@homeassistant-ssd:~$ curl -fsSL get.docker.com | sh

# Executing docker install script, commit: a8a6b338bdfedd7ddefb96fe3e7fe7d4036d9                                                                             45a
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transp                                                                             ort-https ca-certificates curl >/dev/null
E: Sub-process /usr/bin/dpkg returned an error code (1)
X@homeassistant-ssd:~$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is t                                                                             he docker daemon running?.
See 'docker run --help'.
X@homeassistant-ssd:~$ sudo service docker start
Job for docker.service failed because the control process exited with error code                                                                             .
See "systemctl status docker.service" and "journalctl -xe" for details.
X@homeassistant-ssd:~$ systemctl status docker.service
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset>
     Active: failed (Result: exit-code) since Fri 2023-05-05 06:12:33 UTC; 2s a>
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 1285 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/contain>
   Main PID: 1285 (code=exited, status=1/FAILURE)
        CPU: 906ms


root@homeassistant-ssd:/etc/# dockerd
INFO[2023-05-05T06:54:07.331901482Z] Starting up
INFO[2023-05-05T06:54:07.355389939Z] [graphdriver] using prior storage driver: fuse-overlayfs
INFO[2023-05-05T06:54:07.368770730Z] Loading containers: start.
WARN[2023-05-05T06:54:07.383102773Z] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: could not insert 'bridge': Exec format error
modprobe: ERROR: could not insert 'br_netfilter': Exec format error
insmod /lib/modules/6.1.21-v8+/kernel/net/llc/llc.ko
insmod /lib/modules/6.1.21-v8+/kernel/net/llc/llc.ko
, error: exit status 1
INFO[2023-05-05T06:54:07.410830939Z] unable to detect if iptables supports xlock: 'iptables --wait -L -n': `modprobe: ERROR: could not insert 'ip_tables': Exec format error
iptables v1.8.7 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.`  error="exit status 3"
INFO[2023-05-05T06:54:07.848969514Z] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: modprobe: ERROR: could not insert 'ip_tables': Exec format error
iptables v1.8.7 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
 (exit status 3)

The installer fails after the docker-ce’s post install configuration. The same error comes of i attempt the install with “| sudo sh”
Output of the “journalctl -xe” is here: X@homeassistant-ssd:~$ suroot@homeassistant-ssd:/home/X# journalctl -xeMay 0 - Pastebin.com

So far googling asked me to find a /etc/docker/daemon.json file, but its not there
Tried fixes around the iptables, but no luck so far.

Anyone experienced the same error, or is there any version conflict with the present docker version?

Did you already have Docker installed?

No, the message comes from a previously attempted install with the same script (also tested the script from the Install Docker Engine on Debian | Docker Documentation site, but same errors.

EDIT: Purged the whole docker stuff, and attempted the manual install from the docker.com guide for debian 11

X@homeassistant-ssd:~$ dpkg --print-architecture
arm64
X@homeassistant-ssd:~$ sudo apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Hit:4 https://download.docker.com/linux/debian bullseye InRelease
Reading package lists... Done
X@homeassistant-ssd:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  docker-ce-rootless-extras git git-man liberror-perl libltdl7 libslirp0 patch slirp4netns
Suggested packages:
  cgroupfs-mount | cgroup-lite git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn ed
  diffutils-doc
The following NEW packages will be installed:
  containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin git git-man liberror-perl libltdl7 libslirp0
  patch slirp4netns
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/94.6 MB of archives.
After this operation, 377 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package containerd.io.
(Reading database ... 31662 files and directories currently installed.)
Preparing to unpack .../00-containerd.io_1.6.20-1_arm64.deb ...
Unpacking containerd.io (1.6.20-1) ...
Selecting previously unselected package docker-buildx-plugin.
Preparing to unpack .../01-docker-buildx-plugin_0.10.4-1~debian.11~bullseye_arm64.deb ...
Unpacking docker-buildx-plugin (0.10.4-1~debian.11~bullseye) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../02-docker-ce-cli_5%3a23.0.5-1~debian.11~bullseye_arm64.deb ...
Unpacking docker-ce-cli (5:23.0.5-1~debian.11~bullseye) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../03-docker-ce_5%3a23.0.5-1~debian.11~bullseye_arm64.deb ...
Unpacking docker-ce (5:23.0.5-1~debian.11~bullseye) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../04-docker-ce-rootless-extras_5%3a23.0.5-1~debian.11~bullseye_arm64.deb 
Unpacking docker-ce-rootless-extras (5:23.0.5-1~debian.11~bullseye) ...
Selecting previously unselected package docker-compose-plugin.
Preparing to unpack .../05-docker-compose-plugin_2.17.3-1~debian.11~bullseye_arm64.deb ...
Unpacking docker-compose-plugin (2.17.3-1~debian.11~bullseye) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../06-liberror-perl_0.17029-1_all.deb ...
Unpacking liberror-perl (0.17029-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../07-git-man_1%3a2.30.2-1+deb11u2_all.deb ...
Unpacking git-man (1:2.30.2-1+deb11u2) ...
Selecting previously unselected package git.
Preparing to unpack .../08-git_1%3a2.30.2-1+deb11u2_arm64.deb ...
Unpacking git (1:2.30.2-1+deb11u2) ...
Selecting previously unselected package libltdl7:arm64.
Preparing to unpack .../09-libltdl7_2.4.6-15_arm64.deb ...
Unpacking liblt
1-2_arm64.deb ...
Unpacking slirp4netns (1.0.1-2) ...
Setting up liberror-perl (0.17029-1) ...
Setting up docker-buildx-plugin (0.10.4-1~debian.11~bullseye) ...
Setting up containerd.io (1.6.20-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up patch (2.7.6-7) ...
Setting up docker-compose-plugin (2.17.3-1~debian.11~bullseye) ...
Setting up libltdl7:arm64 (2.4.6-15) ...
Setting up docker-ce-cli (5:23.0.5-1~debian.11~bullseye) ...
Setting up libslirp0:arm64 (4.4.0-1+deb11u2) ...
Setting up git-man (1:2.30.2-1+deb11u2) ...
Setting up docker-ce-rootless-extras (5:23.0.5-1~debian.11~bullseye) ...
Setting up slirp4netns (1.0.1-2) ...
Setting up docker-ce (5:23.0.5-1~debian.11~bullseye) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Fri 2023-05-05 08:39:32 UTC; 34ms ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 2670 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 2670 (code=exited, status=1/FAILURE)
        CPU: 1.036s
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Setting up git (1:2.30.2-1+deb11u2) ...
Processing triggers for libc-bin (2.31-13+deb11u6) ...
Errors were encountered while processing:
 docker-ce
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
X@homeassistant-ssd:~$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

All the other logs are fully identical to my previous post in #480855

I have a problem with installation on my new raspbery pi 4 8gb with os version:
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64

Im trying to follow exact the instractions of :Guide: How to install Home Assistant supervised on Rpi4 with RaspiOS (64 bit) - October 2022

but cant proceed to installation always i get that error:

root@raspberrypi:/home/pi# dpkg -i homeassistant-supervised.deb

Selecting previously unselected package homeassistant-supervised.
(Reading database ... 97463 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
[warn] ModemManager service is enabled. This might cause issue when using serial                      devices.
Adding 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkMana                     ger/NetworkManager.conf.real by homeassistant-supervised'
Adding 'diversion of /etc/NetworkManager/system-connections/default to /etc/Netw                     orkManager/system-connections/default.real by homeassistant-supervised'
Adding 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by                      homeassistant-supervised'
Adding 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by                      homeassistant-supervised'
Unpacking homeassistant-supervised (1.5.0) ...
dpkg: dependency problems prevent configuration of homeassistant-supervised:
 homeassistant-supervised depends on systemd-resolved; however:
  Package systemd-resolved is not installed.

dpkg: error processing package homeassistant-supervised (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 homeassistant-supervised
root@raspberrypi:/home/pi# sudo apt --fix-broken install

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  homeassistant-supervised
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 97480 files and directories currently installed.)
Removing homeassistant-supervised (1.5.0) ...
[info] Undo divert on remove
Removing 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkMa                     nager/NetworkManager.conf.real by homeassistant-supervised'
Removing 'diversion of /etc/NetworkManager/system-connections/default to /etc/Ne                     tworkManager/system-connections/default.real by homeassistant-supervised'
Removing 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real b                     y homeassistant-supervised'
Removing 'diversion of /etc/network/interfaces to /etc/network/interfaces.real b                     y homeassistant-supervised'
[info] Resetting debconf selections
[info] Removal complete, due to the complexity of this installation method,
[info] you will need to manually remove the containers created by the supervisor
root@raspberrypi:/home/pi#

I saw somewere that this OS isnt compatible with supervised , so i cant change OS because is very reliable on RASP 4 , what the solution in case that want to use homeassistant with all features?
And NO i dont want to kill my raspberry features to install only the home assistant OS , that raspberry will run services like unify controller ,etc
i had raspberry pi 3 without any problem .
Please give me a solution, simply want install the home assistant is that so dificutl???

Run Home Assistant Container. The only thing you “miss” is the ability to install software in the HA UI, aka add-ons. There’s nothing special about them, almost all of them are based on an existing Docker container, or have an equivalent option.

Unfortunately, hacs is very useful for me, also the previous backup was with hacs and other addons like rpc shutdown, samba, etc.
So i cant do anything esle? To have new raspberry and the full home assistant?

That’s fine, HACS is an integration, and integrations work no matter how you install Home Assistant.

HACS isn’t an add-on, but most of your add-ons can be installed as Docker containers.

If by full you mean add-ons, then no. You either need to run Supervised according to the requirements (which also means not running other software on it), or you run Home Assistant OS.

What is wrong with

 sudo apt-get install systemd-resolved

?

root@raspberrypi:/home/pi#  sudo apt-get install systemd-resolved
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package systemd-resolved is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'systemd-resolved' has no installation candidate
root@raspberrypi:/home/pi#

Hey regarding that notice,
i searched a litle and found that post:

Followed that bypass command:
dpkg -i --ignore-depends=systemd-resolved homeassistant-supervised.deb

And finally i have full supervised HA again!

How should be the command to put this in autostart of RPI4?

Thank you for the instructions. I have receive the following error that I cannot seem to resolve. Can you provide any guidance?

dpkg: error processing package homeassistant-supervised (–configure):
installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
homeassistant-supervised
E: Sub-process /usr/bin/dpkg returned an error code (1)

Check this GitHub - home-assistant/supervised-installer: Installer for a generic Linux system.

You are missing some dependencies