[GH-ISSUE #313] Two-Factor Auth #279

Closed
opened 2026-02-26 06:31:59 +03:00 by kerem · 39 comments
Owner

Originally created by @meichthys on GitHub (Mar 2, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/313

Two-Factor authorization would be a very welcomed feature in my book.

To be able to log into nginx-proxy-manager via 2FA as well as being able to provide 2FA for access to hosts - this would vastly improve the security of less secure or non-secure applications hiding behind the nginx proxy.

Something like Authelia should provide a good starting point.

Originally created by @meichthys on GitHub (Mar 2, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/313 Two-Factor authorization would be a very welcomed feature in my book. To be able to log into nginx-proxy-manager via 2FA as well as being able to provide 2FA for access to hosts - this would vastly improve the security of less secure or non-secure applications hiding behind the nginx proxy. Something like [Authelia](https://docs.authelia.com/deployment/supported-proxies/nginx.html) should provide a good starting point.
kerem 2026-02-26 06:31:59 +03:00
Author
Owner

@arejaytee commented on GitHub (Mar 8, 2020):

+1 on this or implementing https://github.com/jc21/nginx-proxy-manager/issues/137

<!-- gh-comment-id:596187694 --> @arejaytee commented on GitHub (Mar 8, 2020): +1 on this or implementing https://github.com/jc21/nginx-proxy-manager/issues/137
Author
Owner

@Rami-Pastrami commented on GitHub (Mar 21, 2020):

Noting https://github.com/authelia/authelia for being maintained actively currently, and having more features

<!-- gh-comment-id:602071203 --> @Rami-Pastrami commented on GitHub (Mar 21, 2020): Noting https://github.com/authelia/authelia for being maintained actively currently, and having more features
Author
Owner

@KamistixX commented on GitHub (Apr 15, 2020):

Authelia integration would be a massive feature

<!-- gh-comment-id:614329472 --> @KamistixX commented on GitHub (Apr 15, 2020): Authelia integration would be a massive feature
Author
Owner

@james-d-elliott commented on GitHub (May 1, 2020):

One of the maintainers of Authelia here. We'd be willing to do some form of collab to help with this. Particularly with the access to the hosts section as that is the easiest part. I also think this would actually address a few of your issues all at once (I'll try to compile a list later and the reasons why).

Ideally if we did it I think the ideal place to do it is in the access tab as an alternate provider to the HTTP basic auth. Also it shouldn't be limited to Authelia in my opinion, people should be able to configure all aspects of the ngx_http_auth_request_module.

Authelia docs.

<!-- gh-comment-id:622602776 --> @james-d-elliott commented on GitHub (May 1, 2020): One of the maintainers of Authelia here. We'd be willing to do some form of collab to help with this. Particularly with the access to the hosts section as that is the easiest part. I also think this would actually address a few of your issues all at once (I'll try to compile a list later and the reasons why). Ideally if we did it I think the ideal place to do it is in the access tab as an alternate provider to the HTTP basic auth. Also it shouldn't be limited to Authelia in my opinion, people should be able to configure all aspects of the [ngx_http_auth_request_module](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html). [Authelia docs](https://docs.authelia.com/deployment/supported-proxies/nginx.html).
Author
Owner

@KittyKatt commented on GitHub (May 7, 2020):

This would actually bring me back to nginx-proxy-manager over some other solution as there's no other solution with as easy of a point and click interface as this, but vanilla nginx supports this with Authelia's guide so I've been sticking with that.

<!-- gh-comment-id:625006143 --> @KittyKatt commented on GitHub (May 7, 2020): This would actually bring me back to nginx-proxy-manager over some other solution as there's no other solution with as easy of a point and click interface as this, but vanilla nginx supports this with Authelia's guide so I've been sticking with that.
Author
Owner

@Rami-Pastrami commented on GitHub (May 20, 2020):

TBH I would even be happy for a guide to add Authelia to NginxProxyManager

<!-- gh-comment-id:631757933 --> @Rami-Pastrami commented on GitHub (May 20, 2020): TBH I would even be happy for a guide to add Authelia to NginxProxyManager
Author
Owner

@lazee486 commented on GitHub (May 30, 2020):

+1 I opened a request for voucher-proxy or keycloak before I found this one, but any route he goes with I'd be willing to try :) his interface is one of the best I've found for homelab!

<!-- gh-comment-id:636289075 --> @lazee486 commented on GitHub (May 30, 2020): +1 I opened a request for voucher-proxy or keycloak before I found this one, but any route he goes with I'd be willing to try :) his interface is one of the best I've found for homelab!
Author
Owner

@zero77 commented on GitHub (Nov 25, 2020):

Google provide a 2FA module that can be integrated with protocols like SSH and OpenVPN.
https://github.com/google/google-authenticator-libpam

<!-- gh-comment-id:733677574 --> @zero77 commented on GitHub (Nov 25, 2020): Google provide a 2FA module that can be integrated with protocols like SSH and OpenVPN. https://github.com/google/google-authenticator-libpam
Author
Owner

@joe307bad commented on GitHub (Dec 6, 2020):

Keycloak works with nginx-proxy-manager!

<!-- gh-comment-id:739553037 --> @joe307bad commented on GitHub (Dec 6, 2020): [Keycloak works with `nginx-proxy-manager`!](https://github.com/jc21/nginx-proxy-manager/pull/753#issuecomment-739552690)
Author
Owner

@joe307bad commented on GitHub (Dec 6, 2020):

Here is also a good tutorial on getting nginx-proxy-manager secured with Authelia.

<!-- gh-comment-id:739553232 --> @joe307bad commented on GitHub (Dec 6, 2020): [Here is also a good tutorial](https://github.com/ibracorp/authelia) on getting `nginx-proxy-manager` secured with Authelia.
Author
Owner

@jeremy-chua commented on GitHub (May 22, 2021):

IMHO, integration with most IdP will address this. SAML2 will be a common use case.
I'm using Azure AD for my hosted applications. MFA can be configured in Azure AD. I believe it will be similar for all IdP.

<!-- gh-comment-id:846366356 --> @jeremy-chua commented on GitHub (May 22, 2021): IMHO, integration with most IdP will address this. SAML2 will be a common use case. I'm using Azure AD for my hosted applications. MFA can be configured in Azure AD. I believe it will be similar for all IdP.
Author
Owner

@apainter2 commented on GitHub (May 27, 2021):

I too would love to see NPM support Google Authenticator/2FA.

Especially as I have NPM internet facing on a hosted VPS.

<!-- gh-comment-id:849532194 --> @apainter2 commented on GitHub (May 27, 2021): I too would love to see NPM support Google Authenticator/2FA. Especially as I have NPM internet facing on a hosted VPS.
Author
Owner

@kennylajara commented on GitHub (Jun 21, 2021):

Is possible to make use of this Authenticator API implementation to easily integrate:
https://github.com/infiniteloopltd/AuthenticatorAPI.com

<!-- gh-comment-id:865330992 --> @kennylajara commented on GitHub (Jun 21, 2021): Is possible to make use of this Authenticator API implementation to easily integrate: https://github.com/infiniteloopltd/AuthenticatorAPI.com
Author
Owner

@meichthys commented on GitHub (Mar 12, 2022):

@kennylajara could you share how you implemented this?

<!-- gh-comment-id:1065937770 --> @meichthys commented on GitHub (Mar 12, 2022): @kennylajara could you share how you implemented this?
Author
Owner

@rickgitdone commented on GitHub (May 19, 2023):

I also found this on git .. allows 2FA for any Web App.. Integration with any of these into one is a goal I am looking for ...
https://github.com/Arno0x/TwoFactorAuth

<!-- gh-comment-id:1554547876 --> @rickgitdone commented on GitHub (May 19, 2023): I also found this on git .. allows 2FA for any Web App.. Integration with any of these into one is a goal I am looking for ... https://github.com/Arno0x/TwoFactorAuth
Author
Owner

@LiaraAlis commented on GitHub (Aug 15, 2023):

I think this is a very important feature. From my point of view this feature should be prioritized higher.

<!-- gh-comment-id:1678625981 --> @LiaraAlis commented on GitHub (Aug 15, 2023): I think this is a very important feature. From my point of view this feature should be prioritized higher.
Author
Owner

@anasnaguib commented on GitHub (Aug 15, 2023):

I think this is a very important feature. hope it can be added soon.

<!-- gh-comment-id:1679596933 --> @anasnaguib commented on GitHub (Aug 15, 2023): I think this is a very important feature. hope it can be added soon.
Author
Owner

@CrooLyyCheck commented on GitHub (Oct 3, 2023):

Two-Factor authorization would be a very welcomed feature in my book.

To be able to log into nginx-proxy-manager via 2FA as well as being able to provide 2FA for access to hosts - this would vastly improve the security of less secure or non-secure applications hiding behind the nginx proxy.

Something like Authelia should provide a good starting point.

Also access list is good place to implement 2fa auth thru simple page instead HTTP auth form

<!-- gh-comment-id:1745250611 --> @CrooLyyCheck commented on GitHub (Oct 3, 2023): > Two-Factor authorization would be a very welcomed feature in my book. > > To be able to log into nginx-proxy-manager via 2FA as well as being able to provide 2FA for access to hosts - this would vastly improve the security of less secure or non-secure applications hiding behind the nginx proxy. > > Something like [Authelia](https://docs.authelia.com/deployment/supported-proxies/nginx.html) should provide a good starting point. Also access list is good place to implement 2fa auth thru simple page instead HTTP auth form
Author
Owner

@github-actions[bot] commented on GitHub (May 24, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2128342056 --> @github-actions[bot] commented on GitHub (May 24, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@timnolte commented on GitHub (May 24, 2024):

If 2FA can't be done then implementing OpenID Connect for SSO authentication would be the next best thing.

<!-- gh-comment-id:2128364080 --> @timnolte commented on GitHub (May 24, 2024): If 2FA can't be done then implementing OpenID Connect for SSO authentication would be the next best thing.
Author
Owner

@james-d-elliott commented on GitHub (May 24, 2024):

It can technically already be integrated for backend apps already, just not the NPM frontend. I think having both would be a good addition however, and fully support the idea of OpenID Connect 1.0, in a lot of ways I prefer it. Me and the other Authelia devs would welcome a collaboration on this as well.

<!-- gh-comment-id:2128510312 --> @james-d-elliott commented on GitHub (May 24, 2024): It can technically already be integrated for backend apps already, just not the NPM frontend. I think having both would be a good addition however, and fully support the idea of OpenID Connect 1.0, in a lot of ways I prefer it. Me and the other Authelia devs would welcome a collaboration on this as well.
Author
Owner

@woliver99 commented on GitHub (Jul 28, 2024):

+1 I would like to see this implemented

<!-- gh-comment-id:2254324557 --> @woliver99 commented on GitHub (Jul 28, 2024): +1 I would like to see this implemented
Author
Owner

@lazee486 commented on GitHub (Aug 10, 2024):

having to restrict the ip range that can access port 81 works, the number of homelabbers or people who spin this up on vps...a bit better security for the management interface would be good,

<!-- gh-comment-id:2281782879 --> @lazee486 commented on GitHub (Aug 10, 2024): having to restrict the ip range that can access port 81 works, the number of homelabbers or people who spin this up on vps...a bit better security for the management interface would be good,
Author
Owner

@jhedfors commented on GitHub (Feb 1, 2025):

+1 for implementation of basic 2FA would be awesome!

<!-- gh-comment-id:2628920651 --> @jhedfors commented on GitHub (Feb 1, 2025): +1 for implementation of basic 2FA would be awesome!
Author
Owner

@ISnotes commented on GitHub (Feb 8, 2025):

+1

<!-- gh-comment-id:2644739096 --> @ISnotes commented on GitHub (Feb 8, 2025): +1
Author
Owner

@theJoshMuller commented on GitHub (Mar 14, 2025):

+1 Another vote for 2FA / TOTP

<!-- gh-comment-id:2725837003 --> @theJoshMuller commented on GitHub (Mar 14, 2025): +1 Another vote for 2FA / TOTP
Author
Owner

@WorstPIlot commented on GitHub (Mar 29, 2025):

  • 1 for 2FA, i think it could make this project the best around
<!-- gh-comment-id:2763303440 --> @WorstPIlot commented on GitHub (Mar 29, 2025): + 1 for 2FA, i think it could make this project the best around
Author
Owner

@VslVictor7 commented on GitHub (Apr 8, 2025):

+1

<!-- gh-comment-id:2787568251 --> @VslVictor7 commented on GitHub (Apr 8, 2025): +1
Author
Owner

@hdm-benni commented on GitHub (May 5, 2025):

+1

<!-- gh-comment-id:2851878330 --> @hdm-benni commented on GitHub (May 5, 2025): +1
Author
Owner

@Anatr0p commented on GitHub (Jul 28, 2025):

+1

<!-- gh-comment-id:3127472688 --> @Anatr0p commented on GitHub (Jul 28, 2025): +1
Author
Owner

@SocketSomeone commented on GitHub (Jul 29, 2025):

+1

<!-- gh-comment-id:3133436423 --> @SocketSomeone commented on GitHub (Jul 29, 2025): +1
Author
Owner

@VslVictor7 commented on GitHub (Jul 29, 2025):

Honestly at this point its just really sad. Nginx is a service that needs good protection. This should be addressed

<!-- gh-comment-id:3133580151 --> @VslVictor7 commented on GitHub (Jul 29, 2025): Honestly at this point its just really sad. Nginx is a service that needs good protection. This should be addressed
Author
Owner

@james-d-elliott commented on GitHub (Jul 30, 2025):

I think an entirely practical solution that's relatively easy to implement for the developers, and likely sufficient for most users is to allow them to easily disable auth and include an authentication snippet for the admin UI for example via auth_request similar to the below examples:

authelia-location.conf
authelia-authrequest.conf
proxy.conf

example usage (see the nextcloud example)

The advantage is that you can delegate auth rather than having to implement it directly.

<!-- gh-comment-id:3134988571 --> @james-d-elliott commented on GitHub (Jul 30, 2025): I think an entirely practical solution that's relatively easy to implement for the developers, and likely sufficient for most users is to allow them to easily disable auth and include an authentication snippet for the admin UI for example via `auth_request` similar to the below examples: [authelia-location.conf](https://www.authelia.com/integration/proxies/nginx/#authelia-locationconf) [authelia-authrequest.conf](https://www.authelia.com/integration/proxies/nginx/#authelia-authrequestconf) [proxy.conf](https://www.authelia.com/integration/proxies/nginx/#proxyconf) [example usage (see the nextcloud example)](https://www.authelia.com/integration/proxies/nginx/#standard-example) The advantage is that you can delegate auth rather than having to implement it directly.
Author
Owner

@acutbal commented on GitHub (Aug 17, 2025):

Another +1 vote for 2FA / TOTP...

Regards.

<!-- gh-comment-id:3194466762 --> @acutbal commented on GitHub (Aug 17, 2025): Another +1 vote for 2FA / TOTP... Regards.
Author
Owner

@dmbuil commented on GitHub (Sep 3, 2025):

+1

<!-- gh-comment-id:3250802293 --> @dmbuil commented on GitHub (Sep 3, 2025): +1
Author
Owner

@ArkhLink commented on GitHub (Sep 19, 2025):

+1

<!-- gh-comment-id:3312819151 --> @ArkhLink commented on GitHub (Sep 19, 2025): +1
Author
Owner

@kverstoep commented on GitHub (Oct 18, 2025):

+1

<!-- gh-comment-id:3419064917 --> @kverstoep commented on GitHub (Oct 18, 2025): +1
Author
Owner

@kpleines commented on GitHub (Feb 9, 2026):

+1

<!-- gh-comment-id:3873666301 --> @kpleines commented on GitHub (Feb 9, 2026): +1
Author
Owner

@jc21 commented on GitHub (Feb 11, 2026):

This is done as of v2.13.6

<!-- gh-comment-id:3881377899 --> @jc21 commented on GitHub (Feb 11, 2026): This is done as of [v2.13.6](https://github.com/NginxProxyManager/nginx-proxy-manager/releases/tag/v2.13.6)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#279
No description provided.