Update to 2023.02 on ubuntu 18.04.06 - how?

I was running HA on 18.04.06 with python3.9 in venv, OrangePi/ARM, have not touched it for a while (as every HA upgrade is a 2 day job). Then I tried python3.9 -m pip install --upgrade homeassistant and after hours (it is a slow OrangePi) I got HA setup with non working record, logging, sensors, and many more, just like HA broke after update (logbook, mobile_app, default_config) And new HA says “3.9 won’t work soon”.

So I tried moving to newer python. python3.11 is not supported yet (and it does not compile). python3.10 is not in the ubuntu repo (may be it is for other architectures but not mine) and not in deadsnakes either (they says - go to the ubuntu repo).

I would suggest HA folks a bit conservative approach and not enforce newer python but most likely I am just not doing the upgrade right, What is the right way of upgrading HA?

  • Update Ubuntu to a recent LTS version
  • Install Docker or Podman
  • Run HA Container with your current configuration directory bind-mounted into container

I have a bunch of python scripts with some modules and those do not run inside the docker, how do you solve this problem?

If I run with everything by default, HA runs inside the container as root which is not right - outside of the docker it is my home directory where I do not really want to have files from “root”. If I run the docker with --user 1000:1000, then I cannot ssh out of the docker image - no user associated with uid==1000 because the docker image uses a hardcoded /etc/passwd. Is there a workaround?