How to choose an operating environment for a NUC?

This is a companion :wink: post to How to choose a NUC? where I asked about choosing a NUC and got some great advice.

So, assuming I’ve chosen my NUC what are the pros and cons of the various environments?

The two popular options seem to be Docker based or Proxmox based. As I understand it the main difference is that Docker containers each need their own OS whilst Proxmox ‘shares’ itself as an OS to each ‘compartmentalised application’ so that they appear to be a complete virtual machine but aren’t really.

I plan to start off running with HA and Ubiquiti Controller but undoubtedly want further applications in (the near) future. Object/facial recognition, security cameras Grafana/InfluxDB and traccar server all spring to mind immediately as exciting options.

And in case I have any of the terminology wrong I should point out that my (hands-on) experience with VMs is limited to when I had an old Win95 application that wouldn’t run on XP and, ahem, playing old DOS/Win3.1 games on DOSBox (which I know doesn’t really count but it was the first thing that taught me about the concept!)

Again, thanks for any comments.

Have you tried something like Rancher OS where you have a basic OS install designed for running Docker?

You could then just add the containers as you need them.

I personally have lubuntu (linux) on my nuc and hassio etc running via dockers.
I chose lubuntu as it is a lighter version of the full blown ubuntu.

I run Debian 9 on my NUC and install everything I can (including HA) in Docker. Easy once you get the hang of volume sharing. And there’s lots of support on here since so many already use it. There’s no reason to be an “edge” case unless there’s a good reason.

And then since you have a full Linux OS you also have the ability to run things outside of Docker for those things that don’t have a docker image, like Kodi, etc.

1 Like

That’s not my understanding. Docker containers are self contained and have their own O/S in the container. Maybe that’s what you mean.
Even though I’m running Debian, some of my docker containers might be running Alpine Linux or Ubuntu or anything else. You can also install Hass.io in docker as well and use all the hass.io addons as you do right now.
I have not found any downside to running like this and I’m sure you will come to love docker when you get your head around it. 95% of everything I use has a docker container - look at linuxserver.io for all their docker images… can pretty much find everything you would want.

Proxmox is nothing more than a wrapper for KVM and lxc on the Linux kernel. It’s just Debian under the hood. It offers both standard virtualization via KVM, and Linux Containers (LXC). A Linux container shares direct native Linux resources with it’s host so in a way proxmox is “sharing it’s kernel and hardware” to a container.

None of that pertains directly to how to run home assistant though. You still either need to create a Linux container (you can choose from several different distro), or a KVM VM. So then you have to decide how you’re going to run HA on that OS.

I’m using Ubuntu 18.04 LTS. My Hassio installation is in docker and I use Portainer to manage the containers. Portainer gives a nice overview of docker from a web page. I have also installed VirtualBox from Oracle as a VM, just to try it out. One thing I didn’t like is the ability to export a Hassio snapshot to somewhere else as backup. I haven’t figured it out yet. However, you can do a VM snapshot instead. I did find using hassio on VM was very fast to load (30s) and if you needed to reboot hassio on VM, you didn’t reboot the whole Ubuntu OS, as you do when using docker. Dr Zzs has a good video - Installing Hassio with VirtualBox. After you have set Hassio up, you don’t really need to tinker as much. One thing (advantage) to note about running on docker is that if I reboot, I don’t actually need to log on to the OS, as docker starts up automatically. So, for example, if I am out and reboot after an upgrade, I do not have to be at home to log on to Ubuntu.

Dr Zzs also has a video of installing on Proxmox - Install Hassio VM on Proxmox with one simple line.

For convenience, I have the NUC behind the TV and connected via HDMI. I have bought a wireless keyboard and mouse, so if I need to do anything on Ubuntu, I can just logon from the comfort of my sofa.

1 Like

Yes, I’ve seen both those videos. Proxmox just looks too easy! There has to be a down side…
(I think one of them is that unless you have a discrete graphics adapter you can’t pass the video out to a screen which would seem to preclude installing Kodi or similar).

I am running Home-Assistant through Docker on an Intel NUC. For the OS, I use Ubuntu 18.04 Server (same as Desktop but without desktop environment and extra apps). It works really well. I am also building a proof-of-concept on an old HP laptop that uses Zorin OS Core. I absolutely hate the interface of Ubuntu desktop, but Zorin OS solves that. I don’t have anything added to the default installation on that system, but it loads and appears to work. Zorin is based on Ubuntu LTS releases.

I’m in the process of reconfiguring my system to get better logging and to fix some of my rules and automations that worked but weren’t as efficient as I’d like. So far, I’m running InfluxDB, Grafana, Portainer, Mosquitto, Node-Red, and Dockermon. My hang-up right now is local audio out. I’d like to use the speaker jack, but I just can’t get it to pass through. I just purchased a Chromecast Audio from ebay, and it will be here by Friday. That will fix my immediate problem. Otherwise, I’m happy with this setup.

Ok, I still haven’t got my NUC yet - to much else in real life going on, but I figure that just means I’ll be better prepared when I make the jump :slight_smile:

Two questions though, for both Docker and Proxmox setups (or any other).

  • Firstly is Bluetooth available to use as a device tracker as it is on the Pi and
  • Is the lack of availability of the audio jack unique to Docker?

Thanks.

Yes. When you use network=host it will let you use the bluetooth on the NUC

The issue with the audio jack, as I understand it, is that HA relies on the media_player component to handle sound. So when you specify a media_player such as VLC, it needs to be installed. Docker creates sandboxed environments so that actions of one program can’t interact with other programs unless explicitly allowed. Therefore, VLC installed on the system cannot be called on by a docker container.

Some users have enabled the audio jack using docker-compose and a dockerfile that basically installs VLC inside the docker container. I tried that but never got it to work. I am in no way a Linux expert, however. There was also a similar configuration using Pulse audio that other users reported success when using.

Looking at the supported audio components, I thought Snapcast server might be an option, but again, I was never able to get it working in Ubuntu.

And lastly, I read where one user had an audio issue that was resolved with a BIOS update. My BIOS had never been updated (2 years out of date), so I updated last night. I also found out after much troubleshooting that I needed to adjust audio levels in the ALSAMIXER. So it’s possible I had it working at one point and didn’t know it because the sound was muted. Lesson learned: make sure your sound works in the OS before adding it to HA.

I re-built my NUC setup last night using Zorin OS Core, but I doubt I’m going to mess with the built-in audio because I have a Chromecast Audio on the way. I might attempt the Snapcast server again for grins and giggles.

1 Like