frigate: [Config Support]: KeyError: 'FRIGATE_MQTT_PASSWORD'
Describe the problem you are having
I don’t see it in the docs but according to this issue, it looks like Frigate supports environment variables in the config file. I have successfully gotten frigate up and running, however, when I add the following configuration, I’m getting an error. What am I doing wrong?
version: "3.5"
services:
rtsp:
container_name: rtsp
image: mpromonet/v4l2rtspserver:v0.3.7
ports:
- "8554:8554"
devices:
- "/dev/video0:/dev/video0"
command: ["-U", "${RTSP_USER}:${RTSP_PASSWORD}", "-G","640x480x25", "-S"]
frigate:
container_name: frigate
image: blakeblackshear/frigate:0.11.1
privileged: true
restart: unless-stopped
shm_size: "64mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./frigate/config.yml:/config/config.yml:ro
- ./frigate/storage:/media/frigate
ports:
- "5000:5000"
- "1935:1935"
environment:
FRIGATE_RTSP_USER: "${RTSP_USER}"
FRIGATE_RTSP_PASSWORD: "${RTSP_PASSWORD}"
FRIGATE_MQTT_USER: "${MQTT_USER}"
FRIGATE_MQTT_PASSWORD: "${MQTT_PASSWORD}"
depends_on:
- rtsp
docker-compose --env-file frigate.env up
frigate | *************************************************************
frigate | *** Config Validation Errors ***
frigate | *************************************************************
frigate | 'FRIGATE_MQTT_PASSWORD'
frigate | Traceback (most recent call last):
frigate | File "/opt/frigate/frigate/app.py", line 332, in start
frigate | self.init_config()
frigate | File "/opt/frigate/frigate/app.py", line 83, in init_config
frigate | self.config = user_config.runtime_config
frigate | File "/opt/frigate/frigate/config.py", line 800, in runtime_config
frigate | config.mqtt.password = config.mqtt.password.format(**FRIGATE_ENV_VARS)
frigate | KeyError: 'FRIGATE_MQTT_PASSWORD'
frigate |
frigate | *************************************************************
frigate | *** End Config Validation Errors ***
frigate | *************************************************************
Version
blakeblackshear/frigate:0.11.1
Frigate config file
mqtt:
host: server
port: 1883
user: "{FRIGATE_MQTT_USER}"
password: "{FRIGATE_MQTT_PASSWORD}"
topic_prefix: frontyard
client_id: frontyard
cameras:
basement:
ffmpeg:
input_args: -stimeout 10
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@frontyard:8554/unicast
roles:
- detect
- rtmp
detect:
width: 640
height: 480
Relevant log output
frigate | *************************************************************
frigate | *** Config Validation Errors ***
frigate | *************************************************************
frigate | 'FRIGATE_MQTT_PASSWORD'
frigate | Traceback (most recent call last):
frigate | File "/opt/frigate/frigate/app.py", line 332, in start
frigate | self.init_config()
frigate | File "/opt/frigate/frigate/app.py", line 83, in init_config
frigate | self.config = user_config.runtime_config
frigate | File "/opt/frigate/frigate/config.py", line 800, in runtime_config
frigate | config.mqtt.password = config.mqtt.password.format(**FRIGATE_ENV_VARS)
frigate | KeyError: 'FRIGATE_MQTT_PASSWORD'
frigate |
frigate | *************************************************************
frigate | *** End Config Validation Errors ***
frigate | *************************************************************
Frigate stats
No response
Operating system
Debian
Install method
Docker Compose
Coral version
CPU (no coral)
Any other information that may be helpful
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (9 by maintainers)
We’re not looking to support auth directly, there are many docker based solutions for reverse proxies and others to support authentication.
That being said, in 0.12 (currently in beta) the config and all logs now have secret scrubbing so that won’t be shown