I have read countless posts but feel completely out of my depth
I have a tiny think PC running Ubuntu, and installed HomeAssistant in docker many months ago. I havent ever tried updating it as i didnt know what i was doing
Now looking into it and im struggling to work out how to proceed.
I installed it originally using:
sudo docker run -d
--name=homeassistant
--restart=always
--network=host
-v /etc/homeassistant:/config
homeassistant/home-assistant:stable
its been running fine for the last few months but i just want to know how to update it
I can see it all running fine when i SSH in and run this: docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
be497a7c15ac homeassistant/home-assistant:stable “/init” 4 months ago Up 4 months homeassistant
i came across some posts suggesting to “rm” the container, repull it and then its good to go, but was worried about where i have the config saved, will that be ‘safe’ or is that inside the docker container?
(i have made a backup “core_2023_6_3.tar” and saved it to my PC in case…)
any advice (in baby steps) would be really appreciated!!
indeed thats what i started doing but then got scared that my config was saved inside the container - is that even possible?
so with what you suggest there, the config is saved elsewhere and when i remove the container, then readd it with the original commands i did then it puts it back into the same place, and it re-uses the config file that was contained (safely) elsewhere and i should be up and running again?
if that works ill look int the compose suggestion (i have scrypted running on another docker container - would that be affected by this method?)
is there any way of checking that the config directory really is in the etc/homeassistant folder? when i look at the “System Information” it just says /config… just want to be sure i dont mess that up and lose the config
Yes, possible, but the following line of your docker up command maps HA’s config to:
/etc/homeassistant
Go to that directory and you should be able to see your config there (note: some data is in an invisible folder called .storage. You can place it anywhere you like:
Your HA-generated backups should be in a directory called /backups within etc/homeassistant.
-v <path-to-data>:/config
I’m not sure if \etc is a good place to have it or not.
Sort of. The config directory doesn’t go anywhere - it’s always at /etc/homeassistant *unless you mobile it yourself). Both the new and old HA containers are mapped to it (HA know’s to use it the data there.
SSH to that directory and take a look. you should see something like the following:
Your’s will look a little different (you won’t have ‘JCHH’ directory and you will have a few other files) and don’t forget some of the files and directories are hidden.
i just tried all those steps but its still showing as
Home Assistant 2023.6.3
Frontend 20230608.0 - latest
when i run docker ps i get this, so pretty sure that it creatred an fresh container…
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
467d995b4bac homeassistant/home-assistant:stable “/init” 56 seconds ago Up 55 seconds
I never use “stable”. I always use “latest” instead.
also I really recommend looking into and installing Portainer. It is installed in a docker container as well and simplifies a lot of things you normally do with docker.
For example, to update home assistant all I do is open the container in Portainer and click on ‘recreate’. there is a check box there asking if you want to pull the latest image. then click recreate.
it will download the latest image, stop the container and restart the container using that image.
@jchh thanks for responding, as above here is the full printout of “docker container ls”, its the same as i posted for “docker ps”
XXX@YYY:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
467d995b4bac homeassistant/home-assistant:stable “/init” 20 hours ago Up 19 hours homeassistant
23b2cd35435a koush/scrypted:latest “/init /bin/sh -c 'n…” 37 hours ago Up 19 hours scrypted
17c5713c4110 f847e1adb570 “/watchtower --inter…” 6 months ago Up 19 hours 0.0.0.0:10444->8080/tcp, :::10444->8080/tcp AonzPHmmRQVTjkhtlqOuoyEmoiyRJhal
I’ve been using HA since .35 and Docker install for over 5 years and I’ve literally never had any issues using ‘latest’. The ‘latest’ tag has always been the most recent point version of the monthly release.
While that may be true for other projects I’m pretty sure the beta/dev versions of HA never get a ‘latest’ tag. At least I’ve never seen it in my experience.
and I think by definition when it comes to HA there is never a truly ‘stable’ build.
“terrible” is certainly in the eye of the beholder.