I host a few docker containers and use nginx proxy manager to access them externally since I like to have access away from home. Most of them have some sort of login system but there are a few examples where there isn’t so I currently don’t publicly expose them. I would ideally like to be able to use totp for this as well.
- caddy can do that with
basicauth
: https://caddyserver.com/docs/caddyfile/directives/basicauth - nginx can 100% do that because it has plugins for everything
- apache can probably do something like that
most reverse proxies have SSO tooling that you can set up pretty easily
But honestly, have you considered just using wireguard for these cases? It’s much more secure if you just want a bunch of stuff hidden from the rest of the world
If you want a richer login authelia + caddy is good.
Ooh that Authelia looks pretty much ideal. I’ll give it a try and see how well it works.
How to use WireGuard for that? (Noob here)
WireGuard
try wg-easy. it’s on the docker hub and it makes setting up a wireguard tunnel incredibly easy (as in, press the add button). The initial docker configuration process was a bit annoying to me since I had no prior experience, but most of the issues were down to the dns settings, which I eventually figured out.
- caddy can do that with
Throwing my setup in: Traefik with Authentik
I use pomerium for that
With that, I use Pomerium for apps which accept a HTTP Headers, for example, my Fresh Tomato firmware flashed router, it has a HTTP dialog. This allows me to login from the road if I need to manage something like rebooting it or updating firewall rules etc.
My access flow is this :
router.example.com —> Cloudflare Tunnel —> Pomerium IP —>Authentik —> Router’s Gui.
It works flawlessly. I don’t often use it, but when I do, it helps. I also had it enabled for AdguardHome but moved to Technitium DNS which I prefer and that doesn’t have the HTTP Headers so it’s not fully compatible with Pomerium that I’m aware of.
What does Authentik do in combination with pomerium? I don’t have it
Authentik is my IDP provider so I put it in front of all my publicly facing Apps which support OIDC login. For example, I can log into my Portainer instance from an external network, but to do so, I log into Authentik First which sends it to my service.
For the apps which support HTTP headers, like I said, Pomerium acts as the service which passes my credentials to the device. I admit - Authentik does this also without the need for Pomerium, (through their flow settings) but I found Pomerium to be much easier to set up for this than Authentik and haven’t looked back or felt the need to change it.
Ah I see! Thanks for the explanation, I have pomerium in front of everything using Google as IDP. Then if the app supports header authentication (like grafana) I get automatically logged in, and for those that don’t I have to log in again (a bit inconvenient) I event went as far as forking one and implementing header authentication myself.
It’s pretty easy to do this with Cloudflare Tunnels. You can set them up to use a Google account for SSO. Downside of course is that you’re reliant on Google and CF.