Automatically Updating Home Assistant Container (and other Docker Containers)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • How to keep your Home Assistant Container, Linux Operating System and other Docker Containers up to date automatically when you don't have access to the Home Assistant Supervisor.
    Links:
    Companion Blog Post:www.homeautoma...
    Using VSCode with Home Assistant and Docker: • Living without add-ons...
    Backing Up Home Assistant Container: • Backing Up Home Assist...
    Beginners Guide to Cron Jobs: ostechnix.com/...

ความคิดเห็น • 65

  • @Foodgeek
    @Foodgeek ปีที่แล้ว +1

    I'm using Portainer and their stacks feature, so I don't have the docker-compose.YAML file in the file system to run the update.
    Instead, I am using watchtower, which works quite nicely :)
    Otherwise, you have tons of good information in your videos. Keep it up :)

  • @martinchinery4184
    @martinchinery4184 2 ปีที่แล้ว +13

    Great series of videos and I learnt a great deal from them. Seriously considering moving from HASSOS to this method. I would love to see some other videos on installing docker add-ons that are commonly used such as Zigbee2mqtt/Mosquitto, ZwaveJS, and Node Red as examples.
    Many thanks for all that you provide.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +8

      I plan on exploring all of these services myself and will be creating videos on them eventually. When I do I'd like to cover how to install them both as an Add On and as a Docker Container.

  • @CFodder42
    @CFodder42 2 ปีที่แล้ว +4

    Great video, would love to see a good Mosquitto docker compose setup guide in this series as well as pi-hole.

  • @ReyRamos
    @ReyRamos ปีที่แล้ว +1

    Love your videos, been following through and now have an Ubuntu Desktop running all of my containers with Homeassistant among other things. I have a question, how do you monitor your host? Do you use something like Checkmk? If you already have a video for this then please send me the link. Otherwise this would be a great topic for a video. Keep up the good work!

  • @mitchelwb
    @mitchelwb ปีที่แล้ว +3

    This playlist is top notch. I originally planned to run the OS, but at the last minute found this docker series and I'm so glad I did. It's so clean!

  • @Danandrea737
    @Danandrea737 ปีที่แล้ว +1

    Great video! I've just a suggestion. Running docker prune commands without conditions can be dangerous. If, for any reason, docker-compose up -d will not work, you will delete all your volumes and images! Just something like this would help
    if ! docker info > /dev/null 2>&1; then
    docker image prune -af
    docker volume prune -f
    fi
    Checking individual containers one by one would be even better
    Also (I'll stop, I promise), if you are not doing it already, for handling the auto-start for docker containers, you could use a simple
    sudo systemctl enable docker
    You only need to run it once, and it will be executed as a service at every boot.

  • @drbyte2009
    @drbyte2009 2 ปีที่แล้ว +2

    Great video again !
    I would like to see how to setup Node Red and use it with Homeassistant.

  • @matthewbarton-pye9925
    @matthewbarton-pye9925 หลายเดือนก่อน

    Was reviewing this today and found that docker-compose has been deprecated in favour of ‘docker compose’ - just remove the -

  • @merevge2290
    @merevge2290 2 ปีที่แล้ว +2

    It would be nice if you could show us how to set up some things like Grafana, link Node-Red correctly to HA and Alexa or build a Heimdall web UI for general overview. And thanks for the nice video.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +1

      I've not taken a look at Node Red yet, but I will be sure to make a video about it and include these items when I do.

  • @gjlp25
    @gjlp25 2 ปีที่แล้ว +3

    Great video as usual! I use Watchtower as an update solution for all my containers

    • @JamesTenniswood
      @JamesTenniswood 2 ปีที่แล้ว

      Me to, very reliable. I have it send out notifications to pushover on my devices.

    • @AndreaGhensi
      @AndreaGhensi 2 ปีที่แล้ว +1

      Same! For added security, I tandem it with docker-socket-proxy in a dedicated virtual network

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      I've not heard of Watchtower. I'll be sure to check it out, thanks for the tip!

  • @uae7001
    @uae7001 2 ปีที่แล้ว +1

    i use Watchtower to update my containers, it will do the same job you explained with less headach.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      I've not used Watchtower, but it looks really powerful. Thanks for sharing!

  • @Distroreport
    @Distroreport 2 ปีที่แล้ว +2

    You rock, this video series didn’t only let me finally understand how docker works. It made converting from Home Assistant OS to docker a breeze! Thanks a lot!!! It freed up my server to run other (dockerized) services.

  • @rufiromang
    @rufiromang 2 ปีที่แล้ว +1

    When using docker, we dont have HACS. Is there any way to have HACS on docker? Or we dont really need one? Please do a video about installing it on home assistant docker

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Installing HACS on Home Assistant Container is exactly the same as installing it on Home Assistant OS. I made a video about it earlier which you can find on my channel.

    • @rufiromang
      @rufiromang 2 ปีที่แล้ว

      @@HomeAutomationGuy ah ok noted. Thanks a lot

  • @corecanarias
    @corecanarias 2 ปีที่แล้ว +1

    "cron is stupidity complicated" very underrated comment 😅

  • @Enties
    @Enties 8 หลายเดือนก่อน

    Thanks a lot for the series this is very helpful! Do I need to use sudo in these scripts in /opt using cron jobs? Seems in your scripts you do not have sudo and when I try to run these individually it requires sudo. thanks!

    • @HomeAutomationGuy
      @HomeAutomationGuy  8 หลายเดือนก่อน

      I think my cron jobs run as root, but I am definitely not a linux expert and mostly just make it up as I go along with trial and error.

  • @spyrosnicolaou
    @spyrosnicolaou ปีที่แล้ว

    Amazon series! great job!
    can I ask you if please if can you make a video that you explain how to install and configure pi-hole
    thank you

  • @alankinrade5955
    @alankinrade5955 2 ปีที่แล้ว

    Great set of videos. My smart home was controlled by Habitat/HomeKit/Homebridge and my set-up was getting very untidy. I've been following along over the last few months and have abut 50% changed over to Home Assistant now and loving it. I not 100% there with the Docker, would love to see video on how to set-up Pi-Hole in Docker. I did try it but ran into a few issues.
    PS. Aqura cubes on order from China, can't wait to try them out :-)

  • @DominikZalewski85
    @DominikZalewski85 ปีที่แล้ว

    Best YT channel on home automation period! Small suggestion to the update script is to add "set -o pipefail" after shebang which basically will stop the rest of command if any of them fail. It's general bash script good practice ;) I have very similar update script running once a week but its written in python and has pushover notification at the end to tell me if it was successful or not :) Great series of videos on running HA in docker. Love it!

  • @rebe7800
    @rebe7800 ปีที่แล้ว

    in a hurry?

  • @JoshInTheWild
    @JoshInTheWild ปีที่แล้ว

    I’d just like to take a moment and thank you for your awesome video series and blog posts with Home Assistant and Docker. Incredibly helpful, and well put together. I was just thinking earlier today that I wanted to automate my updates and backups- sure enough you have walkthroughs on both! Subscribed!

  • @Nabeelco
    @Nabeelco 2 ปีที่แล้ว

    I believe it's "Hash-bang" as in "hash symbol, bang symbol". Hash, also know as the pound or the number sign, and Bang, also known as an exclamation point or the "not" symbol.

  • @Hupihovi
    @Hupihovi 2 ปีที่แล้ว

    Thank you! You are the best :) Really enjoy your content!

  • @danwarner7594
    @danwarner7594 ปีที่แล้ว

    Alan thanks so much. Your video & blog made it possible to understand using the Docker container option for running HA. This has been a project that I have wanted to installing on a low power ( I-3) for some time. Thanks & keep up the excellent video work and blog. Dan

  • @mrbarrington-smythe9033
    @mrbarrington-smythe9033 2 ปีที่แล้ว

    That's a nice neat script. Have you also tried using Watchtower? It can also delete old redundant docker images.

  • @johnplagianakos400
    @johnplagianakos400 ปีที่แล้ว

    How do you handle the change of containers IPs every time the system restarts, since static IPs are needed in yaml files as well as in HA itself?

    • @stuartforrest
      @stuartforrest 6 หลายเดือนก่อน

      You should be adding an ip reservation in your home router or mesh system. Find what IP the server is using after a booting up and then go into home router and reserve that IP. Its a standard feature in routers but usually found in advanced settings or something like that. Once done the server will always use the same one. The alternative is that you actually set an IP on your server in the network config but you have to be sure nothing else on your network will try to use that in the future so a reservation is usually safer

  • @danielcagarrinho6567
    @danielcagarrinho6567 2 ปีที่แล้ว

    How can i automatically update the containers running Docker Engine on Debian 11?

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      I think it should work the same way - Ubuntu and Debian use similar bases I believe.

  • @andrewmcnulty0
    @andrewmcnulty0 ปีที่แล้ว

    More docker videos!!

  • @UcantBeSerious03
    @UcantBeSerious03 ปีที่แล้ว

    tks 4 the series

  • @dmibnmg
    @dmibnmg 2 ปีที่แล้ว

    Really like your approach towards the HA installation. Will it work on my Pi as well?

    • @merevge2290
      @merevge2290 2 ปีที่แล้ว

      Generally speaking yes, but is quite heavy for a Raspberry Pi

  • @grahammccann8554
    @grahammccann8554 10 หลายเดือนก่อน

    Hi Alan, Thank you for taking the time to make this series of videos

  • @joncampbell2347
    @joncampbell2347 2 ปีที่แล้ว

    G'day from Aus!
    I love the videos! I've now replicated your docker compose config and also the Duplicati backups. My issue is that the script errors when I run to update. THe error states
    Can't find a suitable configuration file in this directory or any
    parent. Are you in the right directory?
    Supported filenames: docker-compose.yml, docker-compose.yaml
    The script is located in /opt/docker/ and the docker-compose.yml file is also in the same location. Can you please confirm the required permissions on the file in case that is the cause of my issue?
    Thanks and keep up the videos, they are awesome!!
    Jon.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Thanks for the comment! Are you CDing into the /opt/docker directory before running the script? Do you have any CD commands in the script that might be moving you out of that directory when you run it?

    • @joncampbell2347
      @joncampbell2347 2 ปีที่แล้ว

      @@HomeAutomationGuy Yes I am CD'ing into the directory first. The script is a direct copy from your script. Scratch that!... The CD in the script was taking it to /opt but my details are in /opt/docker/

    • @joncampbell2347
      @joncampbell2347 2 ปีที่แล้ว

      Thanks! Keep up the great work! Now time to go back and watch more of your videos!

  • @m5sib
    @m5sib 2 ปีที่แล้ว

    Great video series would really love to see one on setting up pihole in a container because of the ports mainly...

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +1

      I have that on my list of videos to make, stay tuned ☺️

  • @matijasemenic3543
    @matijasemenic3543 2 ปีที่แล้ว

    I just recreate container through portainer, to update containers.

    • @RickFarris
      @RickFarris 2 ปีที่แล้ว

      Can you do it in a cron job?

  • @ki8as
    @ki8as 2 ปีที่แล้ว

    Great Job love it

  • @MrSupersidewinder
    @MrSupersidewinder 2 ปีที่แล้ว

    I did all of this and ran it manually, seemed all good, created the cron job... I was expecting an update to happen but my HA is showing Version 2022.3.8- Frontend version 20220301.2 latest. Did yours update to the new 2022.4???

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Yep, mine automatically updated to 2022.4 on Saturday morning

    • @vojtechjeso
      @vojtechjeso 2 ปีที่แล้ว

      I have the same problem ... I can see that the script ran, but the containers didn't update ... running the script manually works as expected. Have you found any solution?

    • @MrSupersidewinder
      @MrSupersidewinder 2 ปีที่แล้ว

      @@vojtechjeso Nope, I am still running the update script manually... Strange but it does a perfect job when run...

    • @vojtechjeso
      @vojtechjeso 2 ปีที่แล้ว

      @@MrSupersidewinder what docker compose version you have? (run: "docker compose version") ... I had to use version 2 instead of version 1, because I am running on RPi and there were no docker compose builds for arm

    • @MrSupersidewinder
      @MrSupersidewinder 2 ปีที่แล้ว

      @@vojtechjeso Version 3