How come I have to run these commands to start the Home Assistant?

I guess because the HA runs in a VM if the PI reboots I have to run these commands again to start the HA?

pi@raspberrypi:~ $ sudo -u homeassistant -H -s
homeassistant@raspberrypi:/home/pi $ cd /srv/homeassistant
homeassistant@raspberrypi:/srv/homeassistant $ source bin/activate
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ hass

Would I just make a linux script and do like a cron job so this is always running? I woke up this morning and the HA wasn’t running from last night, so I had to manually run it via SSH.

Is there a better way to handle this?

Just create a service to run it, then do “systemctl enable” which means “start this service on boot”.

If they do exist, skip to the end where you just ‘enable’ the service

sudo systemctl enable home-assistant@YOUR_USER

1 Like

Thanks, Turns out I had the core HA version installed. I installed the HA OS version and now everything works automated.