Install Home Assistant Docker Supervised

Install Home Assistant Docker Supervised on Ubuntu Server

Home Assistant is my go to choice in terms of management of my smart home devices.

Its relatively lightweight and it has tons and tons of functions plus support for a wide range of integrations from 3rd party vendors.

The only downside (in my opinion at least) its the steep learning curve of the system and also the somewhat complicated installation process.

In this article i will show you that is not that complicated to install Home Assistant in Docker with support for Addons (the Supervised install).

Home Assistant is my go to choice in terms of management of my smart home devices.

Its relatively lightweight and it has tons and tons of functions plus support for a wide range of integrations from 3rd party vendors.

The only downside (in my opinion at least) its the steep learning curve of the system and also the somewhat complicated installation process.

In this article i will show you that is not that complicated to install Home Assistant in Docker with support for Addons (the Supervised install).

How many types of Home Assistant installations there are?

  1. Home Assistant OS (formerly Hass.io):
    Home Assistant OS is an installation method that provides a full operating system tailored specifically for running Home Assistant. It includes a user-friendly web-based interface for managing add-ons, automations, integrations, and more. Home Assistant OS uses Docker containers to isolate components, making it easy to manage and update. It’s designed for users who want a simple and integrated experience. With this installation type you get all the functionality.
  2. Home Assistant Supervised:
    Home Assistant Supervised allows you to run Home Assistant on a generic Linux system with the help of Docker. It provides more control and flexibility compared to Home Assistant OS, but it requires manual configuration and maintenance. It’s suitable for users who want more customization and control over their installation. With this installation type you get all the functionality.
  3. Home Assistant Container (Home Assistant Core for Python VE)
    Home Assistant Container installation is for users who are familiar with Docker and want to run Home Assistant in a Docker container on their existing system. It offers the most flexibility and control, allowing you to manage your own dependencies and environment. With this installation type you wont get all the functionality.

Why Docker?

Docker is a platform designed to make it easier to create, deploy, and run applications in containers.

Containers are lightweight, portable, and self-sufficient environments that encapsulate an application and its dependencies. Docker allows you to package an application along with its required libraries, dependencies, and settings into a single container, ensuring consistent behavior across different environments.

Basically Docker allows you to have multiple applications and services inside of theory on environment allowing you to run multiple services, applications and operating systems inside of the same machine.

Requirements

  • a computer with minimul 2GB of RAM, 32GB of storage and 2 CPU cores (i recommend to have at least 4GB of RAM, 64GB SSD and 4 CPU cores)
  • Ubuntu Server 22.04
  • Docker CE
  • Systemd
  • NetworkManager
  • udisks2
  • AppArmor
  • LAN internet connection to the machine (proffered)

Installation instructions for Docker & Dependencies

Download the latest Ubuntu Server image from the official website: https://ubuntu.com/download/server

Burn the image to a USB drive and install it on the host machine that you are planning to use for Home Assistant.

After you completed the installation and you are logged in open a new Terminal window and type the following

sudo apt update
 && sudo apt upgrade -y

You will be asked for your admin password and then the system will download any updated that are available.

The you need to type the following command in order to download all the required packaged for Home Assistant & Docker to run properly.

First you need to run the command:

apt install \
apparmor \
jq \
wget \
curl \
udisks2 \
libglib2.0-bin \
network-manager \
dbus \
lsb-release \
systemd-journal-remote \
systemd-resolved -y

Then run the commnad:

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

Now we need to add the Docker repository into your repo keys.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Now you need to install all the Docker packages. Run the following command in Terminal.

sudo apt install docker-ce docker-ce-cli containered.io

This process can take a few minutes, depending on your internet connection.

After the process is completed now we have Docker CE installed.

Installation instructions for Home Assistant Supervised inside Docker

Here you have two options for installation:

First option is to use an installation script.

wget -O installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
sudo bash installer.sh

The installation script take all the necessary steps to install the required files for you and after a few minutes you should have Home Assistant Supervised up and running.

Second option is to install Home Assistant Supervised inside of docker using the .deb packages.

