Skip to content

Backup & Security in Home Assistant

Backup Security 3-2-1

Your smart home is the result of many hours of work. Automations, integrations, dashboards - everything can be gone in an instant if something goes wrong. Backup is not optional - it’s necessary.


The golden standard for backup:

3-2-1 Backup Strategy


Home Assistant 2025.1 introduced a completely new backup system:

FeatureDescription
Automatic backupsScheduled backups without add-ons
Multiple locationsCloud + NAS + local simultaneously
EncryptionDefault for cloud, optional for local
Retention policiesAutomatic deletion of old backups
Easy setupWizard for quick configuration
  1. Go to Settings → System → Backups

  2. Click Configure automatic backups

  3. Choose schedule:

    • Daily, weekly, or after updates
    • Time (e.g., 4:00 AM)
  4. Choose retention:

    • Number of backups to keep (e.g., 3)
  5. Choose locations:

    • Local
    • Google Drive
    • OneDrive
    • Home Assistant Cloud
    • NAS (SMB/NFS)
  6. Choose encryption:

    • SAVE YOUR ENCRYPTION KEY! (Password manager)
  7. Click Save


  1. Go to Settings → Devices & Services

  2. Click Add Integration → search “Google Drive”

  3. Follow Google OAuth flow:

    • Log in to your Google account
    • Grant access to Google Drive
  4. Go to Settings → System → Backups → Locations

  5. Add Google Drive as backup location

  6. Backups are automatically stored in “Home Assistant” folder

Free storage: 15 GB (shared with Gmail and Photos)

Same process as Google Drive - use the OneDrive integration.

If you subscribe to Home Assistant Cloud:

  1. Go to Settings → Home Assistant Cloud

  2. Cloud backup is automatically available

  3. Backups are always encrypted (cannot be disabled)

  4. Add as backup location under Backups

Price: ~€7.50/month (includes remote access, Alexa/Google integration)


  1. Open Control Panel → User & Group

  2. Create user for Home Assistant:

    • Username: homeassistant
    • Strong password
    • Disable DSM access
  3. Open Control Panel → Shared Folder

  4. Create shared folder:

    • Name: ha-backups
    • Give HA user full access
  5. Enable SMB under File Services → SMB

  1. Go to Settings → System → Storage

  2. Click Add Network Storage

  3. Fill in:

    Name: NAS Backup
    Usage: Backup
    Server: 192.168.1.50 # Your NAS IP
    Type: SMB (or NFS)
    Share: ha-backups
    Username: homeassistant
    Password: ****
  4. Click Connect

  5. Go to Backups → Locations and add NAS


LocationRecommendationReason
Cloud✅ AlwaysData leaves your network
Home Assistant Cloud🔒 AutomaticCannot be disabled
NAS (home)⚖️ OptionalEasier recovery without
USB disk✅ YesCan be lost/stolen
# STORE IN THESE PLACES:
1. Password Manager (1Password, Bitwarden, etc.)
2. Physical copy in safe/safety deposit box
3. Shared with a trusted person
# DON'T STORE:
- In Home Assistant itself (lost on crash)
- In unencrypted file on NAS
- Only in your head

Backup TypeFrequencyRetentionLocation
DailyEvery night at 4:00 AM3 copiesLocal
WeeklySunday at 4:00 AM4 copiesNAS + Cloud
Before updateOn every HA update3 copiesAll locations
# Automatic backup configuration
# Settings → System → Backups → Automatic backup
Schedule:
Frequency: Daily
Time: 04:00
Day: Every day
Retention:
Number of copies: 3
Locations:
- Local (encrypted: no)
- Google Drive (encrypted: yes)
- NAS (encrypted: no)
On updates:
Create backup: Yes

  1. Go to Settings → System → Backups

  2. Find backup (from local, cloud, or NAS)

  3. Click on backup → Restore

  4. Choose what to restore:

    • Everything
    • Configuration only
    • Specific add-ons
  5. Wait for restoration (can take 5-30 min)

  6. Log in again after restart

If your HA server is completely dead:

  1. Install Home Assistant on new hardware

  2. Run through initial setup

  3. Mount backup location:

    • NAS: Add network storage
    • Google Drive: Install integration
    • USB: Connect disk
  4. Go to Settings → System → Backups

  5. Find backup from your location

  6. Restore full backup

  7. Restart and log in with your old credentials


PracticeImplementation
Separate VLANIoT devices in own network
FirewallBlock unnecessary traffic
No port forwardingUse VPN or Nabu Casa
HTTPSSSL/TLS on all traffic
# configuration.yaml
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
ip_ban_enabled: true
login_attempts_threshold: 5
PracticeDescription
Strong passwords16+ characters, password manager
2FAEnable for all users
Least privilegeGrant only necessary permissions
Separate accountsOne per household member, admin separate
  1. Go to your Profile picture (bottom left)

  2. Scroll to Multifactor Authentication Modules

  3. Enable Time-based One-Time Password

  4. Scan QR code with authenticator app:

    • Google Authenticator
    • Authy
    • 1Password
  5. Enter code to confirm


# Check:
1. Is there enough space on destination disk?
2. Is network connection stable (NAS)?
3. Are credentials correct (cloud/NAS)?
4. Check Supervisor logs for details
# Check:
1. Is backup corrupted? (try another backup)
2. Is encryption key correct?
3. Is HA version compatible?
4. Do you have enough disk space?
# Common problems:
1. SMB version mismatch → Try SMB 2.0 or 3.0
2. Wrong credentials → Check username/password
3. Share doesn't exist → Check share name on NAS
4. Firewall blocks → Port 445 (SMB) must be open

  • Verify automatic backup runs
  • Check backup status in UI
  • Ensure space on backup locations
  • Test restoration on test server (if possible)
  • Verify encryption key is accessible
  • Clean up old/unnecessary backups
  • Create manual backup BEFORE changes
  • Test backup after major updates
  • Document changes

Ofte stillede spørgsmål

How often should I backup?
Minimum weekly, preferably daily. With the new automatic backup system, there's no reason not to run daily backups. Also remember backup before updates.
Can I restore on different hardware?
Yes! Home Assistant backups are cross-platform and work across CPU architectures. You can go from Raspberry Pi to Intel NUC without problems.
What's included in a backup?
Everything! Configuration, automations, dashboards, add-ons and their data, integrations, history (if selected). The only thing not included is Home Assistant OS itself.
Should I use encryption on local backup?
It's optional for local/NAS backups. The advantage of unencrypted backups is that you can manually extract files without Home Assistant. Cloud backups should always be encrypted.


Last updated: December 2025


Kommentarer