[Config Support]: Docker secrets do not work #18646
-
Describe the problem you are havingHi, new user, setting up config, standard practice using docker secrets, but they do not seem to work. I found a previous discussion where it was indicated that support for secrets was added. Docs state only vars as documented can be used in config. In my testing I found that using docker secrets for If instead of docker secrets I hard code the Am I using docker secrets wrong, are they not supported, or maybe broken? Version0.15-1 Frigate config file# https://docs.frigate.video/configuration/reference/
# TODO: Is there a way to use substitutions other than documented FRIGATE_ for e.g. email and camera auth?
# https://github.com/blakeblackshear/frigate/discussions/17346
version: 0.15-1
auth:
reset_admin_password: false
mqtt:
enabled: true
host: mosquitto.home.insanegenius.net
# user: {FRIGATE_MQTT_USER}
# password: {FRIGATE_MQTT_PASSWORD}
cameras:
garage:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.24:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- path: rtsp://127.0.0.1:8554/garage
input_args: preset-rtsp-restream
roles:
- record
detect:
enabled: true
record:
enabled: true
driveway:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.5:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- path: rtsp://127.0.0.1:8554/driveway
input_args: preset-rtsp-restream
roles:
- record
detect:
enabled: true
record:
enabled: true
backyard:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.31:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- path: rtsp://127.0.0.1:8554/backyard
input_args: preset-rtsp-restream
roles:
- record
detect:
enabled: true
record:
enabled: true
frontdoor:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.4:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- audio
- path: rtsp://127.0.0.1:8554/frontdoor
input_args: preset-rtsp-restream
roles:
- record
audio:
enabled: true
detect:
enabled: true
record:
enabled: true
musicroom:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.13:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- audio
- path: rtsp://127.0.0.1:8554/musicroom
input_args: preset-rtsp-restream
roles:
- record
audio:
enabled: false
detect:
enabled: true
record:
enabled: true
livingroom:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.23:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- audio
- path: rtsp://127.0.0.1:8554/livingroom
input_args: preset-rtsp-restream
roles:
- record
audio:
enabled: false
detect:
enabled: true
record:
enabled: true
frontsteps:
enabled: true
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.25:554/axis-media/media.amp?streamprofile=detect
roles:
- detect
- audio
- path: rtsp://127.0.0.1:8554/frontsteps
input_args: preset-rtsp-restream
roles:
- record
audio:
enabled: false
detect:
enabled: true
record:
enabled: true
go2rtc:
rtsp:
username: "{FRIGATE_GO2RTC_RTSP_USERNAME}"
password: "{FRIGATE_GO2RTC_RTSP_PASSWORD}"
streams:
garage:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.24:554/axis-media/media.amp?streamprofile=record
driveway:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.5:554/axis-media/media.amp?streamprofile=record
backyard:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.31:554/axis-media/media.amp?streamprofile=record
frontdoor:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.4:554/axis-media/media.amp?streamprofile=record
musicroom:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.13:554/axis-media/media.amp?streamprofile=record
livingroom:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.23:554/axis-media/media.amp?streamprofile=record
frontsteps:
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.1.25:554/axis-media/media.amp?streamprofile=record
#genai:
# api_key: "{FRIGATE_GENAI_API_KEY}"
birdseye:
enabled: true
restream: true
record:
enabled: true
alerts:
retain:
days: 90
detections:
retain:
days: 90
notifications:
enabled: true
email: [email protected] Relevant Frigate log output2025-06-09 19:24:28.605325458 [2025-06-09 12:24:28] ffmpeg.frontdoor.audio ERROR : [tcp @ 0x5ddcde164200] Port missing in uri
2025-06-09 19:24:28.605346810 [2025-06-09 12:24:28] ffmpeg.frontdoor.audio ERROR : [in#0 @ 0x5ddcde162d40] Error opening input: Invalid argument
2025-06-09 19:24:28.605367612 [2025-06-09 12:24:28] ffmpeg.frontdoor.audio ERROR : Error opening input file rtsp://*:*@192.168.1.4:554/axis-media/media.amp?streamprofile=detect.
2025-06-09 19:24:28.605385138 [2025-06-09 12:24:28] ffmpeg.frontdoor.audio ERROR : Error opening input files: Invalid argument Relevant go2rtc log outputna Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandnetworks:
public_network:
name: ${PUBLIC_NETWORK_NAME}
external: true
local_network:
name: ${LOCAL_NETWORK_NAME}
external: true
secrets:
frigate_rtsp_password:
file: ${SECRETS_DIR}/frigate_rtsp_password.txt
services:
# https://docs.frigate.video/frigate/installation
# https://github.com/blakeblackshear/frigate
frigate:
image: ghcr.io/blakeblackshear/frigate:stable # stable-h8l
container_name: frigate
hostname: frigate
domainname: ${DOMAIN_NAME}
restart: unless-stopped
user: root
shm_size: 2g
#devices:
# https://coral.ai/software/#debian-packages
# https://github.com/google/gasket-driver
# - /dev/apex_0
# - /dev/apex_1
# https://github.com/hailo-ai/hailort-drivers
# https://github.com/blakeblackshear/frigate/blob/dev/docker/hailo8l/user_installation.sh
# - /dev/hailo0
environment:
- TZ=${TZ}
- FRIGATE_RTSP_USER=viewer
- FRIGATE_RTSP_PASSWORD=Password1 #/run/secrets/frigate_rtsp_password
- FRIGATE_GO2RTC_RTSP_USERNAME=viewer
- FRIGATE_GO2RTC_RTSP_PASSWORD=Password1 #/run/secrets/frigate_rtsp_password
volumes:
- ${APPDATA_DIR}/frigate/config:/config
- ${APPDATA_DIR}/frigate/data:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 2g
#ports:
# - 5000:5000 # Unauthenticated
# - 8971:8971 # Authenticated
# - 8554:8554 # RTSP feeds
# - 8555:8555/tcp # WebRTC over tcp
# - 8555:8555/udp # WebRTC over udp
networks:
public_network:
ipv4_address: ${FRIGATE_IP}
mac_address: ${FRIGATE_MAC}
local_network:
labels:
- traefik.enable=true
- traefik.http.routers.frigate.rule=HostRegexp(`^frigate${DOMAIN_REGEX}$$`)
- traefik.http.services.frigate.loadbalancer.server.scheme=https
- traefik.http.services.frigate.loadbalancer.server.port=8971
secrets:
- frigate_rtsp_password Object DetectorCPU (no coral) Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The docker secret file has to be capitalized, it is definitely working as the implementation has not changed since it was implemented. You can get a shell in the container and run this python to match what should be seen from pathlib import Path
if os.path.isdir("/run/secrets"):
for secret_file in os.listdir("/run/secrets"):
if secret_file.startswith("FRIGATE_"):
print(f"found secret as {secret_file} with value {Path(os.path.join("/run/secrets", secret_file)).read_text() |
Beta Was this translation helpful? Give feedback.
This is generally all done with docker, so you would run
printf "my super secret password" | docker secret create FRIGATE_RTSP_PASSWORD -
and then that variable would be available to you in the container