I’m running home assistant in a docker container on a Raspberry Pi 4. The home network is established using a FRITZ!Box 6670 Cable. This FRITZ!Box has an internal storage on 1.3 GB, accessible as NAS. In my scenario this internal storage space is optimally suited as location for the automated backups of Home Assistant. Here is a step by step guide how to use the FRITZ!Box storage as backup location.
Step 1) On your FRITZ!Box: Create FRITZ!Box user for NAS access: Go to System => FRITZ!Box-Benutzer and create a new user. Under Berechtigungen set the checkbox for “Zugang zu NAS-Inhalten”. Note user name and password.
Step 2) On the Raspberry Pi: permanently mount the share on the FRITZ!Box NAS with above user name and password (if you don’t know how to do this ask “how to install cifs-utils and map a network share on a Raspberry Pi?” in chatgpt.com). Create a new folder “Backup” in your FRITZ!Box NAS network share.
Step 3) Edit your configuration.yaml and add the folder /config and the folder /config/backups in the allowlist_external_dirs:, it then should look like this:
homeassistant:
allowlist_external_dirs:
- "/config"
- "/config/backups"
Step 4) Then bind/mount the FRITZ!Box NAS network share into the /config/backups folder. This is done with an additional -v section when starting the home assistant docker container. With the added -v option my docker start command looks like this:
docker run -d --name homeassistant --privileged
--restart unless-stopped
-e TZ=Europe/Berlin
-e HOST_PROC=/hostfs/proc
-e HOST_SYS=/hostfs/sys
-v /home/pi/homeassistant_config:/config
-v /mnt/fritzbox/Backup:/config/backups
-v /:/hostfs:ro
--network=host homeassistant/home-assistant:latest
Check that there is no error in docker logs homeassistant.
After that the automatic backups with target location
get now written into the FRITZ!Box NAS network share:
pi@RasPi4:/mnt/fritzbox/backup $ ls -la
total 210120
drwxrwxr-x 2 pi pi 0 Oct 7 09:37 .
drwxrwxr-x 2 pi pi 0 Oct 7 08:55 ..
-rw-rw-r-- 1 pi pi 215162880 Oct 7 09:40 Custom_backup_2025.10.0_2025-10-07_09.37_46206749.tar