HomeAssistant
Open source home automation
Home Assistant Core - Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
Home Assistant needs to set up to allow the Traefik reverse proxy (details: HTTP - Home Assistant)
For this, add to ${DOCKER_VOLUMES}/homeassistant/configuration.yaml:
References
Backup
backup.yaml creates native backup.create backups of this Container
installation’s full configuration, .storage, automations/secrets/custom
components and recorder state, plus a standalone SQLite export under
${DB_BACKUP_ROOT}/automation-homeassistant/. Provision an
administrator token in the ignored homeassistant/backup-token file (mode
0600) before running the backup.
See the backup guide for scheduling, retention and snapshot selection.
Obtain and save the administrator token
- Sign in to Home Assistant with an administrator account.
- Open your user profile (bottom of the sidebar), then the Security tab.
- Under Long-lived access tokens, select Create token and name it
Homelab native backups. - Copy the generated token immediately: it is shown only once. Save it on the Docker host, never in chat, tracked files or a shell command argument.
Run as the non-root backup user (buba on this host), without sudo. The private
parent directory must already exist and be owned by that user with mode 0700.
This hidden prompt saves mode 0600 and refuses to overwrite an existing token:
Saving the file automatically includes Home Assistant in both existing cron jobs; no cron reinstall is needed. For token rotation, provision and validate the replacement privately before revoking the old token in the same profile page. References: token creation, native backup action.
Validate activation or a rotated token with:
Once an export directory exists, missing credentials report failure instead of silently disabling the target. Only the exporter-created native duplicate is removed after publication; pre-existing UI backups remain.
Recovery
Recover homeassistant.tar, database.sqlite3 and their checksum manifest. The
native archive includes .storage accounts/credentials/device/entity state,
YAML/secrets/automations, custom components and recorder DB/WAL. It is unencrypted
locally, protected by private staging and Kopia repository encryption; this
adapter’s archive does not require a separate HA backup emergency key.
Use onboarding Upload backup with a compatible image. For manual Container
recovery, stop the destination, unpack the native archive’s
homeassistant.tar.gz, and restore its data/ contents into /config. Preserve
ownership and the matching recorder DB/WAL. If installing the separate standalone
SQLite export as home-assistant_v2.db, discard stale destination WAL/SHM instead.
Recover original host/Compose settings and keep restored automations isolated from
production devices until ready.
Post-restore check
After an actual restore, sign in with the existing account, confirm expected devices/entities and automations, inspect recorder history, and test one harmless local action.