There are several ways to install Home Assistant from scratch and I will show you two different methods (Home Assistant Supervised & Home Assistant Container).

Home Assistant Container & Home Assistant Supervised installation methods (2020)

Check this story if you are in a hurry

What will you get from this article?

The first method – called Home Assistant Container is actually a Home Assistant running in Docker container and it is without Add-on store.

The second one is called Home Assistant Supervised with full Home Assistant experience and Add-on store.

Both methods that I’m about to show you have some Pros and Cons, so you better read the whole article and decide for yourself which one is better for you.

And before you even ask – YES, both methods can be also installed on a Raspberry Pi booting from USB drive.

⬆️ Read this if you want to know more about that topic.

Now Let’s start this:

Home Assistant Container Method

This method is officially supported and you can expect that it will work for a long time. 

You will need a Docker client, just go to this official Docker page and download & install it.

For MacOS and Windows you will need the Docker Desktop from the link above.

Docker Desktop running on MacOS
Docker Desktop running on MacOS

For Linux, again from the link above choose your Linux distribution and follow the instruction.

When you are ready with the Docker client installation you will eventually need to create a free Docker user, which is an easy and straightforward task.

Next, you will need to create an empty folder on the host where the Docker is installed and where the Home Assistant will be running.

On MacOS and Linux you can use something like that, which will create a folder inside user folder. Please, adapt the folder path to your needs.

mkdir ~/EMPTY_FOLDER_ON_YOUR_HOST

In that folder the Home Assistant configuration files will be stored when we execute the docker command.

To do so, just open a terminal/command prompt and enter the following:

docker run --init -d --restart=unless-stopped --name="home-assistant" -e "TZ=Europe/Sofia" -v ~/EMPTY_FOLDER_ON_YOUR_HOST:/config -p 8123:8123 homeassistant/home-assistant:latest

That command means:

  • Download and run the latest Home Assistant Docker image as container named “home-assistant”.
  • Expose port 8123 from the Docker container to the host
  • Use Europe/Sofia as time zone
  • Try to always restart this container if it’s stopped for any reason, unless it is manually stopped by you.

When you run this for the first time you will need Internet connection for the Home Assistant image download. This will take you some time depending of your Internet speed.

When all finish you can open a new browser/tab and enter the following URL:

http://YOUR_HOST_IP:8123

Replace YOUR_HOST_IP with your real host IP and you will be greeted by the Home Assistant welcome page where you can create a user.

Home Assistant Welcome screen for user creation.
Home Assistant Welcome screen for user creation.

Home Assistant Supervised Method

Please keep in mind that the Home Assistant Supervised method was deprecated, but shortly after was put back in support.

Nevertheless there is still no official Home Assistant Supervised installation guide until now. That means this method may stop working at some point in the future, but you don’t have to care too much.

If once successfully install your Home Assistant using the supervised method – you will be able to update your installation from within Home Assistant afterwards.

Final words if you are still in dilemma whether to use this – I just want to say that I used this method for several years in my home and I had some issues which I believe was due to SD card corruption in my Raspberry. Everything else was working flawlessly.

Enough sweet talks, let’s get to the action. Open a terminal and type the following command to update your package manager.

sudo apt-get update

After that you have to install some packages with the following command

sudo apt-get install network-manager apparmor-utils git -y

Chances are that you are already have it, so don’t be surprised if that is the case

Next we have to clone the IOTstack project to make our life easier with Home Assistant Supervised installation.

This project is superb and now it is hosted in the Andreas Spiess (The guy with Swiss accent) GitHub page. So I believe it’s in good hands.

Who is the IOTstack project host?
Who is the IOTstack project host?

Just clone the repo by executing this:

git clone https://github.com/SensorsIot/IOTstack.git ~/IOTstack

To start the Menu:

cd ~/IOTstack && bash ./menu.sh

Subscribe button still in support?

Hey, As far as I know the peyanski.com newsletter is still in support.

You can test it by smashing the SUBSCRIBE button.

If you receive a confirmation mail, and confirm your registration you should receive a bonus material from me (Smart Home Guide Article)

Thank you.

Let’s continue forward:

