Installing Home Assistant Supervised using Debian 12

His directions do not look like they are specific to the rpi, just that they were tested on the pi4. I would think with all the Linux experts here someone should be able to verify it for you.

it is just the last step you have to change (installing os-agent), but that is explained in the opening post of this topic under step 3

No, it is not explained. There is no step 3 in the OP.
You may mean step 2.3, but also there is no mention of installing OS agent, for example.

Iā€™m struggling for three weeks already to find a correct, complete and valid information about this in one single place. So frustratingā€¦

OK, if you need a little more hand-holding :

For those who want to upgrade from Debian 10 (Buster) to Debian 11 (Bullseye) without starting from scratch, here comes how it can be done easily

In a console as the unprivileged user (not root) :

sudo sed -i 's/buster/bullseye/' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/' /etc/apt/sources.list.d/*.list
sudo sed -i 's|bullseye/updates|bullseye-security|' /etc/apt/sources.list

Only if you previously have installed Debianā€™s MQTT broker (mosquitto) on the OS level (not as a HA Add-on):

sudo sed -i 's/bullseye/buster/' /etc/apt/sources.list.d/*mosquitto*.list

Continue with the OS upgrade:

sudo apt update

Only if you see the following error message after ā€œsudo apt updateā€:

The value 'buster' is invalid for APT::Default-Release as such a release is not available in the sources

Run:

sudo sed -i 's/buster/bullseye/' /etc/apt/apt.conf
sudo apt update

Now continue with:

sudo apt upgrade
sudo apt full-upgrade
sudo apt autopurge

The above will take some time. After it has finished itā€™s time to reboot the host:

sudo systemctl reboot

After the system has rebooted, open a new console and execute (again, as non-root):

sudo apt --fix-broken install
sudo apt-get install udisks2 wget
cd /usr/local/src

Now visit the OS Agent page and then replace the version number with the latest available, into the commands below. (i.e. replace all references to 1.2.0 with the latest available release):

sudo wget https://github.com/home-assistant/os-agent/releases/download/1.2.0/os-agent_1.2.0_linux_x86_64.deb
sudo dpkg -i os-agent_1.2.0_linux_x86_64.deb

sudo systemctl reboot
18 Likes

Thank you very much for holding my hand for a second. Now wash your own hands properly, because my were already swetting hardly :stuck_out_tongue:

With this help it worked fine. The problem was, everything Iā€™ve tryed yesterday I dit as root, that did not workedā€¦

And thatā€™s what I mean, when asking for complete instructions all together on one place. Like this, even a Linux child, like me, can manage a lotā€¦ :smiley:

As a golden rule for *nix in general: Avoid doing OS-level administrative tasks as root but switch to an unprivileged user (non-root) for those kind of tasks and prepend the term "sudo" to each command.
Thus there will be little chance that you will be able to configure your system to death (besides of avoiding all sorts of ownership/permission errors which might occur if all is done as the root user) :woozy_face:

1 Like

10000 X This ^^^^^^^
You are just asking for trouble.
I NEVER set a root password when I setup debian. If you do then it wonā€™t install sudo for you. Itā€™s just bad practise and dangerous to use the ā€˜rootā€™ userā€¦ (and unnecessary)

2 Likes

Ok, did not know that. Everyday I learn something newā€¦ Thanks

Hi all. Great topic, thanks very much. I grabbed a second HP Intel i5 PC and had a bash at this to see how it worked. Now, Iā€™m a complete novice. I can google and I can copy and paste, but outside of that, have no developer, docker or linux experience. But was interested to see how this compared to my Win10 Hypervisor setup.

It worked brilliantly.

Iā€™ve now got a dev rig going with a HA supervised and docker containers running everything from TVheadend to a Plex Media Server. I even just plugged in a ZHA device to see how it would handle that - completely plug and play. Amazing.

So my question is - why do people describe this installation as ā€œfinickyā€ in parts of this thread. Other posts suggest that it might lose its ā€œsupportedā€ status? Why? In my limited little experience, this install method seems to be as solid as anything else Iā€™ve tried. And certainly far better than my aborted attempt at using virtual box in Win10, which was just a complete nightmare (HA containers continually corrupted). My main setup has a pretty high workload with things like Frigate NVR doing detection etc, so I have never seriously entertained a Pi setup.

Iā€™m thinking of moving this dev rig into becoming my prod rig. Should I? The only thing holding me back is the commentary here (oh and Davidā€™s 10.6 experience above, that I didnā€™t understand at all). And does using ā€œdevā€ and ā€œprodā€ make me sound like any less of a hack?

Not going to happen from what I can see but people do love to speculateā€¦

Well if you have the skills to manage a linux install and keep it up to dateā€¦ I donā€™t remember the 10.6 experienceā€¦ was that a dud docker update? I really donā€™t rememberā€¦ but that is part of the joy of managing linux.

Because over a year ago it was marked as ā€˜deprecatedā€™. Fortunate enough, there were so much comments at this decision they revered it.

It is very stable.

As long as you donā€™t go messing about with the Docker Containers or doing too much with the OS, you will almost never have an issue, or certainly not an issue that other install types wouldnā€™t face.

All of the caveats around Supervised came from the Devs, and have been passed on many users, myself included. That doesnā€™t mean I agree with the Devs stating, ā€œThis method is considered advanced and should only be used if one is an expert in managing a Linux operating system, Docker and networking.ā€

Youā€™ve already discovered one of the main advantages of Supervised - installing a bunhc of other software on the same machine. As long as you know how install and remove said software without stuffing about with HA in the process, youā€™ll be fine.

Yeah, a Win 10 install is just a bad idea.

Sure, why not.

The great thing with Supervised or HA OS installs is having backups/snapshots. If you ever have an issue with your machine or install, just start fresh and restore your backup/snapshot. Youā€™ll be back online in 30mins. If you arenā€™t already, use the Google Drive Backup tool.

1 Like

I do not see any difference between using for example sudo dpkg or at first switch to root with sudo -i and then apply all commands as root. Linux experience over 10 years.

As I am still relatively new with Linux I did some research to see what the difference are:

https://unix.stackexchange.com/questions/35338/su-vs-sudo-s-vs-sudo-i-vs-sudo-bash

Environmental variables and path seems to be the difference. As I donā€™t have the knowledge yet I am not sure if it matters for most commands but I think it does for some. I know when I was first installing I did it as root and had some issues.

sudo -i indeed gives you a (temporary for the running session) root shell.

It eventually boils all down to best practises with doing administrative tasks on Linux and is all about the basics such as ownership, permissions, and how to use sudo in such a way that new users do not break their systems.

A substantial number of HA Supervised on Debian users are new to Linux. There is a learning curve associated with any OS and many new users try to take shortcuts by enabling the root account, logging in as root, and changing ownership of system files.

Getting those users into the habit of using sudo rather than working purely as root, which is not needed to run HA anyway, might avoid the ā€œI can do anythingā€ by default. They will be prompted for a password before major changes can happen, which should make them think about the consequences of what they are doing. Learning by breaking their system is frustrating and can result in data loss.

1 Like

and lets face it Linux not only gives you the bazooka and ammunition it points it at your head and helps you pull the trigger with a smile on your faceā€¦ particularly if you enable and use the ā€˜rootā€™ user. Itā€™s just poor/bad practise.

2 Likes

If you arenā€™t already, use the Google Drive Backup tool.

Excellent tip thanks - Iā€™ve been manually doing the snapshot thing until now.

And after fighting the password thing a while, I did a fresh install of Debian 11 and HA, restored from backup, and itā€™s fine.

1 Like

Francis, your my hero!

Hi, I try to install Hassio or HA Supervised in a Docker on a Ubuntu machine.
I have made to step 2 in your instruction but I can see from the ā€œdocker container lsā€ command that I donā€™t have any Home-Assistant container in my Docker.
And I canā€™t connect to the HA fontend with ip-address:8123.
I donā€™t know what the problem is, could you please help me?