HA on Intel NUC - which way?

I use Ubuntu 18.04 (Desktop) on my NUC, and run HAss in a Python Virtual Environment.
Been running this for more than a year. Works for me :slight_smile:

I went from a bust RPi to NUC and followed these instructions

https://www.smarthomebeginner.com/install-ubuntu-server-from-usb/ - to install Ubuntu

https://www.smarthomebeginner.com/docker-home-media-server-2018-basic/ - to set up Docker and install HA etc

No. I’m just sick of seeing the same FUD spread around to the newbies.

Give them a choice, let them research and decide for themselves.

2 Likes

I plan moving to NUC and my research conclusion is to run HA in ESXI/Proxmox cause linux way will make this linux a point of failure if I’ll install something wrong on linux OS

Running in ESXI/Proxmox allows VM’s in addition to Dockers and will isolate each thing and allow easy and fast snapshot/restore

Another plus is Proxmox can be run from USB so the SSD will be storage for all VM’s

Tip for Proxmox (and possibly ESXi) - when you create the VM, it doesnt automatically add an virtual sound card, which resulted in my HassIO logs being spammed with “no audio device enabled”

You can add one in easily in the System tab (i think) - I only discovered it last night after a week of wondering why I was getting such log spam

@AdmiralRaccoon, This has been covered in a number of other similar threads recently. I will post the same info I have in other threads, plus some extra steps and info, hopefully it will help you.

This, in my experience, is the fastest and simplest way to deploy Hass.io on a NUC (or other PC, RPi, etc) running Ubuntu Desktop or Server as the OS in this case (or using Raspbian on an RPi3). I have used this method myself on a NUC, an RPi3 and recently an old Dell Optiplex 990. The method is repeatable and simply, it just works.

1.) Get ubuntu form Here. Use the torrent link - either 16.04 LTS, or 18.04 LTS. Server or desktop won’t really matter. I have recently changed to using Server 18.04.03 LTS myself.

2.) Make a bootable Ubuntu USB using Rufus. Available Here

3.) Install Ubuntu to the NUC using the bootable USB you have just made, once the install and setup is complete, update the OS via a terminal window with;

sudo apt-get update && sudo apt-get upgrade -y

4.) If you have a current HA install on another machine, backup all your yaml files, lovelace config, etc to your PC, USB or HDD. A handy way to do that is using WinSCP, available Here. Connect to your current install and copy/paste all your config to a PC.

5.) Follow this guide , specifically from the line " To prepare your machine for the Hass.io installation, run the following commands:"

Copy each line of the below commands and paste them into a terminal window, and execute them one at a time.

sudo -i
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
curl -fsSL get.docker.com | sh

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s

6.) Copy your yaml files to the NUC, normally in the location /usr/share/hassio/homeassistant

7.) Install Portainer to manage your Docker containers for anything that you might want to run that isn’t available through Hass.io or HACS.

sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

I followed this myself just this week to do a fresh install on a Dell Optiplex SFF 990, and the entire process took me 19mins. I timed it just to see. This included making the bootable USB, Ubuntu install, updates, installing and having HA up and running. Very easy.

The time it takes will change depending on the speed of the CPU of the NUC/PC/RPi you use, but this should give you a good indication of just how fast and easy it is.

EDIT
Follow this guide

5 Likes

Thanks Jason, that was really helpful.

Now I´m struggling with some basic Linux Problems to get started:

Am I right that I don´t need the Samba Addon for Home Assistant anymore, but instead the Samba server for Ubuntu, to access and edit the Configuartion.yaml?
I have installed Samba, and made this share:

[config]
path = /usr/share/hassio/homeassistant/
public = yes
writable = yes
comment = hassio config dir
printable = no
guest ok = yes

And ran this command:

sudo chmod 777 /usr/share/hassio/homeassistant/

I´m able to read and create files, but I´m unable to edit, as I´m not allowed to save the files.

Have I missed something?

Another vote for Ubuntu server with docker compose.

There is a project called dock starter that is pretty cool if you want to run Plex radarr etc. It has lots of useful scripts auto backup auto upgrade etc.

3 Likes

@AdmiralRaccoon This may not be best practice, but this works for me. Log into terminal/Putty.

Backup currnet config
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

Edit the Samba config file
sudo nano /etc/samba/smb.conf

Press and hold control+K to remove all the text

Copy the below and paste in;

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = Ubuntu
security = user
map to guest = bad user
name resolve order = bcast host
dns proxy = no
bind interfaces only = yes

[Public]
path = /
writable = yes
guest ok = yes
guest only = yes
read only = no
create mode = 0777
directory mode = 0777
force user = nobody
create mask = 0777
directory mask = 0777
force user = root
force create mode = 0777
force directory mode = 0777
hosts allow =

Ctrl+X to save

Create a username and password
sudo smbpasswd -a YOUR_USERNAME

Restart the samba service
sudo service smbd restart

1 Like

I started with Ubuntu around 8.04 release. And I changed hardware twice but still use same OS ( one recovery due to unsuccessful BTRFS install). It’s rock solid and very well documented on Internet. Mix of Ubuntu and Docker is perfect. New installs do not affect your main OS. In case of troubles you simple delete containers/images and start from scratch. Backups you can keep on server (NUC) or download to PC. Portrainer is really a good addition, it makes thing simpler in case of troubles.

If it were me I’d go with a VENV install on Debian, however everyone is different, if you want/need/already use HassIO addons then go with that.

I wish everyone a goodfmorning and a nice start of the week!
Thanks to everyone, the migration worked fine and I can also edit my config files from windows now, and even my z-wave stick works without altering the config.

However, some questions came in mind recently:

1.) This NUC5CPYH has a celeron CPU. Right now I have installed Hassio and Plex, and the CPU sensor within HA shows me about 19-25% CPU usage. Is that too high? My Raspberry

2.) How do you backup your Linux installations? Just relying on the Hassio Snapshot feature, or is there something available to backuop the whole disk. (Acronis? Rsync?)

the N3050 is a dual core CPU with a low clock, that sort of usage is fine.

You can either take a snapshot from within Hass.io, or, just keep a backup of all your yaml and lovelace files (my recommendation), and reinstall Hass.io easily at any time should you need.

Just keep a .txt document with all your configs for Plex etc and you can easily do a full install of the OS, Hass.io and any other docker containers.

Well, for the last 3 days everything workjed fine. Today my HA freezes (not the Ubuntu instance), i just couldn´t access the Web GUI anymore (Rotating circle, but no really connection error)

Anyway, I restarted my whole NUC twice, as I didn´t know how to just restart the Hassio service/container. Is there a command for that?

Thanks again,
Philipp

Did you also install Portainer on the NUC?

If so then you can go to the portainer GUI & restart from there.

If not, …then why not?

It makes things ridiculously easier to deal with situations just like this.

1 Like

docker restart home-assistant
and
docker restart hassio-supervisor
or
sudo systemctl restart hassio-supervisor.service

Thank you both.
I had installed Portainer now, but it´s good to know the command line

1 Like

I’m a bit late to the party on this one. I had the same dilemma when moving from RPi3, I ended up installing Proxmox and hassio on my NUC. Surprised Proxmox hasn’t been mentioned much. Do people not use Proxmox now or is there better alternative.

I’ve been using Proxmox since around 2009-2010. But for HA I use a NUC running Linux and docker. I don’t need a hypervisor on my NUC. I have a server for that.