Upgrade Docker image: configuration not recognized

Newbie here. I have been running HA on my Synology NAS under Docker. The NAS has a conbee stick attached. This is how I started the container several months ago:

sudo docker run --restart always --detach --name homeassistant -v /volume1/docker/homeassistant/config --device=/dev/ttyACM0 -e TZ=Europe/Amsterdam --net=host homeassistant/home-assistant:stable

In order to upgrade, I followed these steps:

  1. Stopped the container
  2. Deleted the container
  3. Deleted the Docker image
  4. Downloaded the new stable image
  5. Ran the command above

I had expected it to use the previous configuration in /volume1/docker/homeassistant/config but when starting the UI it requested a new account and behaved like a new installation.

I did notice that the file dates in /volume1/docker/homeassistant/config are about 4 months old, so I am beginning to wonder whether HA actually stored the config here.

Insights and help appreciated!

Try rerun docker run command with below for volume

-v /volume1/docker/homeassistant/config:/config

Thanks for the suggestion. Unfortunately, it gives the same result.
Another clue perhaps: I created an automation about a week ago. My automations.yaml file is empty.
I now created a new automation and I can see it.

Hypothesis: Before the upgrade, my configuration wasn’t being saved at /volume1/docker/homeassistant/config. Was it being saved in the container perhaps?

With your suggestion it is now saved at the desired location. So I guess I have to recreate everything.

You /config volume is not mounted

The command I gave is correct but I forget /volume on synology is not /volume I think.

Just make correct path in -v command and you should be ok.