2021-01-20 16:26:49 -08:00
---
id : index
2024-01-30 06:14:16 -06:00
title : Frigate Configuration
2021-01-20 16:26:49 -08:00
---
2025-03-24 11:05:59 -03:00
For Home Assistant Add-on installations, the config file should be at `/addon_configs/<addon_directory>/config.yml` , where `<addon_directory>` is specific to the variant of the Frigate Add-on you are running. See the list of directories [here ](#accessing-add-on-config-dir ).
2021-04-07 19:38:20 +01:00
2021-09-12 14:48:21 -05:00
For all other installation types, the config file should be mapped to `/config/config.yml` inside the container.
2021-01-20 16:26:49 -08:00
2025-03-24 11:05:59 -03:00
It can be named `config.yml` or `config.yaml` , but if both files exist `config.yml` will be preferred and `config.yaml` will be ignored.
2024-01-30 06:14:16 -06:00
It is recommended to start with a minimal configuration and add to it as described in [this guide ](../guides/getting_started.md ) and use the built in configuration editor in Frigate's UI which supports validation.
2021-01-20 16:26:49 -08:00
```yaml
mqtt :
2024-01-30 06:14:16 -06:00
enabled : False
2021-01-20 16:26:49 -08:00
cameras :
2024-01-30 06:14:16 -06:00
dummy_camera : # <--- this will be changed to your actual camera later
enabled : False
2021-01-20 16:26:49 -08:00
ffmpeg :
inputs :
2024-01-30 06:14:16 -06:00
- path : rtsp://127.0.0.1:554/rtsp
2021-01-20 16:26:49 -08:00
roles :
- detect
```
2025-03-24 11:05:59 -03:00
## Accessing the Home Assistant Add-on configuration directory {#accessing-add-on-config-dir}
2022-05-29 08:48:55 -06:00
2025-03-24 11:05:59 -03:00
When running Frigate through the HA Add-on, the Frigate `/config` directory is mapped to `/addon_configs/<addon_directory>` in the host, where `<addon_directory>` is specific to the variant of the Frigate Add-on you are running.
| Add-on Variant | Configuration directory |
| -------------------------- | -------------------------------------------- |
| Frigate | `/addon_configs/ccab4aaf_frigate` |
| Frigate (Full Access) | `/addon_configs/ccab4aaf_frigate-fa` |
| Frigate Beta | `/addon_configs/ccab4aaf_frigate-beta` |
| Frigate Beta (Full Access) | `/addon_configs/ccab4aaf_frigate-fa-beta` |
**Whenever you see `/config` in the documentation, it refers to this directory.**
If for example you are running the standard Add-on variant and use the [VS Code Add-on ](https://github.com/hassio-addons/addon-vscode ) to browse your files, you can click _File_ > _Open folder..._ and navigate to `/addon_configs/ccab4aaf_frigate` to access the Frigate `/config` directory and edit the `config.yaml` file. You can also use the built-in file editor in the Frigate UI to edit the configuration file.
## VS Code Configuration Schema
VS Code supports JSON schemas for automatically validating configuration files. You can enable this feature by adding `# yaml-language-server: $schema=http://frigate_host:5000/api/config/schema.json` to the beginning of the configuration file. Replace `frigate_host` with the IP address or hostname of your Frigate server. If you're using both VS Code and Frigate as an Add-on, you should use `ccab4aaf-frigate` instead. Make sure to expose the internal unauthenticated port `5000` when accessing the config from VS Code on another machine.
2022-05-29 08:48:55 -06:00
2024-01-30 06:14:16 -06:00
## Environment Variable Substitution
2021-01-20 16:26:49 -08:00
2024-01-30 06:14:16 -06:00
Frigate supports the use of environment variables starting with `FRIGATE_` **only** where specifically indicated in the [reference config ](./reference.md ). For example, the following values can be replaced at runtime by using environment variables:
2023-03-14 08:51:09 -05:00
2023-03-07 07:28:51 -05:00
```yaml
mqtt :
user : "{FRIGATE_MQTT_USER}"
password : "{FRIGATE_MQTT_PASSWORD}"
```
2023-03-14 08:51:09 -05:00
2023-03-07 07:28:51 -05:00
```yaml
- path : rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:8554/unicast
```
2023-04-26 05:08:53 -06:00
```yaml
onvif :
host : 10.0.10.10
port : 8000
user : "{FRIGATE_RTSP_USER}"
password : "{FRIGATE_RTSP_PASSWORD}"
```
2024-01-03 23:39:51 +00:00
```yaml
go2rtc :
rtsp :
username : "{FRIGATE_GO2RTC_RTSP_USERNAME}"
password : "{FRIGATE_GO2RTC_RTSP_PASSWORD}"
```
2024-06-21 17:30:19 -04:00
```yaml
genai :
api_key : "{FRIGATE_GENAI_API_KEY}"
```
2024-01-30 06:14:16 -06:00
## Common configuration examples
2023-11-18 14:04:43 +00:00
2024-01-30 06:14:16 -06:00
Here are some common starter configuration examples. Refer to the [reference config ](./reference.md ) for detailed information about all the config values.
2023-11-18 14:04:43 +00:00
2025-03-24 11:05:59 -03:00
### Raspberry Pi Home Assistant Add-on with USB Coral
2023-11-18 14:04:43 +00:00
2024-01-30 06:14:16 -06:00
- Single camera with 720p, 5fps stream for detect
2025-03-24 11:05:59 -03:00
- MQTT connected to the Home Assistant Mosquitto Add-on
2024-01-30 06:14:16 -06:00
- Hardware acceleration for decoding video
- USB Coral detector
- Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not
2024-09-11 19:53:58 -05:00
- Continue to keep all video if it qualified as an alert or detection for 30 days
2024-01-30 06:14:16 -06:00
- Save snapshots for 30 days
- Motion mask for the camera timestamp
2023-11-18 14:04:43 +00:00
2021-01-20 16:26:49 -08:00
```yaml
mqtt :
2024-01-30 06:14:16 -06:00
host : core-mosquitto
user : mqtt-user
password : xxxxxxxxxx
2021-01-20 16:26:49 -08:00
2021-09-12 14:48:21 -05:00
ffmpeg :
2024-01-30 06:14:16 -06:00
hwaccel_args : preset-rpi-64-h264
2021-09-03 05:03:36 -07:00
2024-01-30 06:14:16 -06:00
detectors :
coral :
type : edgetpu
device : usb
2021-09-03 05:03:36 -07:00
2021-09-12 14:48:21 -05:00
record :
2024-01-30 06:14:16 -06:00
enabled : True
2021-12-11 14:25:35 -06:00
retain :
2024-01-30 06:14:16 -06:00
days : 7
mode : motion
2024-09-11 19:53:58 -05:00
alerts :
2021-09-12 14:48:21 -05:00
retain :
2024-09-11 19:53:58 -05:00
days : 30
detections :
retain :
days : 30
2021-09-12 14:48:21 -05:00
snapshots :
2024-01-30 06:14:16 -06:00
enabled : True
2021-09-12 14:48:21 -05:00
retain :
2024-01-30 06:14:16 -06:00
default : 30
2021-09-12 14:48:21 -05:00
2024-01-30 06:14:16 -06:00
cameras :
name_of_your_camera :
detect :
width : 1280
height : 720
fps : 5
ffmpeg :
inputs :
- path : rtsp://10.0.10.10:554/rtsp
roles :
- detect
motion :
mask :
2024-05-22 09:51:59 -05:00
- 0.000 , 0.427 , 0.002 , 0.000 , 0.999 , 0.000 , 0.999 , 0.781 , 0.885 , 0.456 , 0.700 , 0.424 , 0.701 , 0.311 , 0.507 , 0.294 , 0.453 , 0.347 , 0.451 , 0.400
2024-01-30 06:14:16 -06:00
```
### Standalone Intel Mini PC with USB Coral
- Single camera with 720p, 5fps stream for detect
- MQTT disabled (not integrated with home assistant)
- VAAPI hardware acceleration for decoding video
- USB Coral detector
- Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not
2024-09-11 19:53:58 -05:00
- Continue to keep all video if it qualified as an alert or detection for 30 days
2024-01-30 06:14:16 -06:00
- Save snapshots for 30 days
- Motion mask for the camera timestamp
```yaml
mqtt :
2022-11-02 05:36:09 -06:00
enabled : False
2021-09-03 05:03:36 -07:00
2024-01-30 06:14:16 -06:00
ffmpeg :
hwaccel_args : preset-vaapi
2023-01-16 16:50:35 -07:00
2024-01-30 06:14:16 -06:00
detectors :
coral :
type : edgetpu
device : usb
2021-09-03 05:03:36 -07:00
2024-01-30 06:14:16 -06:00
record :
enabled : True
retain :
days : 7
mode : motion
2024-09-11 19:53:58 -05:00
alerts :
2024-01-30 06:14:16 -06:00
retain :
2024-09-11 19:53:58 -05:00
days : 30
detections :
retain :
days : 30
2024-01-30 06:14:16 -06:00
snapshots :
enabled : True
retain :
default : 30
2021-09-12 14:48:21 -05:00
cameras :
2024-01-30 06:14:16 -06:00
name_of_your_camera :
detect :
width : 1280
height : 720
fps : 5
2021-09-12 14:48:21 -05:00
ffmpeg :
inputs :
2024-01-30 06:14:16 -06:00
- path : rtsp://10.0.10.10:554/rtsp
2021-09-12 14:48:21 -05:00
roles :
- detect
2024-01-30 06:14:16 -06:00
motion :
mask :
2024-05-22 09:51:59 -05:00
- 0.000 , 0.427 , 0.002 , 0.000 , 0.999 , 0.000 , 0.999 , 0.781 , 0.885 , 0.456 , 0.700 , 0.424 , 0.701 , 0.311 , 0.507 , 0.294 , 0.453 , 0.347 , 0.451 , 0.400
2024-01-30 06:14:16 -06:00
```
2021-09-12 14:48:21 -05:00
2024-01-30 06:14:16 -06:00
### Home Assistant integrated Intel Mini PC with OpenVino
2021-09-12 14:48:21 -05:00
2024-01-30 06:14:16 -06:00
- Single camera with 720p, 5fps stream for detect
- MQTT connected to same mqtt server as home assistant
- VAAPI hardware acceleration for decoding video
- OpenVino detector
- Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not
2024-09-11 19:53:58 -05:00
- Continue to keep all video if it qualified as an alert or detection for 30 days
2024-01-30 06:14:16 -06:00
- Save snapshots for 30 days
- Motion mask for the camera timestamp
2023-11-01 14:08:59 +01:00
2024-01-30 06:14:16 -06:00
```yaml
mqtt :
host : 192.168 .X.X # <---- same mqtt broker that home assistant uses
user : mqtt-user
password : xxxxxxxxxx
2021-09-12 14:48:21 -05:00
2024-01-30 06:14:16 -06:00
ffmpeg :
hwaccel_args : preset-vaapi
2022-04-15 06:23:02 -06:00
2024-01-30 06:14:16 -06:00
detectors :
ov :
type : openvino
device : AUTO
2023-01-13 16:27:16 -07:00
2024-01-30 06:14:16 -06:00
model :
width : 300
height : 300
input_tensor : nhwc
input_pixel_format : bgr
2025-01-07 20:59:37 -07:00
path : /openvino-model/ssdlite_mobilenet_v2.xml
2024-01-30 06:14:16 -06:00
labelmap_path : /openvino-model/coco_91cl_bkgr.txt
2023-04-26 05:08:53 -06:00
2024-01-30 06:14:16 -06:00
record :
enabled : True
retain :
days : 7
mode : motion
2024-09-11 19:53:58 -05:00
alerts :
2024-01-30 06:14:16 -06:00
retain :
2024-09-11 19:53:58 -05:00
days : 30
detections :
retain :
days : 30
2023-04-27 02:29:01 +02:00
2024-01-30 06:14:16 -06:00
snapshots :
enabled : True
retain :
default : 30
2023-01-26 00:36:26 +00:00
2024-01-30 06:14:16 -06:00
cameras :
name_of_your_camera :
detect :
width : 1280
height : 720
fps : 5
ffmpeg :
inputs :
- path : rtsp://10.0.10.10:554/rtsp
roles :
- detect
motion :
mask :
2024-05-22 09:51:59 -05:00
- 0.000 , 0.427 , 0.002 , 0.000 , 0.999 , 0.000 , 0.999 , 0.781 , 0.885 , 0.456 , 0.700 , 0.424 , 0.701 , 0.311 , 0.507 , 0.294 , 0.453 , 0.347 , 0.451 , 0.400
2021-09-12 14:48:21 -05:00
```