Just installed HA on Ubuntu 20.04 - went flawless

I’m sure you get all sorts of complaints and “wishes” on this forum.

(This time!) I just want to report that I’ve installed Home Assistant for the first time for me on Ubuntu 20.04 and it went flawless.

Good job guys!

I know a flawless installation is not an easy thing to offer to the end-user.

I’ve used the supervisor script.

We’re also moving our company product to Docker deployment and was thinking to write a bash script to ease things for the end-user.

Now I have a great and short (!) example: https://github.com/home-assistant/supervised-installer/blob/be010f288d3913cc7f753c2277e7b1bea1379e55/installer.sh

Good job again and thanks for your work!

Running Supervisor on Ubuntu 18.04 and haven’t upgraded to 20.04 yet, since I do not want my hass.io to break. Sounds like I do not have to worry so much.

I was trying to use the script, but got the error “cannot create the /root directory”, any ideea why?

You need to run the install steps as root.

Note that there is a sudo -i (which switches you to root user) before the commands.

Which is an unfortunate decision (when the installer script was designed) because then everything (Home Assistant Core, Supervisor, and any installed add-ons like mosquitto, Node-Red, etc) runs with root-level permissions.

In contrast, installing Home Assistant Core in a virtual environment (venv) or as a Docker container can be done using an account without root-level permissions (same for mosquitto, Node-Red, etc). The resulting installation is more secure because it cannot access things that don’t belong to it.

I don’t have the whole story now (I have HA running on another NUC), but a few things are surely not quite like that:

  • you need root to install a systemctl daemon
  • virtualenv installation means just running one process, it will not restart when the system boots and theer are other components missing (like addons I think)

Can someone clarify if the Docker containers run as root?

Thank you, I still got the same error, may be I have a problem with my Ubuntu installation, I will re-install everything form scratch.

Post some screenshots, errors and full list of commands you’re running.

Me too, Ubuntu 20.04 Server running docker, all went smoothly, did have an issue with MariaDB being corrupted after restore but looking around the forums this seems to be an unfortunate side effect of the snapshot/recovery process which i have been lucky enough to not encounter previously.

Hi, I run again the command and got the following:

[email protected]:~$ sudo -i curl -sL https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh | bash -s
ModemManager.service disabled enabled
[Warning] ModemManager service is enabled. This might cause issue when using serial devices.
mkdir: cannot create directory ‘/root’: Permission denied

I also don’t know why I have the warning about the modem, because I did before:

systemctl disable ModemManager
systemctl stop ModemManager

Yes prepending sudo to the systemctl command will prompt you for the root password to perform that part of the installation with root-level privileges.

  • virtualenv installation means just running one process, it will not restart when the system boots and theer are other components missing (like addons I think)

You start it using systemd just like its done with Docker itself and with any other application that must start automatically. Of course there are no addons because the venv installation is for Home Assistant Core. Additional services like mosquitto, Node-Red, etc are installed separately in the traditional manner (and you also use systemd to start them automatically … and they also don’t have to run as root).

Can someone clarify if the Docker containers run as root?

Docker itself must run as root but not docker containers.

It’s all possible but, admittedly, complicates the installation script so it was probably decided to just make everything run with root permissions.

Solved, I forgot to add at the end qemux86-64

Did you install any snaps? docker is a snap option but some people seem to have issues with that (I did on 18). But the install script appears to check if docker is a snap or not implying it’s been accounted for but there is another thread on here that indicates it still doesn’t work right.

I would advise not to install Docker via snaps as it moves your HA config from the standard location.

I opted no on any/all snaps. So did the standard install and up and running fine.

No. Just followed Docker documentation to install it.

Thanks for this information!

I used the Docker snap without knowing it was a bad idea and now can’t find my config directory. Do you happen to know where it is? Or should I cut my loses and reinstall without the Docker snap?

Yep, do this

1 Like

I upgraded from 18.04 to 20.04 and it went very smoothly, no problems at all. This was about a week after 20.04 was released. Been running since with restarts only for updates.

Terry

I can tell the same successful story.

I just upgraded the Ubuntu following the instructions from Ubuntu.

And then there was a little bit of editing of the apt resource files so that my Deconz, Unifi, and Docker CE repositories points at “focal” instead of bionic. When you upgrade all manually added repos listed in /etc/apt/sources.list and files /etc/apt/sources.list.d are disabled (a # added in front of them) and then the idea is that you manually update them by updating the bionic to focal when it is available.

When I upgraded deconz was still not on focal but that was fixed few weeks after. Docker CE had their ready on the first day.

In most cases all you need to do is change bionic to focal and remove the comment #

And if anyone wonder.
I run anything I can natively and not in addons. That is my preference.