Updating Home Assistant inside Docker

uff, not sure I can hep more. Perhaps try Discord.
Sorry

I really appreciate it anyhow, once I resolve this - Iā€™ll update here, thanks a lot @juan11perez

welcome. sorry i couldnt help resolve.

From what I remember, ssh is very particular about the permissions of the key files and its directory.

Make sure that the directory that contains the key files is readable only by the user using them, and the private key is the same. Otherwise ssh refuses to work.

I just wanted to clarify that you are never meant to update anything inside a docker container. Docker exists so that developers (and others) can create a container that works anywhere its run, and if you change anything inside the container, that defeats the whole purpose. Those who run HA using Docker, will never update the HA instance in the container, but the entire image. This prevents anything breaking.

2 Likes

Hi, how can I add that label I donā€™t understand Iā€™m new in Docker I have watchtower installed with Docker compose, and hassio, thank you

In your case as youā€™re using Hassio, you cant add any label to Hassio as itā€™s managed by the systemd start up file. Itā€™s not in your docker compose.

So the solution is to do the opposite, basically specify the dockers you want to update via Watchtower.

For that you need to do the following:
In watchtower add:

command: --debug --label-enable --cleanup --interval 300
labels:

  • ā€œcom.centurylinklabs.watchtower.enable=trueā€

the --label-enable command will tell watchtower to update only the dockers that have the following:

labels:
- "com.centurylinklabs.watchtower.enable=true"

so you add that section to every docker you want auto-update

hope it helps

1 Like

Thank you, well explain, do all the steps on all my containers, letā€™s see how it goes, now I have to figure out how to set the notifications with watchtower in docker compose

Im running 0.88.2 and 0.89 is out, how do I force hassio to see the update?

You wait patiently until the update is ready.

and how do I cope if after the upgrade I donā€™t see the bug fix Iā€™m waiting? :smile::smile::smile:
Thanks!

With a stiff upper lip :wink:

Thanks for this. Exactly the solution to my problem!

Suggest using PORTAINER. Has a web GUI and you can update using that easily.

1 Like

I was thinking of trying this for the first time, but am concerned that I have a quick fallback solution, in case the new release breaks something and I need to revert to my current release quickly.
What would the procedure be to revert to a previous release following a failed upgrade attempt?

take note of the current version you are running now (ex 2021.11.5)

then if you need to go back then just add that info to the end of the image in your docker run command:

sudo docker run -d etc, etc, ........... homeassistant/home-assistant:2021.11.5

note you need to remove the existing HA container first.

I just created a little project which makes it easy to update DockerContainer (& Homeassistant Container) via Homeassistant Update entities:

MqDockerUp: A tool to monitor and update your docker containers from Home Assistant - Share your Projects! - Home Assistant Community (home-assistant.io)