[Support] Nginx Proxy Manager (NPM) Official


32 posts in this topic Last Reply

Recommended Posts

Overview: Support for the Nginx Proxy Manager (NPM) Official docker container

Docker: https://hub.docker.com/r/jc21/nginx-proxy-manager

Github: https://github.com/jc21/nginx-proxy-manager

 

This is the official Nginx Proxy Manager container which needs an external database like MariaDB. Its advantage compared to the version of jlesage / Djoss is the support of IPv6 on ports 80 and 443.*

 

Donate? 🤗

 

*jlesage's docker has an open issue regarding this.

Link to post
  • 2 weeks later...

How I'm using this container:

 

1.) Enable "Preserve user defined networks" in the docker settings:

image.png.1afb8dab6c8e7cb1bd6e04cd57b3bbec.png

 

2.) Open the WebTerminal >_ and execute the following to create a new bridge network with the name "npm":

docker network create --driver=bridge --subnet=172.19.0.0/24 npm

 

3.) Install the MariaDB Official Container, choose the "npm" network and set a fixed ip, database name to "npm", user to "npm" and a password:

517138793_2021-07-0211_21_21.png.1f820d3338cb878729c52e074ef5f9ca.png

 

4.) Install the Nginx Proxy Manager Official Container, enable "Advanced View" and remove the hashtag to enable connection to the "npm" network:

image.png.b5dc1c03cc48c6363497da11080d61e4.png

 

Choose the "br0" network and set a fixed IPv4 (and IPv6 IP address if needed):

image.thumb.png.fb4aed1a188e9435f8c10588161dc8b4.png

 

Set MariaDB IP and password:

image.png.d8285d2c1ec05bc95f2d821a00f48ef3.png

 

5.) Open the WebGUI and after changing the login, you can add a proxy host (see next post for Plex as an example).

 

6.) Add port forwarding on port 80 and 443 in your router for the IPv4 (and IPv6) address of your NPM container:

image.png.926e9cd436625ef1e1f896a6a5605d9d.png

 

7.) Change the order of both containers so the MariaDB container is on top and by that executed before the NPM Container (on server reboot):

1398409919_2021-07-0211_30_58.thumb.png.4777d142b7b61aaf9498e15fa90e819e.png

 

 

 

Link to post

Adding Plex to Nginx Proxy Manager Official:

 

1.) Change the network of your Plex Container to "npm" and set a fixed IP address:

image.png.a265545084b64fddc8ffb3c5a467f892.png

 

2.) Plex Settings > Remote Access > Disable Remote Access (this forces Plex to use https://plex.example.com/ instead of https://49-243-220-22.48abf8487edc9d743c.plex.direct:32400/ )

image.png.5276cd5421ea0ed78c0a0ea2306a629b.png

 

3.) Plex Settings > Network > Set your domain and your unraid server IP as your "Own URLs":

image.png.50a2f9d9690020313898603b058018a1.png

 

By that your domain is used for external access and your unraid server ip is used for local access.

 

4.) Add a new proxy host in Nginx Proxy Manager for your domain which targets the fixed IP of your Plex container and enable Websockets:

 

image.png.df83afbd8a3a70e80cd196f822f91192.png

 

5.) Request an SSL certificate and force SSL:

image.png.b999166463be561634b1c00fe334bd2c.png

 

Link to post
16 hours ago, Mentox said:

what is the reason for using MariaDB instead of SQLite?

No joke: I missed this part in the docs:

Quote

 

# If you would rather use Sqlite uncomment this

      # and remove all DB_MYSQL_* lines above

      # DB_SQLITE_FILE: "/data/database.sqlite"

 

 

I will update the container and remove the external DB. SQLite is the easier option for the user.

Link to post
Posted (edited)
On 7/5/2021 at 2:38 AM, mgutt said:

will update the container and remove the external DB. SQLite is the easier option for the user.

 

Looking forward to have the SQLITE as default in your NPM Docker.

 

All the best,

 

Lucas

 

 

 

 

 

Edited by DrLucasMendes
Link to post
31 minutes ago, mgutt said:

 

 

Done 😉

 

Perfect, was waiting for this.

 

I'm going to migrate over to the official docker container this weekend (time permitting)

Appreciate you putting this together for us. 

Link to post
4 hours ago, Tucubanito07 said:

What is the difference between this container and the jlesage and djoss? 

It can listen on Port 80 and 443 which is a requirement for IPv6.

Link to post
13 hours ago, CorneliousJD said:

Perfect, was waiting for this.

 

I'm going to migrate over to the official docker container this weekend (time permitting)

Appreciate you putting this together for us. 

 

Likewise 

 

Thank you @mgutt !!!

 

Link to post
Posted (edited)

Ty for creating this!

 

I attempted to migrate from previous docker, expected my custom nginx configuration to work (not overly custom).  One aspect is geoip2 but I am getting error in logs saying geoip directive is not recognized.  Thought it was for the most part all using the same source?

 

UPDATE: Decided to look at the dockerfile and can see they both use different repositories and docker build files.  

Edited by Wingede
Update
Link to post
1 hour ago, Wingede said:

geoip2

Wouldn't it be possible to add the allowed IP ranges through the advanced settings of a proxy host?

