[Support] Nginx Proxy Manager (NPM) Official


Recommended Posts

On 1/29/2024 at 3:28 PM, Necro said:

 

I guess the key sticking point for me at this part is understanding how to have the local DNS redirect work with non-standard ports on the proxy server, which I didn't think was possible.  And I didn't want to change Unraid's default port - just seems messy and has a potential to  make things confusing later w/a non-standard config if not absolutely necessary. 

 

EDIT:  Ok, I just tried something given the "Host access to custom networks" was enabled but didn't seem to be working.  I toggled Docker off, toggled that setting to disabled, toggled it to enabled, and restarted docker (applying between each step)...and all is working as expected now.  So, if someone updates and hits a problem like this try that as a solution.  Seems the setting may say enabled but actually isn't after update.

 

 

Thanks for this, I had the same experience that some services weren't able to connect anymore. This fixed it for me aswel.

Link to comment

Hi there i still have a problem to get a new cert. 
I have several hosts with certs and they work pretty fine but now i want to add a new and i get this log:

 

[3/20/2024] [8:51:40 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/12.conf
[3/20/2024] [8:51:40 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/12.conf.err
[3/20/2024] [8:51:40 PM] [Nginx    ] › ⬤  debug     Could not delete file: {
  "errno": -2,
  "code": "ENOENT",
  "syscall": "unlink",
  "path": "/data/nginx/proxy_host/12.conf.err"
}
[3/20/2024] [8:51:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[3/20/2024] [8:51:40 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[3/20/2024] [8:51:40 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload
[3/20/2024] [8:51:45 PM] [SSL      ] › ℹ  info      Requesting Let'sEncrypt certificates for Cert #21: fritz.XXXXXX.de
[3/20/2024] [8:51:45 PM] [SSL      ] › ℹ  info      Command: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-21" --agree-tos --authenticator webroot --email "[email protected]" --preferred-challenges "dns,http" --domains "fritz.XXXXXX.de" 
[3/20/2024] [8:51:45 PM] [Global   ] › ⬤  debug     CMD: certbot certonly --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --cert-name "npm-21" --agree-tos --authenticator webroot --email "[email protected]" --preferred-challenges "dns,http" --domains "fritz.XXXXXXX.de" 
[3/20/2024] [8:51:45 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/temp/letsencrypt_21.conf
[3/20/2024] [8:51:45 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[3/20/2024] [8:51:45 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[3/20/2024] [8:51:45 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload
[3/20/2024] [8:51:45 PM] [Express  ] › ⚠  warning   Saving debug log to /tmp/letsencrypt-log/letsencrypt.log
Missing command line flag or config entry for this setting:
Please choose an account
Choices: ['7c5XXXXXXXX@2024-03-05T23:43:21Z (ecd9)', '1b718XXXXXXX@2024-01-06T10:59:53Z (28dd)']
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/letsencrypt-log/letsencrypt.log or re-run Certbot with -v for more details.

 

Edited by Cryd
Link to comment

Hi, I have a problem with NPM with a combination of Authentik and Sonarr/Radarr .... when I set custom locations it goes offline... 



LOG NGINX: 
[3/27/2024] [2:56:04 PM] [Nginx    ] › ⬤  debug     Deleting file: /data/nginx/proxy_host/47.conf.err
[3/27/2024] [2:56:04 PM] [Nginx    ] › ⬤  debug     Could not delete file: {
  "errno": -2,
  "code": "ENOENT",
  "syscall": "unlink",
  "path": "/data/nginx/proxy_host/47.conf.err"
}
[3/27/2024] [2:56:04 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -t -g "error_log off;"
[3/27/2024] [2:56:04 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[3/27/2024] [2:56:04 PM] [Global   ] › ⬤  debug     CMD: /usr/sbin/nginx -s reload
 

Snímek obrazovky 2024-03-27 145907.png

Link to comment

After many issues with not being able to reach my external domains from inside my local network, I found your NPM container, which allows me to set port 443 and Host.

This solves my issue, and Nginx Reverse Proxy is working both externally and internally.

 

My idea was to set only port 443 for NPM and use port 80 for Unraid WebUI. This way I can reach my Unraid WebUI with "NAS.lan" and everything else with it's external domain/subdomain.

 

But even if I set NPM to 443 and 8080, and let Unraid WebUI use port 80. It won't start NPM:

bind() to 0.0.0.0:80 failed (98: Address already in use)

It seems like it will only use port 80 whatever I set?

 

Is this a bug?

Link to comment
2 hours ago, jockebq said:

But even if I set NPM to 443 and 8080, and let Unraid WebUI use port 80. It won't start NPM:

bind() to 0.0.0.0:80 failed (98: Address already in use)

You are probably using the host network for your container. The container setting to set the port forwarding has no meaning in this context. It is only active for the bridge network.

 

Feel free to open a feature request at the official GitHub page of NPM to request for:

- disable port 80 / http

- Request a new VARIABLE to change the default ports 80 and 443

 

And/or use the bridge network.

Link to comment
20 hours ago, jockebq said:

My idea was to set only port 443 for NPM and use port 80 for Unraid WebUI.

Port 80 needs to be assigned to NPM as well otherwise you won't be able to get letsencrypt certs with the standard method. Just put unraid somewhere else.

Link to comment
On 2/4/2024 at 8:50 PM, jdiacobbo said:

I am having this same issue. Have you figured out a solution yet? Out of curiosity, what version of unraid are you on?

 

As a note, I have set up a User Script to run daily to restart the container to hope fully prevent the issue from occurring until I can figure out the root cause.

Having the same issue.  Has anyone found a solution?

Link to comment

Hey there,

 

I'm running NPM for quite some time now, only on my internal network and only for getting certificates from lets encrypt for a registered domain. I use pihole to "redirect" my custom domainnames to npm and it all worked. Lately I tried to install authentik because I want one container accessible from outside via cloudflare tunnel. Thats where I probably fucked up something but I can't recall what I did wrong.

 

When trying to proxy authentik I always got firefox "error" : "We can’t connect to the server". So I rebooted and after most of my proxys aren't working anymore. Even NPM itself isn't reachable anymore via it's domain.   

NPM uses br0 - because I need the IP for pihole to redirect. All my other contrainers are running on a custom docker network.

 

While NPM, Authentik, photoprism and nextcloud aren't working anymore or respectively giving me a 5XX-Error or "cant connect" message adminer and vaultwarden are still running without any problems.

 

Some additional Info:

All containers a reachable via IP and are working

The CLI comannd from the 1. site of this thread  responded "host reachable"

Host access to custom networks is enabled.

 

I have no Idea what I did or what went wrong so I would appreciate your help.

 

Thanks in advance,

Flex0

 

 

 

Link to comment

I have been sticking with MacVlan for some time now, but am wanting to switch to IPvlan to see if it stops the once-a-month or so crash I am having... I don't have the skill currently to figure out WHY the crash is happening, but I do keep getting this message telling me to switch to IPvlan. 
Back when the issue (about macvlans) started, I read through the "help" and it was pretty confusing and complicated.  Since I wasn't having problems, I put it on the back burner. 

Now I am trying to switch and see that there might be some issues with which versions of what docker I use, and so on... plus my mediastack is a custom network, and the latest instructions I just read through said to put anything needing to be proxied in "BRIDGE" so I am wondering where I am gonna land there.

 

I guess, if anyone has good current info on just making the switch that might come in handy, I would appreciate it. 

-G

Link to comment
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/1.conf:134
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/27.conf:137
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/5.conf:137
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/6.conf:132
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/7.conf:132
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/8.conf:132
nginx: [warn] low address bits of 192.168.1.0/16 are meaningless in /data/nginx/proxy_host/9.conf:132
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-24/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-24/fullchain.pem, r) error:10000080:BIO routines::no such file)

I am suddenly getting this error, and now nginx does not want to start...
nginx has been running smoothly for over a year now..

 

Does anyone know what happened and how i fix this?

 

Link to comment
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-24/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-24/fullchain.pem, r) error:10000080:BIO routines::no such file)

I believe this is the real error i am dealing with, Indeed there is no directory "npm-24"

Link to comment

hey hey!

trying to improve my setup at home by adding nginx proxy manager. not interested in ipv6, public access or anything like that. i have most of my containers running on bridge and i have been accessing them on a bunch of different ports. lets take searxng as an example: 192.168.0.5:8082. 192.168.0.5 is my unraid host.

i have now npm running on br0 as 192.168.0.6. i have a pihole running on a pi and setup searxng.local to point to 192.168.0.6. works fine, get the greeting page. then i setup in npm the proxy host and point it to 192.168.0.5:8082. but then i get 502 bad gateway.

i saw in the first page that containers running on br0 cannot reach host ports. why is that?

ok, i understand that its a limitation of macvlan. so i think the easiest option for me would be to get a second nic for server and have npm use that one for itself. then i can target the original ip of my unraid box, right?

Edited by strannik
update
Link to comment

I'm so sorry to be doing this and asking what I presume is a fairly obvious answer once you know what you're doing, sadly I do not.

I use Seafile and am running into a well documented issue with 403 Forbidden CSRF cerifcation failed. 
The fix as documented here ( https://forum.seafile.com/t/solved-403-forbidden-after-upgrade-to-6-3-1/6525/5 ) is to edit the nginx config file with an entry like:

 

 

location / {
    ...
    proxy_set_header Host $host:**20080**; <-----# I am using port 20080 in my setup hence I must change this.
    ....`

 

The problem is I have no idea what config file any post is on about. In my /mnt/user/appdata/NginxProxyManager/nginx/proxy_host I can clearly tell 10.conf is the one for SeaFile, but if I add that line (it doesn't exist as standard) below location / { then I get 504 on my SeaFile host, and can't get past the login screen on NginxProxyManager WebGui

 

Would really appreciate some help as I'm pulling my uneducated hair out.

 

Thank you.

Edited by elmuziko
Link to comment
30 minutes ago, elmuziko said:

I'm so sorry to be doing this and asking what I presume is a fairly obvious answer once you know what you're doing, sadly I do not.

I use Seafile and am running into a well documented issue with 403 Forbidden CSRF cerifcation failed. 
The fix as documented here ( https://forum.seafile.com/t/solved-403-forbidden-after-upgrade-to-6-3-1/6525/5 ) is to edit the nginx config file with an entry like:

 

 

location / {
    ...
    proxy_set_header Host $host:**20080**; <-----# I am using port 20080 in my setup hence I must change this.
    ....`

 

The problem is I have no idea what config file any post is on about. In my /mnt/user/appdata/NginxProxyManager/nginx/proxy_host I can clearly tell 10.conf is the one for SeaFile, but if I add that line (it doesn't exist as standard) below location / { then I get 504 on my SeaFile host, and can't get past the login screen on NginxProxyManager WebGui

 

Would really appreciate some help as I'm pulling my uneducated hair out.

 

Thank you.

 

Fixed this by going into /user/seafile/nginx/conf/seafile.nginx.conf and making the change there, as well as changing

 

proxy_set_header X-Forwarded-Proto $scheme;

 

to

 

proxy_set_header X-Forwarded-Proto https;

 

as documented here: https://github.com/ggogel/seafile-containerized/issues/138#issuecomment-1833473401

 

Apologies for the thread hack!

Link to comment

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.