[Support] Nginx Proxy Manager (NPM) Official


31 posts in this topic Last Reply

Recommended Posts

5 hours ago, jackwan1 said:

when I tried to do the same for others, I do not get the steams. 

Did you enable cache assets? (you should not)

 

Your said RTSP. Doesn't it use Port 554? NPM listens only to port 80 and 443. If NPM should listen to 554 you need to:

- open the port 554 on your router with NPM as your target

- open the advanced config tab of the proxy host and add the following rule:

listen 554;

 

If this does not work we need to check the nginx.conf. This the nginx conf, created by NPM if no option has been enabled:

# ------------------------------------------------------------
# example.com
# ------------------------------------------------------------
server {
  set $forward_scheme http;
  set $server         "127.0.0.1";
  set $port           80;
  listen 80;
listen [::]:80;
  server_name example.com;

access_log /data/logs/proxy-host-2_access.log proxy;
  error_log /data/logs/proxy-host-2_error.log warn;
  location / {
    
    
    # Proxy!
    include conf.d/include/proxy.conf;
  }
  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}

As you can see it includes "/data/nginx/custom/server_proxy.conf", but this file needs to be created by the user. So it adds nothing. And it includes "conf.d/include/proxy.conf" which contains the following rules:

add_header       X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto  $scheme;
proxy_set_header X-Forwarded-For    $remote_addr;
proxy_set_header X-Real-IP          $remote_addr;
proxy_pass       $forward_scheme://$server:$port;

Why I'm posting this: Maybe it includes a rule or misses a rule which breaks video streaming. Try to search in the internet for an nginx.conf which works for security webcams and then we compare the rules.

Link to post

Dear @mgutt

 

I think I found a typo in your template because I don't remember in setting this folders. 

 

It seems that you set Data and Certificates to /mnt/cache/appdata instead of /mnt/user/appdata. 

My UNRAID has different cache drivers and I found the NPMO appdata in the wrong drive. LOL 

I don't know if it was something I did before and my UNRAID kept the template saved. However, I would suggest for you to double check there. 

 

Thank you again.

 

All the best,

 

Lucas

 

image.thumb.png.2f5094bff38015b7ca089f59c6de3001.png

Link to post
17 hours ago, mgutt said:

This is something which will be removed in future Unraid versions. My suggestion: Run NPM as host and run all other containers as bridge.

 

 

Ohh, thank you!.

I will redo the settings with your suggestions.

Should I set "Privileged" on in the NPM?

 

I forgot HOST network provides the UNRAID server IP to the docker. 

I will follow your Plex suggestion @mgutt making a new bridge network and add it to the NPM. I think it is the safe way to go.

 

Thank you very much for your time and dedication. Your work is awesome.

 

Lucas

 

Edited by DrLucasMendes
Link to post
1 hour ago, Candle said:

How do we use "host" if that is the right way to do it?

Both methods work, but with host it's more stable in an ipv6 network. I tried to use the custom network solution with ipv6, but it fails if my router gets a new ipv6 prefix. Sadly it's not possible to create custom networks with "dynamic" ipv6 prefixes or automatically update the fixed ipv6 of a container.

 

I will update my post and show the "host" method.

Link to post
On 8/2/2021 at 12:05 AM, mgutt said:

Did you enable cache assets? (you should not)

 

Your said RTSP. Doesn't it use Port 554? NPM listens only to port 80 and 443. If NPM should listen to 554 you need to:

- open the port 554 on your router with NPM as your target

- open the advanced config tab of the proxy host and add the following rule:

 





listen 554;

 

If this does not work we need to check the nginx.conf. This the nginx conf, created by NPM if no option has been enabled:





# ------------------------------------------------------------
# example.com
# ------------------------------------------------------------
server {
  set $forward_scheme http;
  set $server         "127.0.0.1";
  set $port           80;
  listen 80;
listen [::]:80;
  server_name example.com;

access_log /data/logs/proxy-host-2_access.log proxy;
  error_log /data/logs/proxy-host-2_error.log warn;
  location / {
    
    
    # Proxy!
    include conf.d/include/proxy.conf;
  }
  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}

As you can see it includes "/data/nginx/custom/server_proxy.conf", but this file needs to be created by the user. So it adds nothing. And it includes "conf.d/include/proxy.conf" which contains the following rules:





add_header       X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto  $scheme;
proxy_set_header X-Forwarded-For    $remote_addr;
proxy_set_header X-Real-IP          $remote_addr;
proxy_pass       $forward_scheme://$server:$port;

Why I'm posting this: Maybe it includes a rule or misses a rule which breaks video streaming. Try to search in the internet for an nginx.conf which works for security webcams and then we compare the rules.

 

Dear @mgutt

 

Thank you for your help.

Did a little research on the net and found 

NGINX RTMP Streaming Server Installation Guide (bartsimons.me)

perhaps that is the way to go. because right now nginx proxy manager (as I know and my host setup) can handle http(s) very well, but it is lacking of ability to handle streaming service in h.264 or h.265 format and the newer cameras and nvrs are no longer use RTSP streaming in their app. If I go with the installation of RTMP streaming server, what should I do with the nginx config in the proxy manager? do I add the "rtmp" set of the config in the "advanced" section?  

 

Edited by jackwan1
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.