Add-on repository for Home Assistant OS with a Kopia add-on.
repository.yaml: add-on repository metadata.kopia/: Kopia add-on.
- Runs Kopia inside Home Assistant OS.
- Exposes the web UI on direct port
51515. - Uses
/sharestorage as the repository destination. - Validates that the configured media path exists.
- If the path does not exist, it logs the media found under
/share.
amd64(x86_64, suitable for Intel N100).aarch64(64-bit ARM).
No 32-bit architectures are included.
backup_media: media path, must be under/share.repository_subdir: repository folder inside the selected media.snapshot_paths: paths to back up.server_username: username used to access the Kopia web UI.password: Kopia repository password.
Home Assistant add-ons do not provide a dynamic selector for paths discovered at runtime. Because of that:
backup_mediais a text field.- if the path is invalid, the script logs the available media under
/share.
- Publish this repository on GitHub.
- In Home Assistant, go to Settings -> Add-ons -> Add-on Store -> Repositories.
- Add the repository URL.
- Install the
Kopiaadd-on. - Configure
backup_media(for example/share,/share/nas, or/share/usb). - Set
repository_subdir,snapshot_paths,server_username, andpassword. - Start the add-on.
- Open the UI using
http://HAOS_IP:51515. - Check the logs if something fails.
Kopia does not expose a usable JSON payload in the webhook by default, but notification templates allow custom headers and a custom body. The add-on seeds snapshot-report.txt and test-notification.txt templates into the repository the first time it starts, using application/x-www-form-urlencoded so Home Assistant receives structured data.
Recommended flow:
- In Kopia, create a notification profile of type
webhook. - Set
Minimum severitytoerrorto send only real failures. - Use the Home Assistant webhook as the endpoint, for example
http://YOUR_HA:8123/api/webhook/kopia-ha-backup. - The add-on initially creates the
snapshot-report.txttemplate in the repository with content like this:
Subject: {{ .EventArgs.OverallStatus }}
Content-Type: application/x-www-form-urlencoded
title={{ urlquery "Kopia backup" }}&message={{ urlquery .EventArgs.OverallStatus }}&severity={{ urlquery .EventArgs.OverallStatusCode }}- You can later adjust that template from the Kopia UI if you want to change the wording.
- In Home Assistant, create a webhook-triggered automation and read
trigger.data.title,trigger.data.message, andtrigger.data.severity.
If you use Kopia's "Test notification" button, the seeded test-notification.txt template is also form-encoded, so Home Assistant receives the same fields in trigger.data.
Example automation:
alias: Kopia backup error
description: Show Kopia failures as a persistent notification
triggers:
- trigger: webhook
webhook_id: kopia-ha-backup
allowed_methods:
- POST
local_only: true
conditions: []
actions:
- action: persistent_notification.create
data:
notification_id: kopia_backup
title: "{{ trigger.data.title }}"
message: "{{ trigger.data.message }}"
mode: queued
max: 10With this, Kopia still generates the notification, but Home Assistant receives it in a format it can display and process without an external middleware.
backup_media: /share/nas
repository_subdir: kopia-repository
snapshot_paths:
- /backup
server_username: kopia
password: change-this-password- Add ingress access
Thanks to the Kopia team for building and maintaining this excellent backup project: