Yes. Docker-CE. I’ll ignore the error. Thanks again.
These are really useful instructions, thanks @piyush et al - I just wish I’d found them when I was starting off with docker. However I found the bit that comes next was still a mystery, how to put together a working docker compose with just the bare-bone configs. Now I worked it out I’d like to share it with others, to see if anyone else finds it useful.
Configs to clone once docker installed
If you follow the instructions above for docker, then simply clone the repo from https://github.com/artmg/home-assistant-docker this will give you a working docker-compose and empty configs to start you off with nginx proxy, HA app server and Postgre backend. Once you have these services running, it’s easy to merge in whatever config you used to use before your docker days.
It looks from this thread like mosquitto and portainer are other popular options for starters, so I might include those in there too. I welcome any feedback. Thanks
What did you do that finally got Samba doing?
My mistake was to attempt a migration using the pi3 snapshot. What worked for me was to start over using the guide above. Then, replace the configuration files created with the pi3 versions. Added the needed add-on tools after the basic install was up and running.
Portainer lets you log into the home assistant container as root giving you permission to alter files.
The advantage of installion hass.io on docker is that you can use the hass.io extensions store to install other containers that are pre-integrated with home assistant. You can still run containers “outside” of the hassio control plane if you like.
That said, I don’t use hass.io, I just run the Home Assistant vanilla container in docker. It seems a little more transparent as to what’s going on.
Hi, sorry to jump on here. Adding a group and user doesn’t work for me. I still get the error after logging out and in.
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
You aren’t supposed to be adding a user. You are adding YOUR user to the docker group
I did quite the same on a Ubuntu 16.04 virtual machine. Everyhting seems fine but I can’t add Home Assistant to my Home app on the iPhone. This seems related to the fact that Docker uses NAT and I have to open a port to let the Home app talk to Home Assistant.
My problem is I can’t find the file where the docker run commad is to append a new open port. Can you tell me where is this file, and if it’s not a file how do I modify the way the Home Assistant container is launched ?
Thanks for your help
V.
It doesn’t though.
This isn’t how it works.
If you installed hassio using the script there is literally nothing to do to open a port unless your host is running a firewall, in which case you wouldn’t access it from the local network anyway.
If you follow the official documentation for home assistant in docker or if you run the hassio script, your host network is already in place.
I quite exactly did the same as here, i.e. Home Assistant in docker but not on a NUC but in a VirtualBox Ubuntu 16.04. So I have two cascading host, Ubuntu and then my computer.
Correct me if I’m wrong, If you say that I have nothing to do it’s because containers are connected to bridg0 interface, but still, in my case this only avoid blockage between docker containers or between containers and Ubuntu as they’re all connected to the bridge0 interface, but it also create iptables NAT rules for going out the Ubuntu machine and I think this is what drops packets from Apple Home app to Home Assistant.
More communications between docker bridge0 interface and the Ubuntu interface connected to the host computer is dealt by iptables NAT rules which I think is what blocks communications between Apple Home app (on the LAN) and Home Assistant (in docker container)
LAN<—>Host computer<—>Ubuntu<—>Bridg0<–>Docker Containers
$ sudo iptables --list
sudo: unable to resolve host hassio
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (2 references)
target prot opt source destination
ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:9000
ACCEPT tcp -- anywhere 172.30.33.0 tcp dpt:ssh
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (2 references)
target prot opt source destination
DROP all -- anywhere anywhere
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
(see :Four ways to connect a docker container to a local network :: blog.oddbit.com).
So, if it’s not a file please tell me how do I modify the options passed to the docker run command ? How can I add a port forward ?
And for which container would it be ? homeassistant or hassio_supervisor ? which one deals with dicovery so with communications with Homekit ?
Well, in the first post in this thread, there are several OPTIONS to install. Which one did you do? The hassio script?
Again, if you installed via the hassio install script, THERE IS NOTHING TO DO WITH MODIFYING YOUR RUN COMMAND FOR NETWORK ACCESS. PERIOD.
It doesn’t matter if it’s running in a VM. As long as your VM is bridged to your network, and gets an IP address on the same subnet, you’re DONE.
Discovery is handled by home assistant. Supervisor is for docker orchestration.
Again, if you are running hassio, your entire network stack of your docker host is already being presented, and there is nothing to change about this. --net=host
is already running.
I followed https://www.juanmtech.com/set-up-hassio-in-docker-and-in-an-ubuntu-server/, in which I think the key command is
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s
I must seem a bit deaf but as I’m seeing DROP rules in IPtables I think these rules must drop something, no ? As also I see forward rules, I thought these rules were mandatory for things to work.
As suggested in
I tried changing port number (51829) and I’d like to forward this port to see if it works.
OK. Let me try this again. Running hassio, means that the network mode is already set to HOST. There is no port forwarding required. I don’t know why that seems like a difficult concept.
Here was my mistake : I used vagrant to pull my ubuntu image and as vagrant is NATed by default and I didn’t find a way to bridged the Ubuntu virtual Ethernet with my host machine real Ethernet this Nat was droping some packets.
I redid the whole thing but this time with an Ubuntu server intall (virtual) CD.
No port to forward or to specify in any config file, just homekit: in confirguration.yaml.
It just works !
Thanks for your help and clarifying things.
Hi, I have a powerful NUC (i7, 32GB RAM etc.) which I use as my main always-on PC.
Can I run Ubuntu in Hyper-V and install containers in there to have an always-running HA solution?
This way I could continue using my NUC and benefit of the fact that it’s always on.
As an alternative I have a spare Intel Compute Stick (Atom powered) I can use instead?
When updating 105.0 today i noticed i had fallen behind on HA Supervisor versions. When I was running Hass.io on the RPi, Supervisor updates were automatic. Looking at the system log, I noticed the following:
20-02-05 21:58:35 WARNING (MainThread) [hassio.dbus.rauc] Host has no rauc support. OTA updates have been disabled.
Is lack of rauc support on Ubuntu the reason for the OTA (over-the-air) Supervisor updates not occurring? If so, what steps would be necessary to enable a rauc client or server on my NUC?
THANKS, that saves my day (what’s left of it)!
You mention this a couple of times in this thread, but isn’t it so that you either choose standalone ha on docker (still able to use the nuc for other things) or install hassio as per the guide you are linking to (making your nuc a dedicated hass machine). You know, like @piyush describes in the guide…? Like he specifically says he does not want or recommend?
As far as I can see “hassio on docker” is not a supported option
No. They changed my link. (believe it or not, a lot of things can happen and change in over a year)
It doesn’t turn it into a dedicated HASS machine.
It’s not officially called “hassio on docker”, it is now referred to as “home assistant supervised”
So if I follow the top instructions on that page, downloading the nuc image, flashing to SD card with balena etcher, I can still use the NUC for other stuff than home assistant?
I was looking into the “home assistant supervised” option, but I’m having a hard time understanding what it actually is. The disclaimer is pretty discouraging though, even going as far as saying:
In most cases, it’s not the best choice to run the Supervisord on top of a Linux, if you not 100% sure what you do. It is not just a container inside Docker!
I definitely fall in the not-100%-sure-what-to-do category, but from this text I concluded that I can’t just run hassio in a container inside docker.