I am in self hosting for a bit now, have an unraid server and a bunch of services running. Now I want to expose some services through a reverse proxy, but with authentication, preferably google oauth2. I’ve tried a lot of things, Authentik, Authelia, NPM, and so on. I found everything way to complicated. What I liked the most until now is Caddy with the greenpau/caddy-security module. Very easy config through the caddyfile… Though the module has to be manually installed after every update of the caddy docker container, thats kind of a turn of for me, since everything else on my server is almost maintainance-free.
You have any suggestions?
… also this is my first post on lemmy, since I migrated from reddit. ;)
To follow up on this: I now use a combination of caddy as reverse proxy and authelia for authentication. In my opinion caddy is the best reverse proxy, it’s super lightweight and the caddyfiles are super easy to read. Authelia is surprisingly easy to get setup. I was a bit hesitant because it looked a little overwhelming in the beginning. When you sit down for half a day and dig into it, it’s really surprisingly straightforward.
I’ve always used Nginx for my reverse proxy and their
basic_auth
directive for password protection. For a homelab setup, I’m not sure why you’d need anything heavier.Well yeah, basic auth is surely the easiest method … though I rather like to go the oauth2/OIDC route.
Just wondering why, because you need some justification to take the harder route. Oath2 is enterprise level, developed by Meta, Google, and others to be top-notch.
basic_auth
works to dissuade intruders.Unless you have a stalker trying to infiltrate your network, I can only imagine this will cause more headaches than it’s worth.
It really does look cool. It can be deployed using Docker. I’ll have a look at it.
That seems really cool. Is it much use if you don’t want to run the programs inside cosmos?
E.g. they’re already running through unraid
Put https://github.com/oauth2-proxy/oauth2-proxy in front of caddy.
You mentioned NPM. Not sure if you mean the UI version since you mention config files. Id recommend it heavy. Very noob friendly and provides certs for you.
Image: jc21/nginx-proxy-manager
Docs: https://nginxproxymanager.com/guide/#quick-setup
I’m not sure how to do auth with this setup so I’m missing that info for you though.