How to install using Docker

I’m completely new to docker but want to be able to install HA using docker and then deploy it to multiple RPi devices using Resin. I’ve looked at the install docs here: https://home-assistant.io/docs/installation/docker/ but they seem very vague. Is someone able to explain to me what path I need to enter for my config path? Do I just make this up or is it a specific file I need to point to? Also can I setup on HA container on a Mac and then deploy to my Pi or do I need to set it up on the same OS?

If anyone could point me in the right direction of how to get started with this, it would be appreciated.

Why not install Hass.io which installs Docker, Resin, and mounts all the config directories and be done with it?

hassio includes ResinOS and a special home assistant docker that does exactly what you want.

you do a bind mount to a directory on the host, and when you first launch the docker container, it will create a default configuration.

no. docker on pi requires special builds of containers for ARM. normal x86_64 builds of containers do not work properly.

if you are looking to do your own ResinOS implementation, I would look at hassio first and see what is being done with that.

1 Like

I’ve tried Hass.io and I don’t like the fact everything is locked down so the only flexibility you have is to install the modules. I want to be able to control my devices via the Resin app and I don’t think using Hass.io would give me that functionality. I believe that would just be installing a container within a container.

Information is vague because Docker is not for novices. Explaining every element would be tedious.

Docker is persistentless. As soon as you terminate the container, you lose everything, hence why you must mount the configuration from the host to the container.
So it literally does not matter where your host path is, as the container won’t care; it’s mounted to the same place in the container every time.

I think @flamingm0e covered the other questions too.

@fanuch Not for novices no but everyone has to start somewhere. I’m surprised someone hasn’t put together a step-by-step blog post of how it get it up and running. What exactly needs to go in the config path? The configuation.yaml, automation.yaml etc?

1 Like

This was a topic of discussion last night. I will work with someone and try to come up with a decent guide.

If you don’t have a config yet, nothing. You need to point it to an empty directory on your host and upon it’s first launch it will create the necessary files.

I did it recently with DietPi. very easy. DietPi, Docker and Hass.io

not quite what he was looking for, but something he should look at.

1 Like

Agreed but as you say, an option to consider :smile:

Sorry for waking up an old thread…

I just installed the latest Ubuntu server on an Asus Chromebox. I also installed HA on Docker. Home Assistant starts and I can open the web ui. But no files are generated in my mounted config folder (/home/hass/.homeassistant/) at the container startup.

Should I expect any?

It should have generated a configuration.yaml at least. If you go to the dev info view in HA it should display the path to the file.

check permissions and ensure you have mapped to that folder. you just running it or using docker-compose?

Sorry, I accidentally deleted my post…

I found an error in the mapping of the hass config folder.

Now I have several containers and use Portainer to control them. Works good!

Not using Docker compose.

Marius, what kind of error did you have?

I am running container, but I see no config files in specified folder, and I see no website on port 8123

my command is:
sudo docker run -d --name=“home-assistant” -v /home/pi/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/raspberrypi3-homeassistant

The thing was that I saw no errors, I was just missing the expected Home Assistant config files in my local config folder It turned out that it was an error in the docker command (mapping of ha docker config dir to local config dir)

Sorry, but I don’t remember the details and I am really not a skilled docker admin. I am using Portainer and click-and-hope approach :grin:

I am not sure that if you should use sudo for docker commands tho…