Lesson 2 of 9 · 27m
Installing Home Assistant Like Infrastructure
Choose an installation method, storage layout, backup strategy, and update posture that treat Home Assistant as production infrastructure rather than a hobby applet.
Home Assistant often starts as an experiment on a spare Raspberry Pi and quietly becomes responsible for lights, heat, alarms, and cameras. That is the moment to admit it is production infrastructure. Production does not mean enterprise complexity; it means predictable installation, backups you have restored, upgrades you can roll back, and no mystery state on a worn-out SD card.
Pick the installation model intentionally
Home Assistant OS is the best default for a dedicated machine because it bundles the operating system, supervisor, add-ons, and backup workflow. Container installations are clean for experienced operators but do not include the add-on ecosystem. Supervised exists, yet it constrains the host in ways that surprise people later.
Home Assistant OS recommended appliance model, easiest add-ons and recovery
Container good for existing Docker hosts, more manual integration work
Core Python environment only, maximum control, maximum maintenance
Supervised powerful but picky; avoid unless you know why you need itA small x86 machine or quality ARM board with reliable storage is usually a better long-term choice than an SD-card-only Pi. If you do use a Pi, use a USB SSD or high-endurance card and monitor I/O errors.
Keep configuration inspectable
Even if you edit mostly through the UI, know where the truth lives. In a typical container layout:
/homeassistant/
configuration.yaml
automations.yaml
scripts.yaml
scenes.yaml
secrets.yaml
.storage/
backups/.storage holds much of the UI-managed state. Do not edit it casually while Home Assistant is running. Treat it as database state: important, backed up, and not hand-maintained.
A minimal configuration.yaml might look like:
default_config:
homeassistant:
name: House
unit_system: imperial
time_zone: America/New_York
internal_url: http://homeassistant.lan:8123
external_url: https://ha.example.org
recorder:
purge_keep_days: 14
auto_purge: true
logger:
default: warningsecrets.yaml exists to keep credentials out of the main configuration. It is not encryption; file permissions and backups still matter.
Backups are not real until restored
Home Assistant OS exposes backups in the UI and through the CLI:
ha backups new --name before-upgrade
ha backups listCopy backups off the host. A backup on the same disk that dies with the host is an archive, not a recovery plan. For a container install, snapshot the configuration directory while the database is quiescent or use the application's own backup mechanism. Test restore on spare hardware or a virtual machine at least once.
Upgrade like a careful operator
Read breaking changes before upgrading. Automations, entity names, YAML syntax, integrations, and database migrations can all change. A sensible rhythm is:
1. create fresh backup and copy it off-box
2. read release notes for breaking changes
3. upgrade the operating system/add-ons/Home Assistant in a controlled order
4. verify critical entities and automations
5. keep the previous backup until the next stable cycleDo not auto-upgrade a system that controls physical infrastructure unless you enjoy surprise breakage. Automatic add-on updates are convenient but still deserve scrutiny for network-facing services.
Field notes
- SD cards fail silently before they fail completely; random database corruption and missing history are common symptoms.
- Never store the only copy of recovery keys, camera credentials, or backup encryption keys inside the same Home Assistant backup.
- Entity renaming is easy early and painful after fifty automations depend on the old names.
- Keep a small written runbook: host address, backup location, restore steps, and which physical systems depend on the service.
Was this lesson helpful?