Updating Home Assistant inside Docker

you use the label option and set it to false, see their guide
Selectively Watching Containers

just add the label to the container
LABEL com.centurylinklabs.watchtower.enable=“false”

@flamingm0e, Are you saying that QNAP’s implementation of Docker in any way requires particular precautions with regards to HA? Is QNAP’s implementation of Docker inferior to running Docker on any other OS ?

No, QNAP just uses Container Station as a catch all term for LXC and Docker containers. If you want an easy interface to interact with Docker look to Portainer. I have a QNAP 251+ and only use Container station if I must otherwise I use a combination of command line, Portainer and Watchtower container as mentioned above.

@joshluster, Thank you for coming to my rescue. So when I referred to “Docker” in my opening post, Being recommended Hass.io just served as a derail… No wonder I was confused.
Well, at least now I know what Hass.io is all about, and I know that as long as I plan to stay with Docker (even on my QNAP), Hass.io is not for me. Have I finally got things right?

Sounds like it.

No. I was merely stating that the OS you are running on determines lots of things like, recommendations of other ways to run Home Assistant.

Container Station is just a wrapper around their container implementation.

I don’t think you are grasping what anyone was saying, and it’s hard to get this across without being blunt, so here is the rundown.

You asked for an easy way to upgrade via Docker, and were told there already is (as well as instructed on the proper way to store your configuration, which you may or may not have already done, we don’t know, because you asked for a way in your OP).

After you stated that you did not like the command line, the recommendation was made to look at HASSIO instead of just Home Assistant in Docker. Again, remember, you never stated that you were running on another platform, and it was assumed you were just running Docker on Linux.

With the misconception that you were running Docker on a normal Linux distro (Ubuntu for instance), the recommendation was going to be this: hassio-build/install at master · home-assistant/hassio-build · GitHub which would install hassio on normal Docker running on a normal Linux distro.

We just wanted you to understand the differences in what you were trying to accomplish, and you had not really provided enough information for any of us to work off of, except that you were running on Docker.

Basically, yes. HASSIO is, however, designed for people like yourself that are not comfortable in the command line, and don’t want the hassle of manually running updates. I fully recommend learning the Docker way and sticking with that, rather than going the ‘simple’ route. Docker is really easy once you understand it. After you get some containers going and figure out what bind mounts (volumes) are all about, and what can be done with some simple command line ‘one-liners’ it will all be much easier on you.

@flamingm0e, Thank you very much for your thorough explanation, which I did not find blunt in any way.
I’m sure that the Hass.io recommendation was well meant, it just confused me as I did know what it was, and I assumed that it was something I could apply to my existing Docker implementation. Now I know that was not the case. I have to give up Docker altogether to enjoy Hass.io
That, I am not prepared to do. I run a number of programs in Docker, and counting. And also, I never said I didn’t master the command line, I just said I hated it. Command line never has been, and never will be userfriendly (my personal opinion)
My OP was just a compliment to Paulus’s statement that his ambition is (among many things) to make Home Assistant more userfriendly. :sunny:

Use watchdog, it will update your containers when there is a new version available. Set and forget.

Edit: WatchTower, not dog.

What an excellent answer! Just in line with everything else here. Yes, I have a dog. His name is Fido, and yes, I have a watch (Casio), but none of them knew how to update HA inside Docker, and together they are both pretty dumb (me too). :frowning:

Not sure if you’re serious, trolling or just not understanding the whole concept. The whole point of running HA in a container is easy upgrading (or downgrading). It works just as ha_steve describes. My answer just adds automating the process. If you would have googled your initial question then “WatchTower” would have come up in the first hit. My sincere apoplogies for mixing up WatchTower with WatchDog.

Anyway, the solution for your problem is here

@piotr, thanks for your update - and apologize for my abrupt reaction. Let me explain: I’m so deeply fed up with people who’s purpose is not to help people but to demonstrate their own skills and intimidate others with abbreviations and jargons. I mistakenly took you for being just another one of those, because “watchdog” means absolutely nothing to me (except as i.e. a Schäfer).
Again, thank you

1 Like

@Viking I’m new to docker and have gone through a steep learning curve after using Hassbian (HA in virtual environment) for close to a year and I’m throughly enjoying it.
As mentioned in a previous note, I suggest you install portainer docker container to manage all your other containers. It has a clean user interface and for instance Upgrading HA is just 2 clicks. 1 st to select HA; 2nd click recreate.

Most people here are home-automation enthousiasts helping other enthousiasts. I don’t think they’re here to demonstrate their skills. Follow the advice you got from multiple users: Portainer, Home-Assistant, WatchTower.

@juan11perez, Thanks for your reply. I am generally on very friendly terms with Docker. And the QNAP range of NAS servers comes with a very nice Docker front end named Container Station. Maybe not as extensive as Portainer, but good enough for the most part, and very userfriendly. My initial question in this thread was how to update my containerized HA, and I was told to use Hass.io
Do I need to say more? :slight_smile:

@Viking if QNAP container station has something similar to recreate in portainer then that’s the way. If not try portainer. I just learned how to do it via ssh which results in one button in HA, but it involves a bit of a one time set up.

@juan11perez, please - feel free to share.

Here you go:

EXECUTING COMMAND LINE FROM WITHIN HOMEASSISTANT CONTAINER:

https://hastebin.com/sojasolite.sql

I think I’ve added all required steps. Essentially this can be used to fire any command from the HA container.

1 Like

But why the hassle ? WatchTower and 1 line in your docker-compose is all it takes.

Many people dont want to automate the update, because they want to see any braking changes before updating.

And this is not limited to updates only. It can be used to fire any commands from within the container.

1 Like

Hi again @juan11perez,

I’m trying to use your hastebin procedure to setup access to allow my HA in docker to run shell commands on the host. I’m not necessarily going to be using it for updating HA but for computer control functions, reboots, etc.

When I get to step 4 and try to generate the ssh key I get a “/root/.ssh/id_rsa failed: Not a directory”. I’ve checked the instructions at the digital ocean link and I’m pretty sure I’ve followed the procedure correctly.

If I cd to the root directory and do a ls command it shows empty.

I have the volumes setup already in the docker container and it is listed as a volume under the portainer entry for HA.

Any suggestions on what I may be doing wrong?

EDIT:

Never mind…

I’m stupid…

I didn’t create a /home/finity/docker/.ssh/ directory on the host. I created a /home/finity/docker/.ssh file.

Fixed and working now. At least generating and storing the keys…

On to the next part.