Install ubuntu desktop, choose minimal version with LVM.
Open the terminal and type the following commands
First we need sudo / root access, type the following into terminal.
sudo -s
now enter your password
Now we have root (sudo) access to do the following
This will upgrade and update everything
apt-get upgrade
apt-get update
This will install the pre-requisites, most of these will already be installed
apt-get install -y bash jq curl avahi-daemon dbus network-manager apparmor-utils
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
This next bit is to download the docker repository and finger print check
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Now install docker-ce by copy + paste this whole box of 4 lines of text and press enter
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Now we can install docker-ce
apt-get update
apt-get install docker-ce
Now we can finally install hass.io
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s
(or) if we use an Intel NUC
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m intel-nuc
Now we can install portainer to manage docker containers from web interface
docker pull portainer/portainer
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
Now we check portainer is running
docker ps
We should see output in the terminal that lists all 3x containers
(portainer / homeassistant / hass-io-supervisor)
If we need to check what our IP address of the server is we can type
ifconfig
Now we can access the hass.io and portainer web-gui
Hass io - http://xxx.xxx.xxx.xxx:8123
Portainer - http://xxx.xxx.xxx.xxx:9000
Note:
-
If we want to install the SSH addon for hass.io and we also want to use SSH with ubuntu, then we need to change the default ssh port for ubuntu from 22 to 2222. The ports will be [ hass.io ssh addon = 22 / ubuntu desktop = 2222 / hass.io-supervisor = 22222 ].
-
If any of the pre-requisites wont install you can try the following:
add-apt-repository universe
apt-get update