Hassio, docker and question regarding proper shutdown of system

I just completed a build of a new Home Assistant/Hassio box running on Ubuntu 18.04.3 LTS. I am new to docker and running HA on anything but a Pi.

My UPS is connected to the server running HA via USB with Nut installed as an addon. In the past, once the UPS was nearly depleted I had an automation to shut down Home Assistant/Hassio to prevent a crash and corruption.

I occurred to me that now I have linux, docker and HA to worry about shutting down correctly. So, what is the best way to shutdown the system now? Is the

service hassio.host_shutdown

still the best way?

So… nobody ever shuts their system down?

Yep HA just run forever :wink:

Are you using this addon:

Because it support one option for that:

  "shutdown_hassio": "true"

I am using that addon. My concern is firstly properly shutting down HA, this can be done from the UI, but I also need to shutdown linux. It appears from the UI that the host can be shut down, I am assuming that is a proper clean shutdown, but you know what they say about assuming.

Secondly, yes I want the UPS and Nut to shutdown the complete system, again it needs to be a clean shutdown.

Hum yes ok I see. For me (but maybe I’m wrong) this option perform a clean shutdown of HA and then hassio.
Do you know a way to check that?

For your linux host I see one way. You can configure NUT on your host to be a client of your NUT running on hassio and enable the network access through:

I’m using this way to shutdown my windows machine connected on the same UPS.

I am using RPC shutdown from HA to shut down a windows system that does not have direct USB access to the UPS.

I could go the client route, I was hoping that there was one clean command that would shutdown hassio/home assistant and the host machine. Because if there was, it would be aware of the states of the various programs and would not corrupt anything.

I should add that I am concerned both about proper shutdown via UPS and proper shutdown in general.