Ah, but see, it’s even easier with docker. I can pull any version of HA I want going back as far as I want (well, at least back to 0.33). So lets say I update to latest HA and it breaks something. I just:
docker stop home-assistant
docker rm home-assistant
docker run <whatever command line flags you have> homeassistant/home-assistant:<version-tag>
That’s it.
If you use the --network=“host” there’s no difference between it running in a container and running directly on the host (from a network perspective anyway)
That’s true. For the most part, I stick to “official” containers. The Plex container is maintained by Plex, Inc. Homeassistant as well. Especially since Hass.io is based on docker, I don’t think there’s a danger of it not being maintained.
The up side is that you are guranteed that all dependencies are satisfied regardless of what’s installed (or not) on the host system. So for example, you don’t have to worry when they drop support for a certain version of python, or that you have certain versions of other command line tools installed because everything it needs (and the correct versions) are all included in the container.
I’m not saying that Docker isn’t useful or shouldn’t be used, It is useful, but believing it will solve all your problems is absurd. Use it, by all means, if it solves a particular problem. If the only things you look at are things that are containerized, you can back yourself into a corner and learn nothing in the process.
I see. I guess I’m lucky that in my setup everything I did with my home server before I looked into docker was available as a well maintained / popular docker container. I do some other minor things with scripts but I don’t really view those as the same level as “apps”
Edit: I’ll add, however, that for something that’s growing/updating as fast as HA, it’s nice to because to just swap versions around or be able to easily revert to the last working version if an update breaks your setup
Looks like I opened a can of worms
Thanks all for your comments. Having read the pros and cons I personally will move to docker to remove the dependencies maintenance and eventually have a couple of containers running as a swarm to improve efficiency / redundancy.
Thanks for opening up the can of worms. It’s been a very interesting read, and lots to think about until if can get back home next week and start tinkering again.
I don’t know why any of you come to an opensource project like homeassistant, but I usually choose them because I want the control that I don’t get in a commercial product. I also want to learn something. Again, not saying that Docker isn’t useful or is inappropriate, but you do lose control. You get a container that does only what is placed inside the container. Yes, you can chain containers, but again only what is inside them. You can only interact with them in the ways and inputs and outputs that are exposed.
Homeassistant isn’t hard to maintain. If you use Docker just so you don’t get into the messy details, you give up learning. Things you learn on one project go towards your next project. The next time you want to do something that doesn’t come in a container, you don’t have any experience with the messy details. The next time something isn’t just the way you would like it to be can you tweak the code and recompile? Making something just right is empowering and those things extend to every part of your life.
Use Docker to solve a particular problem for sure. No arguments there. But do things yourself wherever you can.
Thanks I share your views, with the added exception that HA controls my house.
In that setup, the critical component is my wife who doesn’t share my enthusiasm for fixing things, especially during down times, and she wants it to work all the time.
I therefore have to try and set some structure around what I do to keep HA downtimes to a minimum so that I don’t p!ss her off
Docker will give me the ability to build test containers allowing me to reduce the downtime. In addition I don’t need to worry about environment restrictions / dependencies as it’s taken care of by the container.
Don’t take me wrong though, I’ll still be tingling about with every other thing that I’m doing on that machine that is not as “critical” so I won’t stop learning…
Oh and about the open source bit, that might actually push me to finally build the component that I actually need to read the data off my energy monitor, and have it available to others, instead of running it off a personalised python code…
My comments were not directed at you or anyone in particular. I truly don’t care why you or anyone chooses to use Docker or not. Just think about why and don’t just blindly follow the crowd.
So I got my NUC yesterday and was able to get it up and running pretty quickly.
I made it a little more complicated than necessary. I first installed Debian, and then converted that to the Proxmox virtualization environment using these instructions. So the NUC is running Proxmox as the host OS.
It works great. Addons installed from within HassIO show up as additional Docker containers so you can run those, or you can a standard container. I just copied my HA and Node-Red config files over and was up and running within a few minutes. Using Portainer to manage, you can see the HassIO addons alongside my other containers.
I am hoping that keeping Hass/Let’s Encrypt/Node-Red/MQTT in the Hass ecosystem will simplify setting up SSL and all that. We shall see because that is this evening’s project.
I started my move to docker with HASS, and found that so straightforward I’ve worked my way through pretty much everything I’ve got running (unifi, sabnzbd, grafana etc. etc.)
Ok each container needs a bit of thought about where to store configs, ports to open, but once working it’s fantastic.
Also nothing is stopping you from creating your own images using other maintained ones as their base.
I might look at Docker Swarm next. Does that mean I can run more than one HASS container and so if one craps out I wouldn’t notice? Only my HASS install just hangs at random (including before I moved to docker) and I just don’t know why, so I’ve got a script to restart the container if I can’t connect cronned for every 5 minutes. Would be cool if Swarm made things more reliable.
So, If I have setup ssl using letsencrypt at Ubuntu system level for non-docker HA, I can move HA to docker with --network=“host” option without any specialy config/changes and still it be good?
Thanks for the info.
You’ll need to bind the directories storing your certificates on the host into the container so hass can see them.
I did it differently. I put nginx in another container and run that as a reverse proxy in front of hass. That way hass doesn’t care about ssl and you can access it on your local network via IP without ssl. Then my ssl is only used for access from outside the house.
Any more details on how to do this? What docker container to use? What else? I don’t like accessing HA using SSL in-side my network which makes DNS call and gets public IP and comes back. PiHole shows many request my HA making. Further more I have few other components which uses HA RestAPI to update it’s sensors which all has to access it via SSL as of now.
Appreciate it.
Thanks