First download the latest OS Agent Release from here: https://github.com/home-assistant/os-agent/releases/latest or you can use the command.

wget $(curl -s https://github.com/home-assistant/os-agent/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \")

Now run the command to install the OS Agent, but dont forget to replace the file name in the command:

sudo dpkg -i REPLACE_THE_FILE_NAME_OS_AGENT.deb

Next install Home Assistant Supervised using the command:

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
apt install ./homeassistant-supervised.deb

Installation should take a few minutes then you should have successfully installed Home Assistant Supervised.

Please note! Because Ubuntu Server is not technically supported as an Operating System, you may have some errors in Home Assistant regarding the OS. But dont worry, this is normal!

Install Home Assistant Docker Supervised on Ubuntu Server 31

Now if you type the local IP address of the machine that you have installed Home Assistant one, followed by the port 8123 you would be prompted by the Home Assistant installation menu.

Optional: Install Portainer

Portainer is a popular Docker container management tool with a web-based user interface.

It will make your experience with Docker a lot better it its worth installing it.

run the following command:

docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

You can acces Portainer via port: 9443.

Common Issues with Home Assistant & how to solve them

  • Configuration Errors:
    • Issue: Incorrect YAML syntax or configuration settings can lead to configuration errors.
    • Solution: Use online YAML validators to check your configuration files for syntax errors. Review Home Assistant documentation for correct configuration settings.
  • Add-On Installation Failures:
    • Issue: Add-ons might fail to install or work due to dependencies or compatibility issues.
    • Solution: Check the add-on documentation for any specific prerequisites or compatibility information. Consider restarting Home Assistant or the add-on after installation.
  • Integration Failures:
    • Issue: Integrations might fail to connect to devices or services.
    • Solution: Verify that the device or service is functioning properly. Check integration documentation for setup steps and troubleshooting tips.
  • Slow Performance:
    • Issue: Slow performance can occur due to excessive resource usage or misconfigurations.
    • Solution: Monitor resource usage, optimize your automations, and consider splitting complex automations into smaller ones. Review hardware recommendations for Home Assistant.
  • Network Issues:
    • Issue: Network connectivity issues can prevent Home Assistant from communicating with devices or services.
    • Solution: Check your network configuration, ensure devices are connected, and consider static IP assignments. Test network connectivity within Home Assistant.
  • Update Failures:
    • Issue: Updates can fail due to incompatible dependencies or errors.
    • Solution: Backup your configuration before updating. Check the release notes and community forums for any known issues or workarounds. Consider updating add-ons before updating Home Assistant.
  • Z-Wave/Zigbee Issues:
    • Issue: Z-Wave or Zigbee devices might have trouble connecting or responding.
    • Solution: Verify that your Z-Wave or Zigbee controller is properly connected. Check device and integration documentation for troubleshooting steps.
  • Authentication Problems:
    • Issue: Problems with user authentication or access.
    • Solution: Verify usernames and passwords, check user roles and permissions. Reset passwords if necessary. Use the „Forgot Password” feature if locked out.
  • Logs and Errors:
    • Issue: Errors and warnings in logs can help identify issues but might not always be straightforward.
    • Solution: Review Home Assistant logs for error messages. Google the error message or ask the Home Assistant community for help.
  • Custom Component Compatibility:
    • Issue: Custom components might not be compatible with the current version of Home Assistant.
    • Solution: Update custom components to their latest versions or check for compatibility notes on the component’s GitHub repository.

What is your preferred method of installing Home Assistant Docker Supervised?

Dan Mutu este fondatorul și editorul șef la GeekChronicles.ro. Contribuitor activ la secțiunile revistei Geek Chronicles și la secțiunea de Forum. Cunoștințele predominante sunt în domeniile: tehnologiei, marketing și suport tehnic.
Geek Chronicles

Pasionat de tehnologie?

Te invităm în grupul nostru de Facebook unde purtăm discuții constructive despre tehnologie și nu numai.

Articole direct pe mail săptămânal

Îți trimitem săptămânal un email cu toate articolele/materialele noi publicate fără spam

Prin abonare confirmați că ați citit termenii și condițiile și aveți peste 16 ani