Upgrading HomeAssistant: A Smooth Experience with Docker

I recently upgraded my HomeAssistant setup using Docker, and I wanted to share my experience in case it helps others avoid some common pitfalls. I’ve been running HomeAssistant on Ubuntu for a while now, and while Docker is supposed to simplify things, I ran into a few bumps along the way.

First, I made sure to back up my configuration directory. I renamed my existing HomeAssistant container and spun up a new one using the command:

bash
sudo docker run -itd --name=home-assistant -v /home/mythuser/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --privileged --device /dev/ttyACM0 --restart=always --net=host homeassistant/home-assistant

Despite this, the web interface still showed the old version. After some research, I realized that Docker might not always clean up old containers properly. I decided to stop and remove the old container entirely before starting the new one. This time, the upgrade worked seamlessly!

One thing I learned is the importance of checking Docker’s running containers and ensuring no duplicates are consuming resources. I also discovered that having a backup plan is crucial—thankfully, my configuration was safe and easily restored.

If anyone else is looking to upgrade their HomeAssistant setup, I highly recommend taking the time to thoroughly clean up old containers and double-check your volumes. It might save you from some frustration down the line!

Happy automating! :rocket: