Updating HA on docker

Hi,

I wanted to update my HA after a while. I run it on ubuntu machine with docker and compose file looking like this:

services:
  homeassistant:
    container_name: ha
    image: "ghcr.io/home-assistant/home-assistant:latest"
    volumes:
      - ~/ha/config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

(... zigbee2mqtt and mosquitto below)

I tried multiple times to down/up the container, to rebuild it, to force update or even reboot the pc few times.

(I played a little with mosquitto versions so therefore separate named versions).

My issue is that I keep having the old version from March as it says in config/info and no matter what I do I cannot upgrade it!

image

Any ideas how to force, which magic commands to put or maybe just to find out what really version is being used? Couldn’t tell by this SHA of images. But I guess I still miss the latest features of last half year :slight_smile:

I had it on stable and changed to latest but didn’t help.

Use stable as explained in the docs.

The docs also show how to update:

Stlil the same, didn’t help. I restarted HA in GUI to be sure but still March.

These may be dumb questions, but…

  • Have you cleared your browser?
  • Is it possible you have more than one instance of HA running?
  • try restarting your whole machine?

I am afraid that the second point about more instances shall be checked…

If I run docker-compose ps in separate directories I get different outputs depending on compose file in that dir. How can I make sure that the thing I see in the browser is the container based image I just downloaded?

Also, when I do ‘htop’ on my ubuntu I see bunch of python home assitants so it’s hard to tell if there’s any “old” one that I see in web browser instead of the one I try to update.

Start by stopping the container and seeing if they all go away.

Process number decreased 174->168 and still I se some pythons but I guess they may be for z2m.
Lot of stuff like “migration/2”:

Can it be that after I update the image and container, still HA has to update itself by doing some kind of migrations? Maybe after this my build from March it cannot be updated to much newer just like that?

Use ps axu|grep python to see more of the commands

Not at all, when you pull the new image and rebuild the container it uses the new version immediately.

That said, you mention docker-compose - how old is your Docker install? What version are you on?

It’s ubuntu’s version of docker in latest/stable version of 20.10.24 managed by snap.
If I type docker-compose -v I learn that’s 1.29.2 but I don’t know why so old :slight_smile: I remember only than when first time building this server (around beginning of 2023) I learned that in ubuntu is the “hyphen” version command so docker-compose

After stopping that still the one left:

root       18794  1.2  8.2 954164 283188 ?       Ssl  10:21   1:50 python3 -m homeassistant --config /config

Interesting.

Than one is still present event if I stop the container and docker-compose down so close everything:

I think I have “snap” docker and “regular apt docker” :slight_smile: Getting rid of the latter one.

Wow! I had 2 dockers :smiley:

image

image

To be closed :slight_smile:

I finally fixed it by uninstalling Snap version of docker and installing classical apt stuff by some guidelines found in web.

The rootcause was that I had both of “versions” of Docker which obviously leads to confusing. One was always run (the apt one) and it ran the real HA I was using.
The other instance - by Snap - was the one that I was keep updating :slight_smile:

Between those two I decided to go with Apt because with Snap there was some confusing with home directory that contained my configuration and I couldnt backup the old one.