Advanced Options
Loggingâ
Frigate loggerâ
Change the default log level for troubleshooting purposes.
logger:
# Optional: default log level (default: shown below)
default: info
# Optional: module by module log level configuration
logs:
frigate.mqtt: error
Available log levels are: debug, info, warning, error, critical
Examples of available modules are:
frigate.appfrigate.mqttfrigate.object_detection.basedetector.<detector_name>watchdog.<camera_name>ffmpeg.<camera_name>.<sorted_roles>NOTE: All FFmpeg logs are sent aserrorlevel.
Go2RTC Loggingâ
See the go2rtc docs for logging configuration
go2rtc:
streams:
# ...
log:
exec: trace
environment_varsâ
This section can be used to set environment variables for those unable to modify the environment of the container, like within Home Assistant OS. Docker users should set environment variables in their docker run command (-e FRIGATE_MQTT_PASSWORD=secret) or docker-compose.yml file (environment: section) instead. Note that values set here are stored in plain text in your config file, so if the goal is to keep credentials out of your configuration, use Docker environment variables or Docker secrets instead.
Variables prefixed with FRIGATE_ can be referenced in config fields that support environment variable substitution (such as MQTT host and credentials, camera stream URLs, and ONVIF host and credentials) using the {FRIGATE_VARIABLE_NAME} syntax.
Example:
environment_vars:
FRIGATE_MQTT_USER: my_mqtt_user
FRIGATE_MQTT_PASSWORD: my_mqtt_password
mqtt:
host: "{FRIGATE_MQTT_HOST}"
user: "{FRIGATE_MQTT_USER}"
password: "{FRIGATE_MQTT_PASSWORD}"
TensorFlow Thread Configurationâ
If you encounter thread creation errors during classification model training, you can limit TensorFlow's thread usage:
environment_vars:
TF_INTRA_OP_PARALLELISM_THREADS: "2" # Threads within operations (0 = use default)
TF_INTER_OP_PARALLELISM_THREADS: "2" # Threads between operations (0 = use default)
TF_DATASET_THREAD_POOL_SIZE: "2" # Data pipeline threads (0 = use default)
databaseâ
Tracked object and recording information is managed in a sqlite database at /config/frigate.db. If that database is deleted, recordings will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within Home Assistant.
If you are storing your database on a network share (SMB, NFS, etc), you may get a database is locked error message on startup. You can customize the location of the database in the config if necessary.
This may need to be in a custom location if network storage is used for the media folder.
database:
path: /path/to/frigate.db
modelâ
If using a custom model, the width and height will need to be specified.
Custom models may also require different input tensor formats. The colorspace conversion supports RGB, BGR, or YUV frames to be sent to the object detector. The input tensor shape parameter is an enumeration to match what specified by the model.
| Tensor Dimension | Description |
|---|---|
| N | Batch Size |
| H | Model Height |
| W | Model Width |
| C | Color Channels |
| Available Input Tensor Shapes |
|---|
| "nhwc" |
| "nchw" |
# Optional: model config
model:
path: /path/to/model
width: 320
height: 320
input_tensor: "nhwc"
input_pixel_format: "bgr"
labelmapâ
If the labelmap is customized then the labels used for alerts will need to be adjusted as well. See alert labels for more info.
The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. By default, truck is renamed to car because they are often confused. You cannot add new object types, but you can change the names of existing objects in the model.
model:
labelmap:
2: vehicle
3: vehicle
5: vehicle
7: vehicle
15: animal
16: animal
17: animal
Note that if you rename objects in the labelmap, you will also need to update your objects -> track list as well.
Some labels have special handling and modifications can disable functionality.
person objects are associated with face and amazon
car objects are associated with license_plate, ups, fedex, amazon
Network Configurationâ
Changes to Frigate's internal network configuration can be made by bind mounting nginx.conf into the container. For example:
services:
frigate:
container_name: frigate
...
volumes:
...
- /path/to/your/nginx.conf:/usr/local/nginx/conf/nginx.conf
Enabling IPv6â
IPv6 is disabled by default, to enable IPv6 listen.gotmpl needs to be bind mounted with IPv6 enabled. For example:
{{ if not .enabled }}
# intended for external traffic, protected by auth
listen 8971;
{{ else }}
# intended for external traffic, protected by auth
listen 8971 ssl;
# intended for internal traffic, not protected by auth
listen 5000;
becomes
{{ if not .enabled }}
# intended for external traffic, protected by auth
listen [::]:8971 ipv6only=off;
{{ else }}
# intended for external traffic, protected by auth
listen [::]:8971 ipv6only=off ssl;
# intended for internal traffic, not protected by auth
listen [::]:5000 ipv6only=off;