My Docker Stack

Does anyone know of a way to monitor for updates on the docker host, possibly from HA?

I have gotten my instance to be pretty stable. Therefore I rarely log into my host (Ubuntu server). It would be great to have a sensor for available updates and available security updates.

I know this info is available via command line but not sure how to retrieve it from the host.

For Docker I once used this one https://github.com/v2tec/watchtower, although any docker image updates are risky, especially if it’s only point to the latest.

I to would like to know this. Not so much for my containers but for the host.

Maybe I wasn’t clear, looking to monitor updates to the Ubuntu host, not anything docker related.

I think we are looking for the same thing.

You can make it so that HA can run commands on the host from within the container.

I do it for rebooting computers and other things.

I think I’ve posted about this up thread somewhere too. It’s a procedure written by @juan11perez (with a slight modification).

https://hastebin.com/sojasolite.sql

What is the difference if you install like me has an Ubuntu server with installed Docker and install HA from the docker hub or install HassOs using the provided description.

It’s not clear to me what you mean ‘Install Hassos’?

Refrase. Difference between my install and a hassio image

If you install Hass.io in Docker I don’t think there is any difference between that and a HassOS install. Only difference is the base OS and of course the fact your host computer is not locked down but as far as Hassio is concerned I don’t think any difference. (Which makes the madness in that other thread even more puzzling!)

Many things I dont understand. You see some posters with quite impressive automations. Then you realise they are either installed on a rpi or on a windows computer running wm or virtualbox with a linux distro inside and so on. For me its a dangerous way

what exactly is “dangerous” about it?

Well if I have a system where I have all house automations and security I want to be sure that the system is still up and running when I wake up after a good nights sleep. I have spent to much money time and effort to not give the system the best possible to do just that. To run it as a side system on my windows computer or Pi would be unthinkable for me. But that is every ones own decision

I fail to see the difference between installing it (as you say you have) on a Ubuntu server in docker and installed in a virtual environment on a RPi or VM on windows as it relates to “security”. :thinking:

as long as the base machine is reliable then any of those different install methods work pretty much the same. at least where “reliability” is concerned.

You do realize there isn’t much, if any, difference between docker and a venv? it’s still running as a “side system” on the machine docker is running on.

It has nothing to do with security in that sense. But if you install it on a windows machine running VM or similar running Linux and… it probably means that you also run a lot of other tasks/ software on that machine. Things that can go wrong and then affect HA. Or run it on a 35 usd RPI using SD cards that we know its not the most reliable media.
What I mean is that if you are prepared to spend quite a lot of money in different devices like locks, bulbs thermostats switches, security cameras etc etc and spend a LOT of hours to get it working as you want it, why dont spend some money also on dedicated hardware. But as I said its up to everyone to decide. For me it was never a doubt in my mind. Overkill yes, but at least I know I can trust the system

@flamingm0e

My docker for HASS has been running so great that I haven’t upgraded to a current version in many many months. Now I want to but do not want to risk losing my working setup in case the upgrade takes my a while to reconfigure.

How can I preserve the working container (not running) to attempt the newer version? I know I can make a backup of my config files but more concerned about the actual homeassistant pull.

What version are you on currently?

If you update and break things, just tag the version you currently have. No need to preserve the container. Just pull the tagged version of the one you want.

I’m running 0.69.1
I’ve pulled the current version but have not restarted with it as I ran out of available time (in-case there were problems).

@flamingm0e, first off - many thanks for sharing your set-up. It inspired me to move away from Hass.io to docker on Ubunutu to give me a bit more control (and learn Docker).

I have a couple of questions in relation to the setup.

  1. What hostname are you using within node-red to connect to the HA contain. For me, only the external domain works… i.e. https://home.mydomain.com:8123. I cannot use, https://servername.local:8123 for example, even if i tick the “ignore TLS warnings” option in node-red.

  2. All of the containers (with the exception of HA) are added to network called name_default and are assigned IPs in the 172.18.0.x range. Within the home-assistant configuration.yaml, i’m unable to use the docker assigned hostnames, only the IP addresses work for me.
    This isn’t ideal, as I assume IP address would change if the docker containers are recreated and then would have to manually fix all the entries in configuration.yaml to the new IP addresses.

  3. I see you use syncthings to backup HA configuration, but do you back up all the other data folders for other containers and how ?

Thanks in advance.

I’m not. I just use the IP address of the host.

Sounds like you configured HA to handle the certificate, which will cause this error. I use NGINX to handle my certificates in a reverse proxy setup, so I don’t have to worry about that kind of stuff.

This is a Docker thing. It’s normal.

Just use the IP address of the HOST. You don’t have to know what any of the Docker internal IP addresses are.

I run a program called Restic, with a script, to backup the data I care about from my other containers. It gets sent off to my NAS running Minio.

2 Likes

I started learning about Minio from your post, thanks for that. I am using Syncthing to keep copy on other machine. Try to learn good use of Minio to centralize all my data including photos, media and code.
Any direction to learn on Minio will help a lot.
Thanks