In this article we shall perform the installation of Home Assistant Core on Ubuntu 22.04 Linux system. Home Assistant is an open-source home automation software solution used for all manner of home automations providing a powerful Internet of things ecosystem that doesn’t depend on integration platforms. By setting up Home Assistant you will enjoy the central control of all your smart home devices, with the focus on local control and privacy.

This is not the recommended way to install Home Assistant. There are other easier ways that gets you up in seconds such as Docker container method.

If you prefer the manual installation of Home Assistant core then this article is made for you. Start by performing an upgrade of your Linux system.

sudo apt update && sudo apt upgrade -y

After the upgrade we can reboot the system if this is needed.

[ -e /var/run/reboot-required ] && sudo reboot

Install Python 3.11 which is needed to run the latest release of Home Assistant Core. We are using deadsnakes/ppa for this.

sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.11 python3.11-dev python3.11-venv

Install other dependency packages required to install and use Home Assistant on Ubuntu Linux system.

sudo apt install -y tmux \
bluez libffi-dev libtiff5 libssl-dev \
libjpeg-dev zlib1g-dev \
autoconf build-essential \
libopenjp2-7 libturbojpeg0-dev \
tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev

Confirm Python 3.11 is installed and working.

$ python3.11 --version
Python 3.11.7

Create a dedicated user account for running Home Assistant.

sudo useradd -rm homeassistant
sudo chsh -s /bin/bash homeassistant

Add the following groups if they exist in the OS.

sudo usermod -aG dialout,gpio,i2c homeassistant

Create directory for storing Home Assistant data.

sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant

Switch to the Home Assistant user created.

sudo -u homeassistant -H -s

Navigate to /srv/homeassistant directory.

cd /srv/homeassistant

Initialize and activate a virtual environment.

python3.11 -m venv .
source bin/activate

You should see shell appearance like below once in a virtual environment.

(homeassistant) homeassistant@jammy:/srv/homeassistant$

Install wheel Python module.

(homeassistant) homeassistant@jammy:/srv/homeassistant$ python3.11 -m pip install wheel
Collecting wheel
  Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl.metadata
  Downloading wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Downloading wheel-0.42.0-py3-none-any.whl (65 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 2.8 MB/s eta 0:00:00
Installing collected packages: wheel
Successfully installed wheel-0.42.0

[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip

Next install homeassistant package using pip3

pip3.11 install homeassistant

Launch tmux session to run the next command in it.

tmux

To start Home Assistant Core for the first time you will run the hass command. This will automatically create the .homeassistant configuration directory in the /home/homeassistant directory.

hass

It will also install all required basic dependencies. Once the installation is complete you can access Home Assistant web interface on http://ServerIP:8123.

Home Assistant Core 01

Create the first user to start using Home Assistant for all your home automations.

Home Assistant Core 02

LEAVE A REPLY

Please enter your comment!
Please enter your name here