Link to post

Very interested in this..

 

does this do the same as Swagg but using a UI?

 

if so how hard would it be migrating from swagg to this docker? I already have a custom network set-up and have 6-7 sub domains set-up that point to various containers on my server.

Edited by enigma27
Link to post
3 hours ago, enigma27 said:

does this do the same as Swagg but using a UI?

In most parts. NPM does not have plugins like geo IP blocking. Feel free to test it with a new subdomain.

Link to post

If you wanted to use the MariaDB option still, you can remove the `DB_SQLITE_FILE` variable and re-add the variables: `DB_MYSQL_HOST`,  `DB_MYSQL_PORT`, `DB_MYSQL_USER`, `DB_MYSQL_PASSWORD`, `DB_MYSQL_NAME`. I just set this up (I already had MariaDB setup for other things and wanted to keep everything in one place) and so far it's working.

Link to post
  • 2 weeks later...

Can you update the instructions without the MariaDB piece?

Not getting this to actually work with my hosts, getting a 502 Bad Gateway openresty error. Had it working fine previously with the other NPM Docker.

 

edit: Fixed it, for some reason my dockers were not talking to each other, had to disable then reenable the setting under Docker.

Edited by Candle
Link to post

Reverse Proxy Docker container (Bitwarden) in network bridge on port 8080 not working. 

 

Dear friends, I finally was able to migrate. I was having a huge problem with Bitwarden (from: vaultwarden/server). 

I still don't know if it is something on my system or on NPMO.

 

My Docker in BW is set on bridge and NPMO is in network br0.

NPMO is using SQLite

 

image.png.138459c86cd5dd442ebb49a307a25172.png

 

When I added my proxy settings, as below, however it did not work. (it used to work with jlesage version). (I changed my real domain to mydomain.com for the screenshots).

 

image.png.0d5aa95be3e8abc481d709ee44e10352.pngimage.png.b8c94f017c7e37b414d2194981f57cb2.png

image.png.9cec0f0756e0141f62e241f408965359.png

 

 

 

 

 

To make it work, I had to add "bridge" network as Post Arguments in the advanced view of NMPO. And  had to use the internal IP of BW and port 80.

 

image.png.2b6ff4e646b7f528fdeded94171f8708.png

 

image.png.298bfd28d0668455cef30ed0700e5432.pngimage.png.2bee92c90142413637e6b588c7acd874.png

 

 

My question is:

 

Am I missing some somthing on my UNRAID server to make NMPO in br0 to have access to the 192.168.100.250:8080 or is something wrong with NPMO that it does not accept port 8080 as the Forward Port? 

 

Thank you in advance,

 

Lucas

 

 

 

 

 

 

Link to post
26 minutes ago, DrLucasMendes said:

Reverse Proxy Docker container (Bitwarden) in network bridge on port 8080 not working. 

 

Dear friends, I finally was able to migrate. I was having a huge problem with Bitwarden (from: vaultwarden/server). 

I still don't know if it is something on my system or on NPMO.

 

My Docker in BW is set on bridge and NPMO is in network br0.

NPMO is using SQLite

 

image.png.138459c86cd5dd442ebb49a307a25172.png

 

When I added my proxy settings, as below, however it did not work. (it used to work with jlesage version). (I changed my real domain to mydomain.com for the screenshots).

 

image.png.0d5aa95be3e8abc481d709ee44e10352.pngimage.png.b8c94f017c7e37b414d2194981f57cb2.png

image.png.9cec0f0756e0141f62e241f408965359.png

 

 

 

 

 

To make it work, I had to add "bridge" network as Post Arguments in the advanced view of NMPO. And  had to use the internal IP of BW and port 80.

 

image.png.2b6ff4e646b7f528fdeded94171f8708.png

 

image.png.298bfd28d0668455cef30ed0700e5432.pngimage.png.2bee92c90142413637e6b588c7acd874.png

 

 

My question is:

 

Am I missing some somthing on my UNRAID server to make NMPO in br0 to have access to the 192.168.100.250:8080 or is something wrong with NPMO that it does not accept port 8080 as the Forward Port? 

 

Thank you in advance,

 

Lucas

 

 

 

 

 

 

This is the fix (I had the same issue).

 

Stop all your dockers.


Go to settings > dockers > enable "no"

 

Wait for that to turn off

 

Change "Host access to custom networks:" to off. Apply

Change "Host access to custom networks:" to On. Apply

 

Turn docker back on, try again.

 

 

 

Link to post

Hello,

I hope I am on the right thread, if not, free to move me around.

I am new to NPM, however, I have made 7 proxy hosts already and most of them are working including all web server redirects using "A" or "CNAME".

I have a problem to set up proxy for camera streaming.

I was successful streaming an old Foscam camera by simply set the IP and port XXX. For all newer cameras or nvrs where http webserver and the image streaming (in onvif or rtsp format), I am not getting it. I am using an app called "IP CAM Viewer" and in that, I could easily view the camera by defining the http port(port forwarding and ddns), id and password to view the cameras. With the reverse proxy server, I can define the dn and port 80 to be redirected for the Foscam Camera, however, when I tried to do the same for others, I do not get the steams. 

 

Any help is appreciated.

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.