Installing HA on docker, device discover issue


i try to install HA on docker using this:

docker run -d
–restart on-failure
-v /home/homeassistnat:/config
-e “TZ=America/Chicago”
-p 8123:8123

and i had issue with discover device, when i install the HA on the linux without docker, no issue found.
how to install HA on docker without the network/device discover issue?


The easiest way is to install Hass.IO if your gonna run it on docker.

Per Frenck-

1 Like


i use the regular Home assistant version, what the different ?

There are many ways to install Home-Assistant, the most popular (probably) is Hass.IO.

To be brief, HassIO is a docker container that runs a supervisor, which installs and manages other home-assistant docker containers.
When you install HassIO, it will install a container for Home-Assistant. If you choose to install any “AddOns” it will build and deploy a docker container for each one.
If you update Home-Assistant or an Addon it will rebuild the container to the newest version.

For a more expanded definition for what each particular Home-Assistant install is->

To get into what each flavor really is:

Most installs that run on a Raspberry Pi (using the SD Card Disk image provided) are running

HassOS is a minimal linux install which has Docker on it, with HassIO preinstalled. It runs headless, which is to say that that computer running it has no GUI (if you attach your RasPi to a monitor, it won’t give you an interface to use.

HassIO is a way of installing Home-Assistant inside docker. It includes a supervisor container and a container running Home Assistant. It allows you to install AddOns which are separate docker containers. The supervisor container of HassIO takes care of managing the other containers used for home assistant.
You can also add your own containers to Docker without HassIO caring about them.
You can run HassIO on a linux install that has a GUI, or one that is headless; in either case you can still use this computer to do other things, with docker running in the background.

Home-Assistant is the specific python program. This is what’s actually running at the core of every HA install.

Hassbian is a SD card disk image which is a Raspbian installation with home Assistant in Virtual Environment, pre-installed.

So, to summarize, the most popular install on a RasPi is HassOS, which is:

On other devices (such as desktops, laptops, servers, NUCs), HassIO is the popular choice, which is:

If you’re using Hassbian, that’s:

In your case it’s just:


First of all, tnx for the replay!!

On other devices (such as desktops, laptops, servers, NUCs), HassIO is the popular choice, which is:

I use laptop for the installation, detected for Home assistant (no VM),
i try in on Debian 9 OS, you suggest other linux OS?

and on laptop installation i can use this:

Simple install command for installing on a Generic Ubuntu/Debian machine · GitHub

Debian 9 is fine, as far as I know.

and on laptop installation i can use this: […]

Yeah, that will install HassIO. (Which will give you a working Home-Assistant install, all things being equal.)

1 Like

i can install fresh linux OS,

ubuntu 18.04LTS / Ubuntu 18.1
Ubuntu Server 18.04.2 LTS /Ubuntu Server 18.10

or other?

I am very new to the Home Assistant / docker /everything involved.
BUT I like to help… so here’s my guess:

You only have port 8123 mapped from the container to your host.
This means that HA can only see outside the container on this one port.
My guess is that the discovery needs another port or something similar.
In the standard docker install it says to use:


to map all ports - my guess is you either need this or the correct port for discovery… which I do not know… (like I said, still learning).

I also noticed a typo in your volume:

-v /home/homeassistnat:/config

probably should be (funny enough, I type the N and A backwards all the time too):

-v /home/homeassistant:/config



I’m personally using Ubuntu 18.xx (I can’t remember the exact version and am not at home to check).

The instructions from that gist should valid for any generic Ubuntu/Debian machine though, so normal Debian or Ubuntu should work.

This depends on what you are comfortable with.
Ubuntu server is headless (but GUI can be added manually).
If you only plan to use command line (SSH) then this would be okay.
If you prefer a desktop environment, you may want to use the non-server version.

As far as “other” go with what you are comfortable with.

  • DeadEnd
1 Like


can i add portainer install for this:

i added the portainer ?
i added, and it asked me password and username… different one…

Debian 9 as an OS works perfectly fine. I’m running HA in Docker on a NUC with Debian 9 as the OS right now.

And as posted above you need to recreate your container with the -p option removed and add --net-host. I don’r usually run discovery but that should get you to the same place as using hassio.

I’m also not entirely sure that installing hassio is easier than just installing regular HA in docker. I’ve looked at doing it a couple of times but it seems there are a bunch of packages you need to install to get it to run in regular docker. That is compared to just installing docker and running one command line and you are up and running. but to each their own.

yes, portainer is separate from HA. In fact, all docker containers are independent of each other unless you link them. But that is the entire point of docker. But you just need to create your own username and password just like any other software you install. Or use the same one as HA. You just need to type it in manually in the portainer setup.


I also wanted to play around with HASS before installing it and ran into the same problem.

I modified the command a little bit to get it running in the host network so that the devices can be detected:
docker run -d
–restart on-failure
-v /home/homeassistnat:/config
-e “TZ=America/Chicago”
–network host

It is important to remove the port forwarding (-p) because otherwise the container is now hosted in the host network but port 8123 is still forwarded to the docker network.

I haven’t tested it yet completly but for me this looks promising to just playing around with it on my Laptop…