How to auto restart HASS service on crash?

Do you have any other suggestion?

I am thinking in playing with systemd's option to Restart=on_failure with a RestartSec=60 and TimeoutStartSec=240. I am not sure if it works.
I running HASS on a Raspberry so the file that needs to be modified is /etc/systemd/system/home-assistant.service.
Is this a good option?

Thanks.

I am also interested in this. Mine crashes too often with no evidence of why (log just stops).

I’m using Ubuntu 14.04 and an init.d service (hass-daemon) as described here: https://home-assistant.io/docs/autostart/init.d/

modifying the home-assistant.service file to auto-restart HA seems to work. Where can I find the logs to see if a restart was made or not ?

I have also tried to use Monit https://wiki.ubuntuusers.de/Monit/, but it dont know how to configure it for HA. Has anybody tried it ?

Alex

Did you get this to work? Hass also crashes too often on my raspi 3

I use monit to monitor the state of my services, below example for hass
Also using a pi3 here


@elRadix thank you. I was not aware of the tool. I presume you’re using a number of scripts. It would be useful for other new users to post the step by step implementation.

this is a very good tutorial