Raspbian + Docker + HassIO

Hi all, first time posting, long time lurker.

During up coming holidays, I plan to move from Raspberry Pi 3 B (2016 model) to a brand new Raspberry Pi 4 (2019 4GB model). My pi3 setup consisted of Hassbian, NGINX, Deconz, pi-hole, etc, and a few of my own C programs.

Reason for not directly using HassIO image file on Pi 4 is because I had tried HassIO about 4-6 months ago and found SSH terminal too limited, it’s not a true Linux CLI. No GCC, I can’t run normal Linux commands and I’ve no access to underlying OS.

Because support for Hassbian has been dropped, also I have my own GCC compiled programs I’d like to run and I’m comfortable in Linux CLI. I have decided to start afresh with Raspbian image for Pi4 and install HassIO via Docker.

The Docker compose install method looks very tidy.

My questions are:

  1. Is this install method recommended? This method seems like no brainer approach for people comfortable with Linux CLI, but I see most people seems to stick with standard HassIO image on Pi.
  2. Any pitfalls with this method? Everything in HassIO will work with this method, correct? Stuff like update home assistant via UI, add-ons, snapshots.
  3. How will USB accessary work for Deconz add-on? I found this tutorial for standard HASSIO, how does abstracting another layer with Raspbian + Docker affect USB ID’s?
  4. How about Bluetooth trackers?
  5. What about System Monitor?
  6. I have 2 subnet, one for home, one for IoT devices. Pi 3 uses wired for home and general access, wireless for IoT subnet. Will both network be passed into the Docker instance?

Hope to do as much as possible within HassIO using addons and rely on snapshot feature. So any hardware/SD failure I’ll only need re-do initial docker setup, all home automation related will be restored via snapshot feature.

Finally, whole Docker concept is new to me. Can anyone recommend a crash cource on Docker, enough to understand what’s going on behind the scenes with HassIO and Supervisor?

Many thanks in advance.

HassIO != Docker

You only get add-ons if you’re using the Hass.io installer. If you use pure Docker then you don’t get those.

  1. Yes
  2. You won’t get HassIO that way :wink:
  3. Depends on whether you’re using HassIO or Docker…
  4. Will work
  5. Probably won’t, since it’ll run in the container, not the host
  6. If that’s how you configure things, sure

While you’re doing all that then I’d also highly reccomend a USB SSD if you’re not already.

I made the move from HassOS to a linux install. I just installed Raspbian and followed the guide to install HassIO and had no problems using a USB Z-Wave stick and a Conbee stick.

1 Like

Thanks! Ok, I had not asked my question correctly. Should have looked at the Docker install tutorial more carefully before posting.

The question I meant to ask is:
Is this Docker HassIO install script a good way to go?

Because it doesn’t appear to be recommended (only HassIO or Docker are recommended, as you’ve rightly pointed out), any pitfall / limitations with HassIO in Docker?

What exactly is HassIO? Home Assistant is a python based program. HassIO manages add-ons in similar way as a Docker manager. So if I put HassIO into Docker, does it mean the HA program is on 2 layers of Docker?
Hence the pitfall / limitation question.

Just follow this guide :

Hassio is a docker image with its own startup-script, not a docker-in-docker solution.

1 Like

I already use a RAMdisk for my own logging C program. I plan to do some scripting to put the database or whole config folder into RAMdisk (with scripts to back up whole thing to SD card of course). Utilising the 4GB Pi4 RAM. So hopefully won’t have issues with the SD card.

Thanks for answering my 3rd question.
Do you use bluetooth (or BLE) trackers? Do they work with this method?
Have you found any limitation that normal Pi image based HassIO could do but not this install method?

Ah yes. This is the official site documentation corresponding to the github script. Thank you for this, I need to spend more time with the Docs section of the website.

Is it right in saying:
HassIO Pi image file is basically a cut-down and closed-off Raspbian with HassIO container running on Docker. So manual install via the linked tutorial will yield the same result.

So any future problems I may have with HassIO, I can follow all HassIO tutorial. Because underneath, it’s actually the same, I just took a long winded way of getting there.

The Hass.io images are based on buildroot not Debian or Raspbian but yeah it’s still docker underneath.
Lost of people use a real linux O/S like Raspbian, install Docker and then run the install script for a generic linux install of hass.io. Best of all options IMO.

1 Like

Ok. I think I understand now.

  • HassOS is built using Buildroot for Pi (and other IoT devices), it has HassIO running in Docker straight out of the box.
  • HassIO Install script (linked above) is for install of HA and associated containers that enable HassIO features. After install, it will function the same as HassIO running on HassOS, there are no known limitations because Docker containers are portable.

So the Docker + HassIO does indeed look like best of both world.

1 Like

The HC block in this diagram suggests there may be limitations when running HassIO on OS other than tested.

Is this where the build script’s machine-type command switch comes in?

So this would mean Pi 4 is fully supported, because it’s one of the machine type.

I think more it has to do with the CPU. Code for a RbPi 1 uses another CPU than an RbPi 4, so the docker needs to be compiled differently.

Maybe - I’m not 100% sure. I didn’t specify a different machine when I first installed. Recently I specified a NUC and it uses a different image optimised for the nuc. The generic qemux86 image will likely work anyway - except for a Pi as it’s arm not amd64

Check out IOTstack on github. It’s absolutely fantastic and sooooo easy.

1 Like

Ok. I did some digging.

In the previously mentioned HassIO Docker install script, the machine-type is passed on and I think eventually this script for Pi4 will be run. In the latter script, it is clear some aspect of hardware has been set-up (eg. Pi binaries, HDMI CEC, and bluetooth). This perhaps are the dependencies used by the HC block in the above block diagram.

Thanks. It look really interesting and excellent starting point. I shall give it a try.

But learning from all my previous experiences: I need to rely on my own knowledge. So I’ll need to either understand what’s going on underneath the IOTstack shell script or manually do everything myself, only using stuff from big projects.

Now, hopefully final question.

What is the recommended way of updating this Raspbian/Linux + Docker + HassIO container install method?

The “Docker way” is to replace the container with a fresh one. But HassIO has built-in update capability, managed through the Supervisor (?)
So is it okay to hit update button via HassIO web interface because the Supervisor will manage the container update?
How does one go about updating the Supervisor?

1 Like

The supervisor updates itself.

1 Like

The supervisor will take care of itself and home assistant but you need to update Raspbian/linux as you normally would.

1 Like

Thanks both.

So it’s okay to update via HassIO web interface, both HA and Supervisor will update to latest in their preferred way. Add-on updates are so managed by HassIO.

I’ll maintain Raspbian and anything else I’ve installed myself.


the Supervisor will update itself automatically when a new version is available (unless that has been changed recently - I hope).

You have to tell HA to update itself thru the UI manually. I don’t know of a way internal to hassio to tell it to automatically update itself.

there are other containers that will provide auto-updating of Docker containers but I don’t recommend doing it that way.