Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Home Assistant Core
Please run the following commands line-by-line, not as a script:
sudo apt -y update && sudo apt -y upgrade
sudo apt install -y python3 python3-dev python3-venv python3-pip libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0 tzdata
sudo useradd -rm homeassistant -G dialout,gpio,i2c
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
python3 -m pip install wheel
sudo pip3 install homeassistant
To test everything is working:
hass
To run on boot:
sudo nano /usr/lib/systemd/hass.service
Add the following text (without the snips):
--SNIP--
[Unit]
Description=hass
[Service]
ExecStart=/srv/homeassistant/bin/hass
Restart=on-failure
User=homeassistant
Group=homeassistant
[Install]
WantedBy=multi-user.target
--SNIP--
To activate:
sudo systemctl enable /usr/lib/systemd/hass.service
sudo systemctl start hass.service
@tarneaux
Copy link

tarneaux commented Nov 7, 2021

The second line should have libturbojpeg0 instead of libturbojpeg

@mrpjevans
Copy link
Author

mrpjevans commented Nov 8, 2021

Thank you. I have updated it.

@jimcuk
Copy link

jimcuk commented Nov 22, 2021

Is there a line missing after wheel install
$ pip3 install homeassistant ?

@mrpjevans
Copy link
Author

mrpjevans commented Nov 30, 2021

Thanks. Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment