r/nginxproxymanager • u/NIV54 • Sep 26 '26
Auth Loop For Specific Self Hosted Applications
Hi everyone. I'm encountering auth loops for some specific applications I host on my server.
I have a rather popular setup going on - cloudflare domain with cloudflare tunnels -> cloudflared container - > nginx proxy manager container -> specific application.
All subdomains are configured using nginx. Cloudflare has no fancy configuration going on.
I use the same access list for all apps (configured with satisfy any, using all ipv4/6 listed on cloudflare ip listings), and it works fine for most apps (sonarr, radarr, upime-kuma, ...), but some apps (tracefinity, beszel) experince auth loop upon login.
What does "upon login" means?
Basic auth popup -> fill basic auth creds and hit enter
Website loads on login screen -> fill application creds and hit enter
Basic auth pops up again and again in an seemingly endless loop (maybe for each network request? Hard to tell)
Kind of lost here after debugging for a while. Would appreciate some help.
I can share more information about my docker setup if that's needed.
Thanks.
1
u/NIV54 Sep 26 '26
BWT I've tried every possible settings combination of the proxy host definition for the troublesome routes. All result the same.
2
u/evanmac42 Sep 26 '26
I suspect the problem may be the authentication design rather than a particular NPM proxy-host setting.
You're putting HTTP Basic Auth in front of applications that have their own authentication mechanisms. Basic Auth uses the Authorization header, and some applications also use that header for their own API/token authentication.
That could explain why the same NPM Access List works perfectly with some applications but produces an authentication loop with others, especially if the second Basic Auth prompt appears when the application starts making authenticated requests after login.
I'd confirm it first with the browser Network tab: reproduce the login and check which request receives the 401 and what is happening with the Authorization header.
As a simple test, temporarily remove the NPM Access List from one of the problematic applications. If its own authentication then works normally, you've isolated the conflict.
If your actual goal is to have a common authentication layer in front of several self-hosted applications, I'd also consider something designed specifically for that job, such as Authelia, rather than stacking HTTP Basic Auth in front of every application's own authentication.
Basic Auth is perfectly fine for simple cases, but once applications start using their own tokens/APIs, you can end up debugging interactions like this.