Stefan AgnerandClaude Opus 5 13e73122ac Keep Dropbear alive during Supervisor and Docker shutdown (#4923)
Dropbear has no ordering relationship to haos-supervisor.service or
docker.service, so systemd schedules all three stop jobs in the same
batch and runs them concurrently. Dropbear exits within milliseconds
while the Supervisor gets up to 450s to stop containers, which means an
SSH session is dropped right when the interesting part of shutdown
starts. That makes it needlessly hard to debug slow shutdowns.

Order Dropbear before both units. Since stop order is the reverse of
start order, systemd now stops it only once the Supervisor and Docker are
gone. This is an ordering-only dependency: if Dropbear fails, is masked
or is skipped by its ConditionFileNotEmpty=, the ordering counts as
satisfied and both units start as before. It adds no boot latency
either, as docker.service already waits for the overlay partition that
Dropbear needs for /etc/dropbear.

Verified on a generic-x86-64 VM: an SSH session now survives the full
22.4s Supervisor teardown, and systemd stops Dropbear last, 3ms after
docker.service is gone.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 09:34:13 +02:00
2019-05-09 10:10:53 +02:00
2018-04-15 10:27:33 +02:00

Home Assistant Operating System

Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host Home Assistant and its Apps.

Home Assistant Operating System uses Docker as its container engine. By default it deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Apps in separate containers. Home Assistant Operating System is not based on a regular Linux distribution like Ubuntu. It is built using Buildroot and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.

Home Assistant - A project from the Open Home Foundation

Features

  • Lightweight and memory-efficient
  • Minimized I/O
  • Over The Air (OTA) updates
  • Offline updates
  • Modular using Docker container engine

Supported hardware

The list of supported hardware is defined by ADR-0015. Every new hardware addition must meet at least requirements defined in ADR-0017 and pass through an architecture design proposal.

For documentation explaining details of the individual supported boards, see Board support section of the Home Assistant Developer Docs.

Getting Started

If you just want to use Home Assistant the official getting started guide and installation instructions take you through how to download Home Assistant Operating System and get it running on your machine.

If you're interested in finding out more about Home Assistant Operating System and how it works read on...

Development

If you don't have experience with embedded systems, Buildroot or the build process for Linux distributions it is recommended to read up on these topics first (e.g. Bootlin has excellent resources).

The Home Assistant Operating System documentation can be found on the Home Assistant Developer Docs website.

Components

  • Bootloader:
    • GRUB for devices that support UEFI
    • U-Boot for devices that don't support UEFI
  • Operating System:
  • File Systems:
    • SquashFS for read-only file systems (using LZ4 compression)
    • ZRAM for /tmp, /var and swap (using LZ4 compression)
  • Container Platform:
    • Docker Engine for running Home Assistant components in containers
  • Updates:
    • RAUC for Over The Air (OTA) and USB updates
  • Security:

Development builds

The Development build GitHub Action Workflow is a manually triggered workflow which creates Home Assistant OS development builds. The development builds are available at https://os-artifacts.home-assistant.io/index.html.

Languages
Python 71.9%
Shell 18.3%
Makefile 8.3%
HTML 0.8%
Dockerfile 0.4%
Other 0.3%