A backup on the Home Assistant disk shares the disk’s fate. Saving a Home Assistant archive to a Samba share gives you somewhere else to retrieve it, without adding a cloud account. The bargain is some housekeeping: a reachable NAS, working credentials, enough space and a recovery key you can find when Home Assistant is unavailable. This guide uses Home Assistant OS and a NAS or Linux Samba server on a trusted LAN, with an encrypted off-device copy as one part of the backup strategy.
What a Local NAS Copy Does—and Does Not—Cover
A separate NAS preserves the copy if the Home Assistant disk fails, provided the NAS and backup remain accessible. It usually shares the building and power risks. A tested UPS shutdown plan can help manage an outage, but fire, theft or an electrical event can still affect both machines. Home Assistant’s 3-2-1 guidance[1] calls for three copies, on two different media, with one off-site. The NAS is the off-device layer in that plan; add an off-site destination or replicate a protected copy elsewhere. Keep an offline or otherwise separately protected copy in mind too, since a writable share can be deleted by a client with its credentials.
Home Assistant's built-in automatic backups were overhauled in 2025.1. The wizard supports scheduling, cleanup, encryption and backup locations. The Backup integration works across current installation types, but this walkthrough's Settings → System → Storage → Add network storage path is documented for Home Assistant OS. Home Assistant OS 10.2 or later is required for that storage feature. If you run Home Assistant Container, follow its current storage and backup documentation rather than assuming it can mount a share through the OS UI.
A backup can include credentials, device keys and household history. Automatic backups default to encryption, with a per-location switch for destinations such as this NAS; Home Assistant Cloud copies stay encrypted. Keep the NAS copy encrypted and download the backup emergency kit[2]. Store it outside both machines. If you change the key later, retain the older kit for archives made with that key: a new key does not unlock old backups. If neither your recovery notes nor a working Home Assistant instance has the matching key, the encrypted archive cannot be restored. NAS volume encryption is a separate layer and cannot supply that missing backup key.
Prepare the Share and the Recovery Notes
Create a dedicated NAS folder such as ha-backups and an account with write access only to that share. Give the server a stable LAN address or reservation, verify access from the Home Assistant host and keep SMB within the trusted network. Save the server address, share name and account credentials in recovery notes. Hiding a share from browse lists does not restrict someone who knows its path, so enforce the boundary with permissions and firewall rules.
A Linux Samba server might declare a share along these lines after you create the directory and give habackup filesystem access:
[ha-backups]
path = /srv/ha-backups
read only = no
valid users = habackup
browseable = no
For a standalone Linux Samba server, first ensure habackup exists as a local Unix account with access to the directory. Then add its Samba password with sudo smbpasswd -a habackup and check the configuration with testparm. The Samba manual[3] is clear about that check: it tests configuration consistency, not whether a client can actually use the share. Reload or restart the server as your distribution documents, then test a login and file creation from another LAN computer. Verify that the account cannot write unrelated shares. A commercial NAS has its own user and share controls; use those instead of pasting this Linux stanza into a vendor settings screen.
Measure a manual backup before choosing destination capacity and retention. Leave space for growth and any NAS snapshots, then decide what a full recovery needs to include. Home Assistant recommends excluding media and share folders when they are unnecessary, since they can make archives large and slow to restore. Check snapshot retention separately if you use it to protect against accidental deletion, and base capacity on your measured archive size.
Add the NAS as Home Assistant Backup Storage
In Home Assistant OS, open Settings → System → Storage → Add network storage. Give it a recognizable name, and set Usage to Backup. Choose Samba/Windows (CIFS), enter the NAS address, share name and dedicated user credentials, then select Connect. The Home Assistant OS network-storage guide[4] documents these fields. Use a server offering SMB 2.1 or later; the current Home Assistant OS guide does not support SMB1 for this mount. A new Backup-type target becomes available to manual and automatic backups. The first such network target may also become the default local backup location, so check the actual destination rather than assuming a local copy remains enabled.
If the connection fails, verify the share name, user permission and LAN reachability from the Home Assistant network. A network storage entry with Media or Share usage is not the same as a Backup target. You need the Backup usage type for it to appear as a backup location. Keep the NAS online during the scheduled window, or adjust the schedule to a time when it is available.
Now open Settings → System → Backups. Under automatic backups, configure the schedule and turn on the NAS under Locations. Enable any additional location you actually want to keep; inspect the list after saving. Set a retention count that fits your measured archive size and how far back you need to recover. Daily backups are a sensible starting point for a regularly changing home; a quiet installation may need less frequent runs. Retention applies to backups made with automatic settings, including an on-demand use of those settings. A separate manual backup needs its own cleanup plan. Watch disk use on the NAS as well as in Home Assistant.
The backup UI lets you choose whether a location's backups are encrypted. Confirm the NAS location's setting and save the emergency kit outside both systems. If your requirements need a more advanced schedule, Home Assistant offers the backup.create_automatic action for an automation that uses the configured backup settings. You do not need custom YAML just to make a daily backup.
Prove a File Arrives and Can Be Read
Open Settings → System → Backups → Backup now, choose Manual backup, select the NAS location and create the backup. Check its recorded location, then inspect the share from another computer. The filename, timestamp and size establish that a file arrived; a restore drill answers whether it can recover the chosen data. After the next scheduled run, check the last successful automatic-backup time and its location as well, so the manual test does not stand in for the schedule.
When you download a backup through Home Assistant’s backup page, the system decrypts it on the fly if it has the matching key. That downloaded file can therefore expose the credentials and history that were encrypted on the NAS. The emergency-kit instructions[2] explain the exception: after a key change, an older backup still needs its original key. Copying the archive directly from the share preserves its stored encryption state. Keep both kinds of file private, and clear decrypted copies from shared laptops or portable drives after the drill.
Add a short recurring check to the maintenance routine: latest scheduled success, free NAS space and an occasional download or inspection through the UI. Enable useful NAS capacity and disk-fault alerts as well. For automatic Home Assistant alerts, inspect the entities and event hooks available in your version and choose an alert interval that fits the configured backup schedule. Existing monitoring tools or the backup page can cover the check while you settle that setup.
Practice the Restore Before a Failure
Prepare a spare device or disposable Home Assistant OS installation with enough capacity for the restored system. The official restore procedure[5] says to compare the source system’s Disk used value in Settings → System → Repairs → System information with the target’s free capacity; the compressed archive size is not the installed size. Keep the test system on an isolated network with access to live devices, brokers and cloud integrations blocked. A second IP alone does not prevent the restored automations from contacting the same equipment. Do not move a production radio just to perform this drill.
Copy a recent NAS archive to the computer from which you will open the test system’s welcome screen. Select Upload backup → Select backup file there; the file picker can also use a network drive mounted on that computer. Have the matching emergency kit and the login credentials that existed when the backup was made before starting.
Select the parts to restore, enter the matching encryption key when required and wait without refreshing the page. The chosen parts overwrite the target. Sign in afterward using the backed-up credentials and inspect the configuration, integrations and automations while the test instance remains isolated. Radios and device-control paths need a separately planned maintenance test; a configuration restored without its radio has not proved radio recovery. Different Zigbee hardware can require its own migration, and old network-storage connections may need reconnecting. Record the required files, keys and steps along with the time your actual drill took.
Without a spare system, test downloading an archive, locating its matching key and following the onboarding procedure as far as you safely can. Record that as preparation rather than a successful restore. Keep the full drill on the maintenance list; an archive’s presence and a key in a password manager cannot demonstrate that every integration will return.
Compare the Destinations Honestly
| Destination | What it protects against | What remains to plan |
|---|---|---|
| Local Home Assistant disk | A bad configuration or update, if the disk survives | Hardware loss and theft |
| Samba NAS in the same home | Loss of the Home Assistant device | Shared physical risks, NAS failure and access control |
| Supported off-site location | A local-site disaster, subject to provider and account access | Costs, size limits, credentials and privacy requirements |
Home Assistant Cloud includes backup storage for subscribers at no additional backup fee. The current backup documentation[5] specifies one latest backup, up to 5 GB, always encrypted. That is a useful off-site complement if its capacity and single-copy history fit your needs. An existing NAS avoids a new storage subscription but still needs disks, electricity and administration. Keep a small maintenance log—scheduled-run checks, capacity checks, updates and restore drills—and total the time each month when comparing it with a paid service. Use that record to compare the time your setup takes with the convenience of a managed destination.
Keep the recovery notes somewhere you can reach without Home Assistant or the NAS: share details, matching keys, the selected destinations and the outcome of the last drill. Then check the next scheduled copy, not just the one you created while reading this guide. That routine gives the off-device layer a job you can verify and makes the missing off-site or recovery test visible.