ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Working Unifi UNVR NGINX Config

    IT Discussion
    5
    10
    671
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NashBrydgesN
      NashBrydges
      last edited by

      As the title says, I am trying to setup UNVR behind NGINX and wonder if anyone has a working config. I can get the webUI to show up but livestream or video playback is not working. My google-fu is failing me in trying to find which ports need to be part of my config.

      travisdh1T dbeatoD 2 Replies Last reply Reply Quote 0
      • travisdh1T
        travisdh1 @NashBrydges
        last edited by

        @nashbrydges said in Working Unifi UNVR NGINX Config:

        As the title says, I am trying to setup UNVR behind NGINX and wonder if anyone has a working config. I can get the webUI to show up but livestream or video playback is not working. My google-fu is failing me in trying to find which ports need to be part of my config.

        I'm just assuming you've already seen Ubiquiti's documentation? https://help.ui.com/hc/en-us/articles/217875218-UniFi-Video-Ports-Used

        NashBrydgesN 1 Reply Last reply Reply Quote 0
        • NashBrydgesN
          NashBrydges @travisdh1
          last edited by

          @travisdh1 I did, yes, however this was at the top of the page which prompted me to come here...

          29010c92-50ca-4ba4-9c11-bcb4db322733-image.png

          K 1 Reply Last reply Reply Quote 1
          • K
            krzykat @NashBrydges
            last edited by

            @nashbrydges If they're done with it ... wish they'd release their NVR as open source and let others use and update it.

            1 Reply Last reply Reply Quote 2
            • F
              flaxking
              last edited by

              RTSP... I believe you need Nginx Plus you're wanting to do something other than HTTP

              F 1 Reply Last reply Reply Quote 0
              • F
                flaxking @flaxking
                last edited by

                @flaxking said in Working Unifi UNVR NGINX Config:

                RTSP... I believe you need Nginx Plus you're wanting to do something other than HTTP

                Assuming RTSP isn't required, I'm guessing you need to enable the video connection for webrtc, which I think is just a one liner in nginx

                F 1 Reply Last reply Reply Quote 0
                • F
                  flaxking @flaxking
                  last edited by

                  @flaxking said in Working Unifi UNVR NGINX Config:

                  @flaxking said in Working Unifi UNVR NGINX Config:

                  RTSP... I believe you need Nginx Plus you're wanting to do something other than HTTP

                  Assuming RTSP isn't required, I'm guessing you need to enable the video connection for webrtc, which I think is just a one liner in nginx

                  This maybe?

                  proxy_set_header Connection "Upgrade";
                  
                  1 Reply Last reply Reply Quote 0
                  • dbeatoD
                    dbeato @NashBrydges
                    last edited by

                    @nashbrydges I setup two configurations, one for Port 7443 through HTTPS and another with port 7446 which is for video playing.

                    dbeatoD 1 Reply Last reply Reply Quote 0
                    • dbeatoD
                      dbeato @dbeato
                      last edited by

                      @dbeato The configuration I have is below:

                      Web UI

                      server {
                      client_max_body_size 40M;
                      server_name dvr2.domain.com;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header Host $http_host;
                      proxy_set_header X-NginX-Proxy true;
                      location / {
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header Host $http_host;
                      proxy_set_header X-NginX-Proxy true;
                      proxy_pass https://dvr.domain.com:7443/;
                      proxy_redirect https://dvr.domain.com:7443/ /;
                      proxy_read_timeout 60s;
                       # Socket.IO Support
                      proxy_http_version 1.1;
                      proxy_set_header Upgrade $http_upgrade;
                      proxy_set_header Connection "upgrade";
                      }
                      

                      Video Playing

                      server {
                      client_max_body_size 40M;
                      server_name dvr2.domain.com;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header Host $http_host;
                      proxy_set_header X-NginX-Proxy true;
                      location / {
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header Host $http_host;
                      proxy_set_header X-NginX-Proxy true;
                      proxy_pass https://dvr.domain.com:7446/;
                      proxy_redirect https://dvr.domain.com:7446/ /;
                      proxy_read_timeout 60s;
                       # Socket.IO Support
                      proxy_http_version 1.1;
                      proxy_set_header Upgrade $http_upgrade;
                      proxy_set_header Connection "upgrade";
                      
                      add_header Access-Control-Allow-Origin *;
                      add_header Access-Control-Max-Age 3600;
                      add_header Access-Control-Expose-Headers Content-Length;
                      add_header Access-Control-Allow-Headers Range;
                      }
                      
                      NashBrydgesN 1 Reply Last reply Reply Quote 1
                      • NashBrydgesN
                        NashBrydges @dbeato
                        last edited by

                        @dbeato Thanks. I'll give this a try over the weekend.

                        1 Reply Last reply Reply Quote 1
                        • 1 / 1
                        • First post
                          Last post