Linux - Home Assistant - Install Home Assistant Core
Linux - Home Assistant - Install Home Assistant Core
2024.9.1
Home ▸ Installation ▸
Linux
Install Home Assistant Operating System
DOWNLOAD THE APPROPRIATE IMAGE
VirtualBox (.vdi)
KVM (.qcow2)
After downloading, decompress the image. If the image comes in a ZIP file, for
example, unzip it.
Follow this guide if you already are running a supported virtual machine
hypervisor. If you are not familiar with virtual machines, install Home Assistant OS
directly on a Home Assistant Yellow, a Raspberry Pi, or an ODROID.
2 GB RAM
32 GB Storage
2vCPU
All these can be extended if your usage calls for more resources.
https://www.home-assistant.io/installation/linux#install-home-assistant-core 1/12
9/13/24, 4:04 PM Linux - Home Assistant
HYPERVISOR
2024.9.1
SPECIFIC CONFIGURATION
VirtualBox Unraid KVM (virt-manager) KVM (virt-install)
More details can be found about the command can be found here .
With the Home Assistant Operating System installed and accessible, you can
continue with onboarding.
ONBOARDING
Note
This installation method does not have access to add-ons. If you want to
use add-ons, you need to use another installation method. The
recommended method is Home Assistant Operating System. Checkout the
overview table of installation types to see the differences.
Important
Prerequisites This guide assumes that you already have an operating
system setup and a container runtime installed (like Docker).
https://www.home-assistant.io/installation/linux#install-home-assistant-core 3/12
9/13/24, 4:04 PM Linux - Home Assistant
If you are using Docker then you need to be on at least version 19.03.9,
ideally an even higher version, and libseccomp 2.4.2 or newer.
2024.9.1
PLATFORM INSTALLATION
Installation with Docker is straightforward. Adjust the following command so that:
Install Update
docker run -d \
--name homeassistant \
--privileged \
--restart=unless-stopped \
-e TZ=MY_TIME_ZONE \
-v /PATH_TO_YOUR_CONFIG:/config \
-v /run/dbus:/run/dbus:ro \
--network=host \
ghcr.io/home-assistant/home-assistant:stable
ONBOARDING
1. In your Home Assistant UI, go to the Settings > System and click the
Restart button.
https://www.home-assistant.io/installation/linux#install-home-assistant-core 4/12
9/13/24, 4:04 PM Linux - Home Assistant
DOCKER COMPOSE
Tip
docker composeshould already be installed on your system. If not, you
can manually install it.
Start it by running:
docker compose up -d
ONBOARDING
https://www.home-assistant.io/installation/linux#install-home-assistant-core 5/12
ONBOARDING
9/13/24, 4:04 PM Linux - Home Assistant
2024.9.1
EXPOSING DEVICES
In order to use Zigbee or other integrations that require access to devices, you
need to map the appropriate device into the container. Ensure the user that is
running the container has the correct privileges to access the /dev/tty* file,
then add the device mapping to your container instructions:
OPTIMIZATIONS
The Home Assistant Container is using an alternative memory allocation
library jemalloc for better memory management and Python runtime
speedup.
The error message <jemalloc>: Unsupported system page size is one known
indicator.
PREREQUISITES
This guide assumes that you already have an operating system setup and have
installed Python 3.12 (including the package python3-dev ) or newer.
INSTALL DEPENDENCIES
Before you start, make sure your system is fully updated, all packages in this
guide are installed with apt , if your OS does not have that, look for
alternatives.
sudo apt-get update
sudo apt-get upgrade -y
CREATE AN ACCOUNT
Add an account for Home Assistant Core called homeassistant . Since this
account is only for running Home Assistant Core the extra arguments of -rm
is added to create a system account and create a home directory.
sudo useradd -rm homeassistant
Once you have activated the virtual environment (notice the prompt change
to (homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ ) you will
need to run the following command to install a required Python package.
python3 -m pip install wheel
Once you have installed the required Python package, it is now time to install
Home Assistant Core!
pip3 install homeassistant==2024.9.1
Start Home Assistant Core for the first time. This will complete the installation
for you, automatically creating the .homeassistant configuration directory in
the /home/homeassistant directory, and installing any basic dependencies.
hass
You can now reach your installation via the web interface on
http://homeassistant.local:8123 .
Note
When you run the h command for the first time it will download
https://www.home-assistant.io/installation/linux#install-home-assistant-core 8/12
9/13/24, 4:04 PM Linux - Home Assistant
When you run the hass command for the first time, it will download,
install and cache the necessary libraries/dependencies. This procedure
2024.9.1
may take anywhere between 5 to 10 minutes. During that time, you may
get a site cannot be reached error when accessing the web interface.
This will only happen the first time. Subsequent restarts will be much
faster.
ONBOARDING
Troubleshooting
NO ACCESS TO THE FRONTEND
https://www.home-assistant.io/installation/linux#install-home-assistant-core 9/12
9/13/24, 4:04 PM Linux - Home Assistant
Symptom: You cannot open the Home Assistant page in your browser. If you
2024.9.1
are not using Home Assistant Operating System, the cause may be an access
restriction.
In newer Linux distributions, the access to a host is very limited. This means
that you can’t access the Home Assistant frontend that is running on a host
outside of the host machine.
To fix this, you will need to open your machine’s firewall for TCP traffic to port
8123. The method for doing this will vary depending on your operating system
and the firewall you have installed. Below are some suggestions to try. Google
is your friend here.
Home Assistant is a project from the Open Home Foundation, sponsored by Nabu Casa.
https://www.home-assistant.io/installation/linux#install-home-assistant-core 10/12
9/13/24, 4:04 PM Linux - Home Assistant
SYSTEM STATUS
Integration Alerts
Security Alerts
System Status
COMPANION APPS
iOS and Apple devices
Android and Wear OS
...and more!
GOVERNANCE
Privacy Notices
Contributor License Agreement
Terms of Service
Code of Conduct
Credits
License
FOLLOW US
Sign up for our newsletter
Contact us here for media and partnership inquiries. (No technical support!)
https://www.home-assistant.io/installation/linux#install-home-assistant-core 11/12
9/13/24, 4:04 PM Linux - Home Assistant
2024.9.1
https://www.home-assistant.io/installation/linux#install-home-assistant-core 12/12