Installing Home Assistant Core on Ubuntu Server 22.04

Hello, since the current guide to installing Home Assistant Core on Linux is outdated, I decided to write my own. This guide is using Home Assistant 2024.3.1 and Python 3.12.

Before you start, make sure your system packages are up to date

sudo apt update && sudo apt upgrade -y

Download the repository to install Python dependencies

sudo add-apt-repository ppa:deadsnakes/ppa

Then, you can install the basic Python 3.12 packages

sudo apt install python3.12 python3.12-dev python3.12-venv

Install required dependencies for Home Assistant Core

sudo apt install -y 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

Not required, but it’s a good practice to reboot after major changes

sudo reboot

With dependencies in place, create dedicated user account for Home Assistant

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

Add the dialout group for the account you’ve just created

sudo usermod -aG dialout homeassistant

Create a new directory for storing Home Assistant data

sudo mkdir /srv/homeassistant

Assign the ownership of this directory to Home Assistant account

sudo chown homeassistant:homeassistant /srv/homeassistant

Switch to your Home Assistant account

sudo -u homeassistant -H -s

Navigate to the main directory

cd /srv/homeassistant

Initialize your Python virtual environment

python3.12 -m venv .

Add source to your environment

source bin/activate

Install the wheel package

python3.12 -m pip install wheel

Install the Home Assistant

pip3.12 install homeassistant

Again, not required, but you can reboot

sudo reboot

Now start your Home Assistant instance :slight_smile:

hass

Which guide would that be?

This guide assumes that you already have an operating system setup and have installed Python 3.11

The latest version is 3.12 and HA is giving a warning when using 3.11.

There are links at the bottom of the documentation page you linked to. Please use them to either update the document or suggest an update.

1 Like

Tried this and it worked fine.
Any way to get supervised instead of core using this method?