Installing Home Assistant Core on Fedora

Fedora is an operating system based on the Linux kernel, developed by the community-supported Fedora Project. There are releases for x86 and x86_64 including ARM and other architectures.

Install the development package of Python.

sudo dnf -y install python3-devel redhat-rpm-config

To isolate the Home Assistant installation a venv is handy. First create a new directory to store the installation and adjust the permissions.

sudo mkdir -p /opt/homeassistant
sudo useradd -rm homeassistant -G dialout
sudo chown -R homeassistant:homeassistant /opt/homeassistant

Now switch to the new directory, setup the venv, and activate it.

sudo -u homeassistant -H -s
cd /opt/homeassistant
python -m venv .
source bin/activate

Install Home Assistant itself.

pip3 install homeassistant colorlog

Check the autostart section in the documentation for further details.

In Fedora 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.

sudo firewall-cmd --permanent --add-port=8123/tcp
sudo firewall-cmd --reload
1 Like

Thanks for this guide.

I’m trying to install Home Assistant on Fedora 23. I know this is fairly old but this is a music server distribution that hasn’t been updated for a few years.

All the steps are ok above (with the only exception that I used

python3 -m venv .

When trying to install Home Assistant via

pip3 install homeassistant colorlog

I get an error

RuntimeError: yarl 1.4+ requires Python 3.5+

python --version

shows 3.4.3

but I can’t seem to find clear upgrade instructions to get to at least python 3.5+

Any pointers how to upgrade Python? Understand this has to be done within the venv

Just for fun, I tried this on my Fedora 35 computer. While it does start (systemctl start home-assistant@homeassistant) it has plenty of errors.

# systemctl status home-assistant@homeassistant
â—Ź [email protected] - Home Assistant
     Loaded: loaded (/usr/lib/systemd/system/[email protected]; disabled; vendor preset: disabled)
     Active: active (running) since Tue 2022-09-20 14:30:40 EDT; 6s ago
   Main PID: 132547 (hass)
      Tasks: 10 (limit: 38351)
     Memory: 126.1M
        CPU: 3.089s
     CGroup: /system.slice/system-home\x2dassistant.slice/[email protected]
             └─ 132547 /opt/homeassistant/bin/python /opt/homeassistant/bin/hass -c /home/homeassistant/.homeassistant

Sep 20 14:30:43 garage.linux.net hass[132547]:     return await gather(
Sep 20 14:30:43 garage.linux.net hass[132547]:   File "/opt/homeassistant/lib64/python3.10/site-packages/homeassistant/util/async_.py", line 197, in sem_task
Sep 20 14:30:43 garage.linux.net hass[132547]:     return await task
Sep 20 14:30:43 garage.linux.net hass[132547]:   File "/opt/homeassistant/lib64/python3.10/site-packages/homeassistant/data_entry_flow.py", line 225, in async_init
Sep 20 14:30:43 garage.linux.net hass[132547]:     flow, result = await task
Sep 20 14:30:43 garage.linux.net hass[132547]:   File "/opt/homeassistant/lib64/python3.10/site-packages/homeassistant/data_entry_flow.py", line 243, in _async_init
Sep 20 14:30:43 garage.linux.net hass[132547]:     flow = await self.async_create_flow(handler, context=context, data=data)
Sep 20 14:30:43 garage.linux.net hass[132547]:   File "/opt/homeassistant/lib64/python3.10/site-packages/homeassistant/config_entries.py", line 801, in async_create_flow
Sep 20 14:30:43 garage.linux.net hass[132547]:     raise data_entry_flow.UnknownHandler
Sep 20 14:30:43 garage.linux.net hass[132547]: homeassistant.data_entry_flow.UnknownHandler

…and this is only a few of the hundreds of errors in the system log. Oh well, fun stuff regardless.

There is now Fedora specific instructions

https://fedoraproject.org/wiki/Home_Assistant

1 Like

but i cant open ports because the home assistant session says for a password but i do not know the password

Forgetting your password can be fixed.