You will see Norton Commander style menu (OMG I’m getting older) where you can first install Docker if there is such need and then you can choose the “Install Hass.io (Requires Docker)” item from the menu.

Home Assistant Supervised Installation
Home Assistant Supervised Installation

Just hit enter and at some point you will be asked to choose your device type.

For AMD/Intel based computers you can choose “qemux86” or “qemux86-64” for raspberries you have to choose… what do you think? 🤔

The respective raspberry model of course 😉

Choosing device type for Home Assistant supervised
Choosing device type for Home Assistant supervised

Next, you can open a new browser/tab and enter the following URL:

http://YOUR_HOST_IP:8123

Replace YOUR_HOST_IP with your real host IP and you will be greeted by similar page (see below) saying that you can wait up to 20 minutes for your Home Assistant supervised installation to finish.

Waiting for the Home Assistant supervised installation to finish
Waiting for the Home Assistant supervised installation to finish

You can hit the refresh button from time to time or just relax and wait, but the best will be to watch some of my videos ➡️ https://youtube.com/kpeyanski
while you are waiting.

Home Assistant with Virtual Machine Method

There is also another supported installation method (third one) of Home Assistant with full functionalities.

This method was previously known as “Hass.io”, and includes the HA Operating System (HassOS). It can be run on various single-board computers like raspberry pi or in a virtual machine.

Check my detailed video article if you want to know more about this method.

Question of the Day

What Home Assistant installation method you like best?

Bonus points if you say why!

Let me know what you think in the comments below. 

Support my Work

If you like what you see so far and you want more content like this you may want to become one of my supporters (actually the first one) check my support page.

Any other sort of engagement on this site and my YouTube channel does really help out a lot with the Google & YouTube algorithms, so make sure you hit the subscribe, as well as the Like and Bell buttons If you enjoy this Home Assistant Supervised and Container video article.

Also feel free to add me on Twitter by searching for @KPeyanski.  You can find me on my Discord server as well.

I really hope that you find this information useful and you now know how to install Home Assistant from scratch using Home Assistant Container and Home Assistant Supervised methods.

Stay safe and don’t forget Home Smart, But Not Hard!

Thank you for reading, and see you next time.


8 Comments

randy · 31/08/2020 at 9:02 am

Thank you for your work. After doing the 2nd method (Supervisor) install tonight, I got an error at “select device type”. I selected “raspberry pi4” and it errored “no network support on host”. It was a clean install, and I had just completed your instruction to boot raspi 4 from USB. Which works great. Is booting from USB messing up the Hass.io install?

    scott · 08/09/2020 at 7:20 pm

    Same thing happened to me. You just have to install two things, network-manager and apparmor-utils.

      Kiril Peyanski · 10/09/2020 at 11:15 pm

      Thanks Scott for your comment! Hope Randy will report back if it is working now.

Karen · 27/09/2020 at 4:40 pm

First of all this guide is really clear and helpful, so thank you for that.
I’ve hit a problem I don’t know how to get past. I’m trying to use a raspberry pi 4 for 3 functions.
1. a basic file server using samba share and mounted drives
2. a wifi extender using a bridged wireless access point
3. home assistant (supervised)
starting from a clean install of raspberry pi os lite I can get either 1 file server and 2 wifi extender working OR 3 home assistant BUT I can’t get all 3 working together.
I think that it’s the network stuff that’s the problem, but I’m working way beyond my technical ability here so I don’t know what to do to fix.
would you have any suggestions? or could you point me to other help?
I used this to set up 2. wifi extender
https://www.raspberrypi.org/documentation/configuration/wireless/access-point-bridged.md
and this to stet up 1. samba share
https://magpi.raspberrypi.org/articles/samba-file-server
with a few amendments

    Kiril Peyanski · 29/09/2020 at 9:48 pm

    try installing 1 and 3 and check if it will working. Also try install home assistant (supervised) and install samba add-on from the add-on store.

      Karen · 01/10/2020 at 3:43 pm

      Thanks for the reply. I have managed to get 1 and 3 working fine together, OR 1 and 2 working fine together. I just can’t get 2 the wifi extender running with 3. Home assistant.

zlo · 01/11/2020 at 7:06 am

CentOS 8 have not AppArmor 🙁
[error] missing: AppArmor jq

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.