How do I set Frigate to store recordings to an external NAS?

So, firstly, I’ve been trying to follow the guide from Frigate’s documentation here: Home Assistant network storage | Frigate

I’ve created my NAS called frigate and I’ve created a file called test with the text “blah blah blah” and I can verify that that file exists in /mnt/data/supervisor/mounts/frigate.
image

I didn’t have any recordings so I opted not to keep my frigate data, so I deleted the frigate folder in /mnt/data/supervisor/media.

I set my frigate.yml file to have the following text:

database:
  path: /config/frigate.db

I can validate that in the OS, the .db file exists at /mnt/data/supervisor/homeassistant/frigate.db, so according to the steps here, I should be good.

However, when I open Frigate in my Home Assistant thing, it shows that my location is still the 32gb drive I gave to the HASS OS, and it has recreated the frigate folder under media that I deleted earlier.

Am I missing something here? I can tell it’s not the same folder because it didn’t create those folders on the NAS side of things, and the test file I created only exists in the other folder.

I’ve also noticed that the NAS does not appear in the Media browser, which leads me to believe that it’s not actually mounted correctly? I have no idea if I’ve done it correctly or not, but as I said, I can navigate to the folder in the mounts folder and see the file I created, so at least that bit is correctly done.

Any help would be greatly appreciated.

Hi Thomas

Could you already find a solution? I am stuck with the same problem.
When i open the share on my NAS i see that there is no folder created by frigate.

Greetings,
Andi

Directions on this are very unclear. It mentions moving the frigate.db folder to the /Config folder, but its already there.??

Hi, I just got things working and hope I can help others on the same journey. Just to give a little context in case anyone else is attempting the same thing, my goal was:

  • Home Assistant OS running in a Proxmox VM
  • Add-ons for Frigate and Docker-Wyze-Bridge
  • Frigate saving footage to a NAS
  • Frigate integration adding cards to my dashboard
  • Coral TPU passed to Frigate add-on
  • Zigbee dongle passed to HAOS (SkyConnect)

I previously had a separate Proxmox container running Frigate (separate from Home Assistant), however due to some hardware limitations I wanted to bring all of the functionality under HAOS using the Add-on. The add-on is basically just a docker container managed by HAOS directly.

I also found the documentation very sparse as it comes to the add-on. The only guidance I saw was to create a frigate.yml file in the root of the Home Assistant configuration directory. Nothing about mounting volumes or anything really. Since I already had a working config to start from I just needed to figure out how to adapt things for running the HAOS add-on.

First let’s add the network storage in the Home Assistant WebUI

  1. Settings > System > Storage > Add Network Storage
  2. Set the name = frigate
  3. Select Usage = Media
  4. Configure the remaining settings as needed to connect to your NAS share

When you install the Frigate add-on, it should now automatically utilize this for storage due to the add-on defaulting to “/media/frigate” as the storage path. This worked for me.

Next, install the Frigate (Full Access) Add-on. In my case, I believe full access is needed for the Coral TPU, though I have not tested with protection enabled. If you need Frigate to access local hardware such as a GPU or TPU I suspect the Full Access mode is needed or at the very least will simplify setup.

After this I used the File Editor add-on to create a frigate.yml file in the root directory. I pasted in my old config, while needing to tweak a few host name lines. Naturally the first few times I tried to start the add-on failed due to configuration errors. By checking the log and making updates I eliminated the errors and got a successful start. The database should be set to the default path: /config/frigate.db. I will mention that Frigate did not pick up my previous footage, it started from a blank slate even though I have footage for the past 10 days available on the NAS.

Finally, we can check the Storage page in Frigate, I see 3.98 TiB which matches the 4 TB NAS share I’m expecting, and it appears to be recording. Obviously there are still some things that can go wrong such as incorrect permissions on the NAS share among other things. Check the log tab on the Add-in page if you need to do more troubleshooting.

A little bit of extra credit, when adding the Frigate Integration, I noticed that it tells me to set a certain URL when using the Add-on, however it was not quite right.

I’m not sure the reason for this but you can check your Add-on’s host name on Settings > Add-ons > Frigate. Host name will be on the right near the CPU Usage meter, update your URL accordingly.

With that I have everything working as needed all within HAOS using add-ons.

2 Likes

Update: I’ve noticed that when rebooting, it appears that Frigate may start before the network share is mounted, in which case it begins to record at the local path and the network share never mounts. Thus after a few days the local volume will be filled by stored footage.

I am solving this for now by setting Frigate to not run at boot, then I manually start it after HAOS is fully booted and the network storage is connected. This is working fine but does add an extra step. I wonder if there is some way I could delay the start of Frigate somehow.

Edit: Solved by creating a HA automation which starts Frigate automatically after a short timeout. I used this thread to get started Delay auto boot for add-ons - #2 by nikipore but the syntax didn’t quite work so I used the HA Visual Editor instead which made it super easy to create a working automation.

2 Likes

Hi, @Dleewee greetings. I want to follow your choice to just run the frigate inside VM HAOS in proxmox. But I have some problem to detect my TPU USB coral. Can you help to explain the detail step? I just tried several method but ended with the TPU not found.

Thanks in advance