No Live Video from Frigate when accessing thorugh Reverse Proxy

I’m currently trying to understand the following problem:

I have frigate server running under http://nas.lan:30158 with the following configuration:

mqtt:
  enabled: true
  host: 192.168.1.206
  port: 1883
  user: frigate
  password: dd
tls:
  enabled: false
detectors:
  ov:
    type: openvino
    device: CPU
model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
record:
  enabled: true
  retain:
    days: 3
    mode: all
  alerts:
    retain:
      days: 7
  detections:
    retain:
      days: 7
snapshots:
  enabled: true
  retain:
    default: 30
go2rtc:
  streams:
    stall:
      - ffmpeg:rtsp://camera:[email protected]:554/stream1
      - ffmpeg:stall#audio=opus
    garten:
      - ffmpeg:rtsp://camera:[email protected]:554/stream1
      - ffmpeg:stall#audio=opus
  webrtc:
    candidates:
      - 192.168.1.7:30161
      - stun:30161
cameras:
  stall: # <------ Name the camera
    enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/stall # <--- the name here must match the name of the camera in restream
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    detect:
      enabled: false # <---- disable detection until you have a working camera feed
      width: 1280
      height: 720
  garten: # <------ Name the camera
    enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/garten # <--- the name here must match the name of the camera in restream
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 1280
      height: 720

    motion:
      threshold: 40
      contour_area: 15
      improve_contrast: 'true'
      mask:
        - 0.311,0.04,0.311,0,0,0.002,0,0.038
        - 0.765,0.166,0.882,0.188,0.858,0.536,0.753,0.427
version: 0.15-1

I then use the Frigate integration into Home Assistant. Furthermore, I access Home Assistant through a reverse proxy. Everything works, except that when I access my Home Assistant from outside my local network, I can not get live video to work. It works however when I’m in the same network.

So it seems that somehow the UI tries to create a connection that is not open on my router (or reverse proxy setup).

Can someone help me out and let me know what might be causing this?

Can you provide your reverse proxy configuration, omitting personal information of cause.

Have you setup a reverse proxy just for HA or have you also created a configuration for Frigate as well?

Using unusual ports can also causes issues when it comes to getting a reserve proxy to work as expected. In the case of Frigate you have an additional reverse proxy in play, so have you have to be even more careful.

I’m using frigate as a Truenas Scale App and Home Assistant as a VM on the same system.

As a reverse proxy manger, I use Nginx Proxy Manager and the reverse Proxy for Home Assistant looks like this:


And no further custom config.

The Frigate App on Truenas is configured (Port-wise) like this:

Maybe it’s a mismatch between the ports somewhere? But then I wonder why this works if my client is in the same network as the frigate server. I suspect that somewhere there is a direct connection established between the Home Assistant UI and the Frigate server, that is not running through the reverse proxy for some reason. I just can not figure out where this might happen.

Have you configured a bridge on your TrueNAS? If not, you may need a bridge so the VM and apps hosted on TrueNAS can communicate with each other.

Yes I have. Multiple Apps already can talk to another without a problem. The Nginx Proxy is for example also running as an app, and it can reach all other apps and the VM without a problem.

Pretty sure you need to proxy this or open a port.

Frigate and the associated cameras are not accessible outside your network because there is no way for connection to come in

Finally, I solved this.

I went to vivaldi:webrtc-internals (or chrome if you are using that) and created a dump so that I can see the connection details.

Turns out, that needing a port-forward was the correct idea :slight_smile:

In this case, I needed to forward port 30161 on my router to port 30161 on my Truenas machine, which then gets mapped to the 8555 port in the docker container.

The documentation here Live View | Frigate actually states that, but got me all confused because port 8555 is mapped in my setup and I never saw it.

Anyhow, thanks for all your help, I really appreciate it.