[Support]: Instructions for adding a nginx reverse proxy with ssl+auth
See original GitHub issueDescribe the problem you are having
Since the frigate web interface does not support ssl or auth, I am trying to setup a nginx reverse proxy on a sub-url (e.g. https://server/frigate) of an nginx instance I’m already using for other things, however I can’t get it to work. I just end up getting an empty page.
Home assistant has direct access to the frigate container on port 5000 and I don’t intend on changing that, I just want to add a way for a web browser to access frigate using ssl+auth. Ideally I’d really like to set it up at https://server/frigate instead of having nginx listen on another port and putting it at the root (e.g. https://server:10000/).
I’ve been looking through all the documentation, but I can’t find any reference to trying to do this.
Version
0.10.0-DB1255A
Frigate config file
database:
path: /db/frigate.db
mqtt:
host: mosquitto-hostname
user: mosquitto-user
password: mosquitto-password
birdseye:
mode: continuous
ffmpeg:
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -codec:a aac
objects:
track:
- person
- cat
record:
enabled: true
retain:
days: 30
events:
max_seconds: 1800
pre_capture: 15
post_capture: 15
retain:
default: 30
snapshots:
enabled: true
timestamp: true
bounding_box: true
retain:
default: 30
cameras:
Front Door:
ffmpeg:
inputs:
- path: rtsp://rtsp-user:rtsp-password@front-door-camera:554/cam/realmonitor?channel=1&subtype=0
roles:
- record
- path: rtsp://rtsp-user:rtsp-password@front-door-camera:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
detect:
width: 1280
height: 720
fps: 5
objects:
filters:
person:
mask:
- 806,0,744,370,314,380,330,0
Garage:
ffmpeg:
inputs:
- path: rtsp://rtsp-user:rtsp-password@garage-camera:554/cam/realmonitor?channel=1&subtype=0
roles:
- record
- path: rtsp://rtsp-user:rtsp-password@garage-camera:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
detect:
width: 1280
height: 720
fps: 5
objects:
filters:
person:
mask:
- 0,0,1280,0,1176,103,1129,311,900,201,0,529
car:
mask:
- 0,0,1280,0,1176,103,1129,311,900,201,0,529
track:
- person
- cat
- car
Relevant log output
N/A
FFprobe output from your camera
Metadata:
title : Media Server
Duration: N/A, start: 0.015000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 3840x2160, 20 fps, 50 tbr, 90k tbn, 40 tbc
Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp
Frigate stats
{"Front Door":{"camera_fps":5.1,"capture_pid":233,"detection_fps":0.0,"pid":230,"process_fps":5.1,"skipped_fps":0.0},"Garage":{"camera_fps":5.1,"capture_pid":236,"detection_fps":0.0,"pid":232,"process_fps":5.1,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"cpu":{"detection_start":0.0,"inference_speed":38.2,"pid":224}},"service":{"storage":{"/dev/shm":{"free":1070.0,"mount_type":"tmpfs","total":1073.7,"used":3.8},"/media/frigate/clips":{"free":2233567.6,"mount_type":"btrfs","total":6001156.7,"used":3757209.2},"/media/frigate/recordings":{"free":2233567.6,"mount_type":"btrfs","total":6001156.7,"used":3757209.2},"/tmp/cache":{"free":995.5,"mount_type":"tmpfs","total":1000.0,"used":4.5}},"temperatures":{},"uptime":46543,"version":"0.10.0-db1255a"}}
Operating system
Other Linux
Install method
Docker Compose
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
Amcrest IP8M-T2669EW-AI
Any other information that may be helpful
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (3 by maintainers)
Top GitHub Comments
It supports it. You have to insert a header to tell it to rewrite paths. Example
Ah yea, doing it at / actually ends up working. Trying to get it working under the same domain but /frigate is the problem. Making that work likely would require a frigate change so the embedded html will start at /frigate instead of /, although at this time it seems like frigate doesn’t support that. Or at least I can’t find anything that seems to be related in the frigate config docs.