Home Assistant is an open-source platform designed for home automation, allowing integration with a wide range of smart home devices and services. This tutorial guides you through installing Home Assistant on the latest Ubuntu Server version.
Prerequisites
Before beginning, ensure you have the following:
- An Ubuntu Server with internet access
- SSH access to the server
- Familiarity with terminal commands and the command line interface
Step 1: Update Ubuntu Server
To ensure the latest software and security updates, connect to your server via SSH and run:
sudo apt update && sudo apt upgrade -y
This updates the package list and upgrades any outdated packages.
Step 2: Install Required Dependencies
Install necessary dependencies for Home Assistant using:
sudo apt install python3 python3-dev python3-venv python3-pip libssl-dev libffi-dev libudev-dev -y
This installs Python 3, a virtual environment tool, and other required libraries.
Step 3: Create a Python Virtual Environment
Create a virtual environment to keep Home Assistant isolated from the system's Python environment:
python3 -m venv homeassistant
This sets up a virtual environment named 'homeassistant.'
Step 4: Activate the Virtual Environment
Activate the virtual environment with:
source homeassistant/bin/activate
The command prompt will reflect the activated virtual environment.
Step 5: Install Home Assistant
With the virtual environment active, install Home Assistant:
pip3 install homeassistant
This command installs Home Assistant alongside its dependencies.
Step 6: Start Home Assistant
Launch Home Assistant with:
hass
Initial startup may take several minutes as configuration files are generated. Access Home Assistant via your browser once it's running.
Step 7: Access Home Assistant
Enter your server's IP address followed by ":8123" in your browser to access Home Assistant. For example, http://192.168.1.100:8123.
Congratulations! Home Assistant is now installed and operational on your Ubuntu Server, ready for smart home integration.







