Support Downloads Community

UniFi Video is an obsolete product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

UISP - Reverse Proxy


This article guides the reader through installing UISP behind a proxy server. It covers two major proxy servers: Nginx and Apache.

Table of Contents

  1. Introduction
  2. UISP Installation Parameters
  3. Nginx config
  4. Apache config
  5. Related Articles


Back to Top

Often times your network infrastructure can be set so that you need to run your UISP server behind a proxy. In that case, it is necessary to set up the proxy correctly and install UISP with a specific set of parameters. In this article, we will cover the two most common proxy servers Nginx and Apache. 

UISP Installation Parameters

Back to Top

Please note that basic installation of UISP includes a pre-configured Nginx 

curl -fsSL | sudo bash -s - --public-https-port 443 --http-port 8080 --https-port 8443

Nginx config

Back to Top

This configuration example works if UISP runs on the same server. If you have UISP on a different one please replace all instances of 'localhost' with IP address of that server.

change server_name, ssl_certificate, ssl_certificate_key and proxy_pass to match your environment

map $http_upgrade $connection_upgrade {
  default upgrade;
  ''      close;

server {
  listen 80;

  client_max_body_size 4G;

  location / {
    proxy_redirect off;
    proxy_set_header Host $host;

server {
  listen 443 ssl http2;

  ssl_certificate     /etc/letsencrypt/live/;
  ssl_certificate_key /etc/letsencrypt/live/;

  ssl on;

  set $upstream;

  location / {
    proxy_pass     https://$upstream;
    proxy_redirect https://$upstream https://$server_name;

    proxy_cache off;
    proxy_store off;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_read_timeout 36000s;

    proxy_set_header Host $http_host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Referer "";

    client_max_body_size 0;

Apache config

Back to Top

change ServerName, SSLCertificateFile and SSLCertificateKeyFile to match your environment

  ProxyPreserveHost On
  ProxyPass /
  ProxyPassReverse /
  ProxyRequests Off
  ProxyPreserveHost On
  SSLEngine on
  SSLCertificateFile /etc/letsencrypt/live/
  SSLCertificateKeyFile /etc/letsencrypt/live/
  SSLProxyEngine On
  SSLProxyVerify none
  SSLProxyCheckPeerCN off
  SSLProxyCheckPeerExpire off
  SSLProxyCheckPeerName off
  RewriteEngine on
  RewriteCond %{HTTP:Connection} Upgrade [NC]
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteRule /(.*) wss://$1 [P,L]
  ProxyPass /
  ProxyPassReverse /

Related Articles

Back to Top

UISP - Installation Guide

Was this article helpful?
15 out of 29 found this helpful