Hassio in docker how do you auto restart container( after docker has been stopped )

Today I installed Hassio in Docker, on DietPi on an Odroid HC1. RootFS transferred to SSD :+1:

Everything seems to be working with perfect however if Docker is stopped and then started The Hassio container is not restarted , I cant find an exact answer but I’m sure this is the way to restart a container automatically but I wouldn’t mind having the advice of someone more experienced in Docker .

If this is correct do i have to start only the supervisor container and then this restarts the Hassio container itself ? or do I have to restart both using this method and docker will automatically start the supervisor first ?

The install script should have created a systemd startup script that starts the containers automatically. If it didn’t create them yourself.


Interesting, I do have those files in /etc/systemd/system/ as you say, maybe I didnt wait long enough for hassio to come back up, I did wait 5 minutes I will have to try it again and see if it comes up. Out of interest if the docker service is stopped manually does it try to gracefully stop the containers or does it sigkill them? When the Odroid is restarted hassio comes up in under 2 minutes, maybe it was the way docker was stopped and started.
I shall do some more investigation.

Fresh install using the above mentioned script. I have the files also on etc/systemd but they don’t work.
I have to go and start the containers manually in portainer.


am I missing something?

Thanks in advance for the support

I apologise for the late reply ,

I gave up on docker in dietpi,

instead I use HassOs on the odroid now and transfer the data partition to the ssd .

this works perfectly

I’m sorry this is not much help for your current issue .