Files
frigate/docs/docs/configuration/config.md
T

383 lines
16 KiB
Markdown
Raw Normal View History

2021-01-20 16:26:49 -08:00
---
2026-06-04 18:07:12 -05:00
id: config
2024-01-30 06:14:16 -06:00
title: Frigate Configuration
2021-01-20 16:26:49 -08:00
---
2026-03-30 11:36:45 -05:00
import ConfigTabs from "@site/src/components/ConfigTabs";
import TabItem from "@theme/TabItem";
import NavPath from "@site/src/components/NavPath";
2021-04-07 19:38:20 +01:00
2026-03-30 11:36:45 -05:00
Frigate can be configured through the **Settings UI** or by editing the YAML configuration file directly. The Settings UI is the recommended approach — it provides validation and a guided experience for all configuration options.
2026-06-15 08:03:37 -05:00
## Using the Settings UI
The Settings UI groups every configuration option into sections that are listed in the left-hand menu. Each section presents a guided form with validation, so you don't need to remember the structure of the YAML or look up option names by hand.
### Global vs. camera-level configuration
Settings are organized into two scopes:
- **Global configuration** — values under <NavPath path="Settings > Global configuration" /> apply to every camera by default. This is where you set the baseline behavior for object detection, recording, snapshots, motion, and so on.
- **Camera configuration** — values under <NavPath path="Settings > Camera configuration" /> apply to a single camera. Use the camera selector button at the top of these pages to choose which camera you are editing.
When a camera-level section is left untouched, the camera simply inherits the global values. Changing a value on a camera page **overrides** the global value for that camera only — the global setting and every other camera are unaffected. This mirrors how the YAML works, where a value set under `cameras.<name>` takes precedence over the same value set at the top level.
To undo an override and go back to inheriting from the parent scope, use the reset button at the bottom of the section:
- On a camera section, the button is labeled **Reset to Global** and restores the camera to the global value.
- On a global section, the button is labeled **Reset to Default** and restores Frigate's built-in default.
Resetting asks for confirmation and cannot be undone once applied.
### Saving changes and the Save All button
Edits are not applied until you save them. As soon as you change a value, the UI tracks it as a pending change:
- The edited section shows a **Modified** badge, and the changed fields are highlighted.
- A **You have unsaved changes** notice appears above the section's **Save** and **Undo** buttons. **Save** commits just that section; **Undo** discards its pending edits.
Because pending changes can span multiple sections — and multiple cameras — the header provides a **Save All** button that writes every pending change at once. Next to it, **Review pending changes** opens a summary that lists each pending edit with its scope (Global or a specific camera), the affected field, and the new value, so you can confirm exactly what will be written before committing. **Undo All** discards every pending change across all sections.
### Restart-required indicators
Most settings take effect immediately, but some require Frigate to restart before they apply. Fields that require a restart are marked with a small restart icon and a **Restart required** tooltip next to the field label.
When you save a change that touches one of these fields, Frigate confirms the save and reminds you that a restart is needed (for example, _"Settings saved successfully. Restart Frigate to apply your changes."_). The notification includes a one-click **Restart Frigate** action so you can apply the change right away, or you can continue editing and restart later.
### The colored dots in the camera configuration menu
When you are working under <NavPath path="Settings > Camera configuration" />, small colored dots can appear next to a section's name in the menu. They give you an at-a-glance summary of that section's state for the selected camera:
- **Blue dot** — this section **overrides the global configuration**. One or more values in the section have been set specifically for this camera and differ from the global defaults.
- **Profile-colored dot** — when you are viewing a [camera profile](./profiles.md), a dot in that profile's assigned color indicates the section is **overridden by that profile**. Each profile is given its own distinct color so you can tell at a glance which sections it changes.
- **Amber dot** — this section has **unsaved changes**. It appears alongside the **Modified** badge whenever you have pending edits in the section that haven't been saved yet.
Hover over any dot to see a tooltip describing what it means. Open a section to see exactly which fields are overridden — the section header indicates how many fields differ from the global (or base) configuration.
2026-03-30 11:36:45 -05:00
## Configuration File Location
2026-06-15 08:03:37 -05:00
For users who prefer to edit the YAML configuration file directly, it is recommended to start with a minimal configuration and add to it as described in [the getting started guide](../guides/getting_started.md).
2026-03-30 11:36:45 -05:00
- **Home Assistant App:** `/addon_configs/<addon_directory>/config.yml` — see [directory list](#accessing-app-config-dir)
- **All other installations:** Map to `/config/config.yml` inside the container
2021-01-20 16:26:49 -08: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.
2026-03-30 11:36:45 -05:00
A minimal starting configuration:
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
```
## Accessing the Home Assistant App configuration directory {#accessing-app-config-dir}
2022-05-29 08:48:55 -06:00
When running Frigate through the HA App, 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 App you are running.
| App Variant | Configuration directory |
2026-02-26 11:57:33 -06:00
| -------------------------- | ----------------------------------------- |
| 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.**
2026-03-30 11:36:45 -05:00
If for example you are running the standard App variant and use the [VS Code App](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 config editor in the Frigate UI.
## 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 App, 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
2026-06-04 18:07:12 -05:00
Frigate supports the use of environment variables starting with `FRIGATE_` **only** where specifically indicated in the [reference config](./advanced/reference.md). For example, the following values can be replaced at runtime by using environment variables:
2023-03-14 08:51:09 -05:00
```yaml
mqtt:
2026-03-08 16:08:40 -05:00
host: "{FRIGATE_MQTT_HOST}"
user: "{FRIGATE_MQTT_USER}"
password: "{FRIGATE_MQTT_PASSWORD}"
```
2023-03-14 08:51:09 -05:00
```yaml
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:8554/unicast
```
```yaml
onvif:
host: "192.168.1.12"
port: 8000
user: "{FRIGATE_RTSP_USER}"
password: "{FRIGATE_RTSP_PASSWORD}"
```
```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
2026-06-04 18:07:12 -05:00
Here are some common starter configuration examples. These can be configured through the Settings UI or via YAML. Refer to the [reference config](./advanced/reference.md) for detailed information about all config values.
2023-11-18 14:04:43 +00:00
### Raspberry Pi Home Assistant App 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
- MQTT connected to the Home Assistant Mosquitto App
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
- 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
2026-03-30 11:36:45 -05:00
<ConfigTabs>
<TabItem value="ui">
1. Navigate to <NavPath path="Settings > System > MQTT" /> and configure the MQTT connection to your Home Assistant Mosquitto broker
2. Navigate to <NavPath path="Settings > Global configuration > FFmpeg" /> and set **Hardware acceleration arguments** to `Raspberry Pi (H.264)`
3. Navigate to <NavPath path="Settings > System > Detectors and model" /> and add a detector with **Type** `EdgeTPU` and **Device** `usb`
2026-03-30 11:36:45 -05:00
4. Navigate to <NavPath path="Settings > Global configuration > Recording" /> and set **Enable recording** to on, **Motion retention > Retention days** to `7`, **Alert retention > Event retention > Retention days** to `30`, **Alert retention > Event retention > Retention mode** to `motion`, **Detection retention > Event retention > Retention days** to `30`, **Detection retention > Event retention > Retention mode** to `motion`
5. Navigate to <NavPath path="Settings > Global configuration > Snapshots" /> and set **Enable snapshots** to on, **Snapshot retention > Default retention** to `30`
2026-05-24 15:59:56 -05:00
6. Navigate to <NavPath path="Settings > Global configuration > Camera management" /> and add your camera with the appropriate RTSP stream URL
2026-03-30 11:36:45 -05:00
7. Navigate to <NavPath path="Settings > Camera configuration > Masks / Zones" /> to add a motion mask for the camera timestamp
</TabItem>
<TabItem value="yaml">
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
2024-01-30 06:14:16 -06:00
detectors:
coral:
type: edgetpu
device: usb
2021-09-12 14:48:21 -05:00
record:
2024-01-30 06:14:16 -06:00
enabled: True
2026-02-26 11:57:33 -06:00
motion:
2024-01-30 06:14:16 -06:00
days: 7
alerts:
2021-09-12 14:48:21 -05:00
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
detections:
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
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:
2026-02-28 08:04:43 -06:00
timestamp:
friendly_name: "Camera timestamp"
enabled: true
coordinates: "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
```
2026-03-30 11:36:45 -05:00
</TabItem>
</ConfigTabs>
2024-01-30 06:14:16 -06:00
### Standalone Intel Mini PC with USB Coral
- Single camera with 720p, 5fps stream for detect
2026-03-30 11:36:45 -05:00
- MQTT disabled (not integrated with Home Assistant)
2024-01-30 06:14:16 -06:00
- 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
- 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
2026-03-30 11:36:45 -05:00
<ConfigTabs>
<TabItem value="ui">
1. Navigate to <NavPath path="Settings > System > MQTT" /> and set **Enable MQTT** to off
2. Navigate to <NavPath path="Settings > Global configuration > FFmpeg" /> and set **Hardware acceleration arguments** to `VAAPI (Intel/AMD GPU)`
3. Navigate to <NavPath path="Settings > System > Detectors and model" /> and add a detector with **Type** `EdgeTPU` and **Device** `usb`
2026-03-30 11:36:45 -05:00
4. Navigate to <NavPath path="Settings > Global configuration > Recording" /> and set **Enable recording** to on, **Motion retention > Retention days** to `7`, **Alert retention > Event retention > Retention days** to `30`, **Alert retention > Event retention > Retention mode** to `motion`, **Detection retention > Event retention > Retention days** to `30`, **Detection retention > Event retention > Retention mode** to `motion`
5. Navigate to <NavPath path="Settings > Global configuration > Snapshots" /> and set **Enable snapshots** to on, **Snapshot retention > Default retention** to `30`
2026-05-24 15:59:56 -05:00
6. Navigate to <NavPath path="Settings > Global configuration > Camera management" /> and add your camera with the appropriate RTSP stream URL
2026-03-30 11:36:45 -05:00
7. Navigate to <NavPath path="Settings > Camera configuration > Masks / Zones" /> to add a motion mask for the camera timestamp
</TabItem>
<TabItem value="yaml">
2024-01-30 06:14:16 -06:00
```yaml
mqtt:
enabled: False
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
2024-01-30 06:14:16 -06:00
record:
enabled: True
2026-02-26 11:57:33 -06:00
motion:
2024-01-30 06:14:16 -06:00
days: 7
alerts:
2024-01-30 06:14:16 -06:00
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
detections:
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
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:
2026-02-28 08:04:43 -06:00
timestamp:
friendly_name: "Camera timestamp"
enabled: true
coordinates: "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
2026-03-30 11:36:45 -05:00
</TabItem>
</ConfigTabs>
### 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
2026-03-30 11:36:45 -05:00
- MQTT connected to same MQTT server as Home Assistant
2024-01-30 06:14:16 -06:00
- VAAPI hardware acceleration for decoding video
2026-03-30 11:36:45 -05:00
- OpenVINO detector
2024-01-30 06:14:16 -06:00
- Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not
- 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
2026-03-30 11:36:45 -05:00
<ConfigTabs>
<TabItem value="ui">
1. Navigate to <NavPath path="Settings > System > MQTT" /> and configure the connection to your MQTT broker
2. Navigate to <NavPath path="Settings > Global configuration > FFmpeg" /> and set **Hardware acceleration arguments** to `VAAPI (Intel/AMD GPU)`
3. Navigate to <NavPath path="Settings > System > Detectors and model" /> and add a detector with **Type** `openvino` and **Device** `AUTO`
4. On the same page, in the **Custom Model** tab, configure the OpenVINO model path and settings
2026-03-30 11:36:45 -05:00
5. Navigate to <NavPath path="Settings > Global configuration > Recording" /> and set **Enable recording** to on, **Motion retention > Retention days** to `7`, **Alert retention > Event retention > Retention days** to `30`, **Alert retention > Event retention > Retention mode** to `motion`, **Detection retention > Event retention > Retention days** to `30`, **Detection retention > Event retention > Retention mode** to `motion`
6. Navigate to <NavPath path="Settings > Global configuration > Snapshots" /> and set **Enable snapshots** to on, **Snapshot retention > Default retention** to `30`
2026-05-24 15:59:56 -05:00
7. Navigate to <NavPath path="Settings > Global configuration > Camera management" /> and add your camera with the appropriate RTSP stream URL
2026-03-30 11:36:45 -05:00
8. Navigate to <NavPath path="Settings > Camera configuration > Masks / Zones" /> to add a motion mask for the camera timestamp
</TabItem>
<TabItem value="yaml">
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
2024-01-30 06:14:16 -06:00
detectors:
ov:
type: openvino
device: AUTO
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
2024-01-30 06:14:16 -06:00
record:
enabled: True
2026-02-26 11:57:33 -06:00
motion:
2024-01-30 06:14:16 -06:00
days: 7
alerts:
2024-01-30 06:14:16 -06:00
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
detections:
retain:
days: 30
2026-02-26 11:57:33 -06:00
mode: motion
2024-01-30 06:14:16 -06:00
snapshots:
enabled: True
retain:
default: 30
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:
2026-02-28 08:04:43 -06:00
timestamp:
friendly_name: "Camera timestamp"
enabled: true
coordinates: "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
```
2026-03-30 11:36:45 -05:00
</TabItem>
</ConfigTabs>