Why I Use Docker for my Smart Home

Sdílet
Vložit
  • čas přidán 25. 08. 2024
  • I run many different Home Automation services like Home Assistant, Zigbee2MQTT, WireGuard and Frigate on a single Intel NUC PC, running Ubuntu Linux and Docker. In this video I explain why Docker is a great solution for those who want to get more out of their smart home.
    ** UPDATE / CLARIFICATION **
    I made a mistake in the video, I was incorrect when I said that the Operating System (OS) is inside a docker container. It actually uses the operating system from the host rather than containing an OS inside the container itself. The other points still apply though. Thanks to the viewers who corrected me in the comments below and taught me something new! I appreciate you!
  • Jak na to + styl

Komentáře • 90

  • @rationaleatheist8769
    @rationaleatheist8769 Před 2 lety +1

    Looking forward to this series. Been using HA OS for a short while and already want exactly what’s described in this video 👍🏻

  • @MikeKrasnenkov
    @MikeKrasnenkov Před 2 lety +3

    “Stock” HA also uses docker to run the HA core and all addons in separate containers inside a minimal host (HAOS). The only difference with supervised install is that the latter gives you more control of the host and ability to manage your own non-ha related containers.

  • @RogerStocker
    @RogerStocker Před 2 lety +1

    Looking forward for the mentioned next Video.

  • @chriskyte8341
    @chriskyte8341 Před 2 lety +1

    I have outgrown by Raspberry Pi 4 as have many Add-ons installed like Zigbee2Mqtt, AddBlock, Frigate and am now just starting to look into setting up a second Raspberry Pi with docker to run these add-ins and leave the original Pi to run HA only. Very much looking forward to this series!

    • @AbarSimorgh
      @AbarSimorgh Před 2 lety

      Would you mind sharing which device you ended going with? Intel NUC?

  • @russtuff
    @russtuff Před rokem

    I'm happy to find this video and playlist. I'm outgrowing my raspi4 and moving to Docker. HERE WE GO!

  • @logangloss1022
    @logangloss1022 Před 2 lety

    I like the direction you’re taking with these videos!

  • @phentas
    @phentas Před 2 lety +6

    P.S. you can do all of this on the RPi. I've even got an old PiB+ running containerized versions of HA, node-red, Mosquitto and NGINX. And it's no slower than running them directly. I get you primarily moved to never hardware for the performance gains. But it kindoff makes it seems like you can't do all of this on the Pi. You absolutely can, without additional performance impact. (Caveat: not all images are available for ARM architecture, which is what you need for Pi)

  • @Hupihovi
    @Hupihovi Před 2 lety

    Thank you! I did not know docker existed for HA, was wondering why the hell so many people prefer to run it over on VMs and spare devices instead of RPs. This explains it all, thank you!

  • @junahs95
    @junahs95 Před 2 lety

    Thanks for this video. It cleared up a lot of confusion for me, on what docker actually is.

  • @mihairachita174
    @mihairachita174 Před 2 lety +1

    Great video.
    Can't wait to see your video about ad block. Keep going with your awesome videos 👌 👏

  • @Charlietuna49
    @Charlietuna49 Před 2 lety

    Thank you! I just bought a few books on Docker. Unfortunately, there not HA oriented. I look forward to more videos.

  • @WPGinfo
    @WPGinfo Před 2 lety

    Thank you very much Great topic! Can't wait to transfer my stuff! Please provide ample explanation & examples for those not yet 'knowlegeable'

  • @74357175
    @74357175 Před 2 lety +3

    I'm interested to see where this serious goes! I've been interested in switching to running Docker myself, but to be honest the Supervisor and HassIO are just too damn convenient.
    Would be great to see how to replicate some of the Supervisor features, etc

  • @optical_ideas
    @optical_ideas Před 2 lety +1

    Nice. I did it very similar. First i had a lot of things on a Rpi2 (ok its old and slow).
    My main ... lets call it connector .... is NodeRed. All my smart things are connected via api, and i configure there all my custom actions. Speed of deploying new things in NodeRed on the Rpi2 is, lets say ok. Than i found a cheap Gigabyte Brix (very similar to the Intel Nuc). I installed Ubuntu Server and Docker. At the moment running 12 containers. Everything is very fast. CPU usage is around 3 to 10 % and RAM is 1 gig

  • @FrankGraffagnino
    @FrankGraffagnino Před 2 lety

    i would love to see a walkthrough of your setup and how you organize and backup your containers and maybe also your portainer setup.

  • @andersyuran7725
    @andersyuran7725 Před 2 lety +2

    Interesting, time to make one about HA OS in a virtual machine. I use virtualbox and run HA OS in one vm and then other like mariadb in their own vm. Works flawless. This way I get a Supervised HA without limitations and can then choose how I want to install addons. Direct as addons or freestanding. My choise

  • @210Artemka
    @210Artemka Před rokem

    I just use 1 PC with Proxmox to host HA and pfSense router. I could have used it for other service too, but I have a TrueNAS for them.

  • @74357175
    @74357175 Před 2 lety +4

    Docker does NOT virtualize the machine, so you cannot run an OS in it that is different to the host. This is what distinguishes it from a hypervisor!
    E.g. you can't run a Windows container on a Linux host (and vice versa)

    • @d_veedee
      @d_veedee Před 2 lety +1

      Containers share the kernel with the host.

    • @74357175
      @74357175 Před 2 lety +1

      @@d_veedee exactly

    • @74357175
      @74357175 Před 2 lety +1

      @@d_veedee would be great if Alan could correct the video

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety

      I did not know that! Thanks for mentioning it, I'll make a note in the comments to call that out!

    • @fredpeiffer1266
      @fredpeiffer1266 Před 2 lety +1

      True and not completely true: You cannot run a windows container on Linux, but you can run a linux container on windows. Docker desktop on Windows will install a small VM containing what's necessary to run Linux Containers

  • @slashamos
    @slashamos Před 2 lety

    Keep up with the great videos man!
    Do you have github or some website where you share your docker compose and configurations?

  • @alanjrobertson
    @alanjrobertson Před 2 lety +2

    Thanks, was interesting to hear more about Docker. Can you easily run HA in Supervised mode on this? The HA website seems to only talk about Core. Also what about moving an existing VM container from a Pi4 across to Docker? Would be interested in the process.

    • @tzoumaz40
      @tzoumaz40 Před 2 lety +3

      I think thats the problem: The docker version of HA has some restrictions. No supervisor, no hacs.

    • @ssmon3
      @ssmon3 Před 2 lety +2

      This is exactly what kept me from using docker for HA. I was unable to find an easy way to implement supervised mode in docker.

    • @techdad6135
      @techdad6135 Před 2 lety

      HA run in docker does have hacs but no supervior or add on's

    • @NMOBrien
      @NMOBrien Před 2 lety +1

      @@tzoumaz40 HACS is available in docker. You CAN run HA with Supervisor in Docker but Ubuntu is no longer supported. You have to install Debian and as there are many repositories that don’t come with Debian out of the box it can take a while to set up and managing this version of HA is not for the feint hearted. I am on Ubuntu Server but haven’t missed supervisor. You can place things like your mqtt broker etc in other docker containers and link most into HA. Supported integrations like Tasmota etc still work from within HA. The only bare metal install I had to do was a samba share to get the mounts for permanent volumes bound to containers. It really isn’t that different if you do a bit of reading. HA Supervisor is a docker container which is why it doesn’t come in the Docker version of HA. You can’t containerise a container unless it’s running on Debian.

    • @tzoumaz40
      @tzoumaz40 Před 2 lety

      @@NMOBrien Thanks for your detailed response. But for me (> 70) it is very complicate to do this although its the best variant because my pi runs 24/7 only for HA. Is there a link or a tutorial where this explained: HA Supervisor with Debian11 in docker.

  • @smartassist9700
    @smartassist9700 Před rokem

    Get new big disk for backup (soon). Do not wait.

  • @ronm6585
    @ronm6585 Před 2 lety

    Nice, thank you.

  • @EmilePolka
    @EmilePolka Před rokem

    running HA on a docker container is such a bliss, the only PIA is the stuff that is essential is not present on a docker version of HA (something like a mqtt server), but once you figure out that thing, yeah, HA in a docker is helluva lot better.

  • @ZA26
    @ZA26 Před 6 měsíci

    Do I need Windows 10 to use Docker?

  • @xtremeideaz
    @xtremeideaz Před 2 lety +1

    Thanks for this video. its a perfect timing. I've started looking for an upgrade from my Argon one M.2 running HA. Whats your take on Proxmox compared to Docker? i want to add a plex servier, pi hole and so on.

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety

      I personally know nothing about Proxmox, so I can't really help here. But I run PiHole on Docker and know of several people running Plex on Docker without issues.

    • @sparclec6202
      @sparclec6202 Před 2 lety

      You can run Proxmox and have a specific Docker VM and run Homeassistant and PiHole in docker instances. Or you can run a specific VM for Homeassistant. Docker and Proxmox are not opposed but can be complimentary. As everything in homelab, it depends on your hardware and what you all want/can run on one piece of equipment. Proxmox is a kvm hypervisor that can even install instances of Windows in a VM. There is a whole rabbit hole to explore.

    • @xtremeideaz
      @xtremeideaz Před 2 lety

      @@sparclec6202 thanks. Will explore it.

  • @iosyabrams1094
    @iosyabrams1094 Před rokem

    Better to use docker swarm and build cluster(even if in the begin you have only one node). Any laptop available in the local network might increase the power of all services and take care of heavy actions! Came to home, HA turns on computer, wich joins to the docker swarm cluster and available there deepstack face recognition containers to recognie faces in each room! if nobody home, turns it off.
    Btw, even your old rasberry pi might be included to the cluster(for example: mqtt broker container might live there or some other services for car number recognition!)

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před rokem

      Thanks for sharing! How are you running Deepstack? I thought it was no longer being developed, but I could be misinformed

    • @iosyabrams1094
      @iosyabrams1094 Před rokem

      ​@@HomeAutomationGuy mb you are right(deepstack is not available anymore, just docker container without doc).
      But the main idea is to use docker swarm and add all available devices to the docker swarm cluster.
      Did you find new raspberry pi for free? Add it to the cluster and etc etc.
      Do you have a good router with linux on board? Add it to the cluster.
      No need to think in terms of I need more powerfull machine to support something heavy.
      Instead just add more devices to the cluster. Even more crazy, your old laptops(you use for dashboard) might run some containers from your docker swarm cluster(why not, if you anyway plug it to power supply).
      Additional advantage is also if heavy machine is broken or turned off, you just don't have face/person recognition sensors...
      Easy to maintain also than running containers via ssh. Available other containers for monitoring the system(portainer)

  • @SmartLifeEnthusiast
    @SmartLifeEnthusiast Před 2 lety

    Do you launch containers via docker-compose and then manage them via Portainer?
    Will a rebuild then follow the docker-compose config, or the config the container was started with (i.e. ignoring changes to docker-compose)?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +1

      I pretty much only use Portainer to look at the containers health and logs, or to start a terminal session into them. Everything else I do with the docker-compose file and cmdline

  • @antonmevan
    @antonmevan Před 8 měsíci

    Hi do you recommend installing Home Assistant on a PC?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 8 měsíci

      It's fine for testing, but it might consume a lot of power if you run it and leave the PC on permanently.

  • @edward463
    @edward463 Před rokem

    Can you run home assistant and octorprint on the same Docker on 1 computer?

  • @revelleno6497
    @revelleno6497 Před 2 lety

    Why don't you install HA os in your NUC? can we do that?
    I'm new to HA. At this moment i try to install HA using wsl on win10, and still stuck. Is it really worth to use container?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety

      You can install HA OS on a NUC, but I don't personally think it's the best use of the hardware. I explain why in my next video which compares the two installation methods.

  • @amithimani8163
    @amithimani8163 Před 2 lety

    I have installed home assistant docker on my synology DS1621 , but there is no supervision mod on it.

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +2

      Yeh, that is a shame. I actually cover this in the next video in the series, you should check it out!

  • @NoProblem76
    @NoProblem76 Před 2 lety

    After some more tinkering it’ll be why I run my home on k8s

  • @AbarSimorgh
    @AbarSimorgh Před 2 lety

    Thank you for sharing.
    Which Intel NUC did you get?
    Obviously no need for high-end GPU performance if no gaming or such are intended on it, or am I wrong?!

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +1

      I got an Intel NUC 8 i5, with 16GB of RAM and a 1TB Solid State HDD. It's been perfectly fine for everything I've needed it for

    • @AbarSimorgh
      @AbarSimorgh Před 2 lety

      @@HomeAutomationGuy Thank you for your reply.
      Did you get it from Amazon? The Canadian Amazon site doesn't have the i5, wondering if you got it from another source.
      Thanks.

  • @DenysDovhan
    @DenysDovhan Před 2 lety +3

    I've migrated from docker setup back to Supervised because it's too painful to handle backups easily. I would be grateful if anyone can suggest a docker image for handling backups with a nice UI as the Supervisor does.
    Yes, I know about Duplicati, but its incremental backups are messy when it comes to restoring everything from scratch.

    • @bakinblack90
      @bakinblack90 Před 2 lety +1

      I did the same, I went to a VM instead because of the supervisor.

    • @d_veedee
      @d_veedee Před 2 lety

      Just bind mount /data on the host and backup that folder? Containers are meant to be thrashable, no one backs them up

    • @DenysDovhan
      @DenysDovhan Před 2 lety

      @@d_veedee I know but I need to have the archive of volumes, which is not something you can easily get with duplicati. I am looking for a docker container with nice UI for backing up stuff in a simple archive and uploading it to google drive.

    • @fredpeiffer1266
      @fredpeiffer1266 Před 2 lety

      @@DenysDovhan Like David said: 1. You mount /config from home-assistant docker to a folder on your machine and 2. You back that folder up using whatever you'd like. The end! It would take way too long to make a UI for that. Regardless of the amount of integrations/custom-components/dashboards you have, they're all in the same base folder.

  • @Joseph-ko2kl
    @Joseph-ko2kl Před 2 lety

    Why not use Blue or the new Yellow (Amber)?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +1

      It was quite hard to buy Blues for a while, and I have two Yellows on Pre-Order! But it's important for people to realise that you can run HA on almost anything!

    • @Joseph-ko2kl
      @Joseph-ko2kl Před 2 lety

      @@HomeAutomationGuy Agreed. I just pre-ordered a Yellow myself- kinda pricey! I hope it is all I am hoping it is!

  • @gambit3570
    @gambit3570 Před 2 lety

    have you tried a rasberry pi with docker and an ssd would that work ?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +1

      Yep. That would work. Just make sure you get quite a powerful Pi

    • @gambit3570
      @gambit3570 Před 2 lety

      @@HomeAutomationGuy like a raspberry pi4 4gb model?

  • @AliMamounFarrah
    @AliMamounFarrah Před 2 lety

    What if I have a KNX standard?

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety

      Depends on how you have integrated with it. You can still connect to it via the IP, and if it is using some sort of serial connection you can pass this through to Docker as well.

    • @AliMamounFarrah
      @AliMamounFarrah Před 2 lety

      @@HomeAutomationGuy
      First of all, thank you for the reply.
      To be honest, my apartment is still in the construction stage, I did though istall infrastructure for KNX button panels and assembled the rely modules..
      But I did not reach that stahe where the place is livable yet.. once I move in, i'll try and install the home assistant system.
      Thank you!

  • @btpv.
    @btpv. Před 2 lety

    2:50 that is not completely true it reuses the kernel so it isnt posible to use linux containers on windows unless u use wsl

    • @btpv.
      @btpv. Před 2 lety

      Tnx for the hard ❤️

    • @v.6ak
      @v.6ak Před 2 lety

      Technically, Linux-based docker images on a non-Linux OS need a Linux VM. WSL2 uses a Linux VM under the hood.

  • @jupie666
    @jupie666 Před 2 lety

    next step: make it redundant with kubernetes :)

    • @fredpeiffer1266
      @fredpeiffer1266 Před 2 lety

      I work with Kubernetes every day and don't see the point of complicating HA + Add-ons by running them as pods on Kubernetes. Docker (and docker-compose) by itself is just fine for this. Everything is possible, but at that point you'll definitely lose half of the current audience

    • @HomeAutomationGuy
      @HomeAutomationGuy  Před 2 lety +1

      I've considered it! The one stumbling point for me is how to deal with a single Zigbee or Z-Wave USB coordinator/hub. As far as I can tell you'd need to physically unplug the USB dongle from one host and put it into another if your host failed on one hardware set and wanted to switch to another. Definitely open to suggestions though!

  • @corecanarias
    @corecanarias Před 2 lety

    Wait, so then you could have helped us to migrate gpp to docker???😅

  • @gecko2573
    @gecko2573 Před rokem

    step up and use k3s

  • @khejurbanglatv
    @khejurbanglatv Před 3 měsíci

    spyderman

  • @d_veedee
    @d_veedee Před 2 lety

    Nice video but podman > docker