this post was submitted on 13 Jul 2023
25 points (90.3% liked)

Selfhosted

40246 readers
890 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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. ;)

top 12 comments
sorted by: hot top controversial new old
[–] smutsmutsmut@lemmy.world 8 points 1 year ago (1 children)
[–] momsi@lemmy.world 1 points 1 year ago (1 children)

I found that before and it's really interesting. I didn't really find it easy to understand, though. Maybe I'll look into it again. As I understand it, you wouldn't even need caddy, oauth2-proxy itself can act as reverse proxy, right?

[–] smutsmutsmut@lemmy.world 1 points 1 year ago

upstream services > oauth2-proxy > caddy

Not sure what kind of services you want to run. But I guess you want auto https etc. so probably you want to stick to caddy.

[–] DudeWithaTwist@lemmy.world 6 points 1 year ago (1 children)

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.

[–] momsi@lemmy.world 1 points 1 year ago (1 children)

Well yeah, basic auth is surely the easiest method ... though I rather like to go the oauth2/OIDC route.

[–] DudeWithaTwist@lemmy.world 4 points 1 year ago

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.

[–] warmaster@lemmy.world 4 points 1 year ago (2 children)
[–] das@lemellem.dasonic.xyz 4 points 1 year ago (1 children)

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

[–] warmaster@lemmy.world 0 points 1 year ago

I don't know honestly, but it uses standard stuff, theoretically speaking you should be able to do it.

But if you have an already existing setup, I guess nothing will be noob-proof, because you have to manually link the two parts.

[–] momsi@lemmy.world 2 points 1 year ago

It really does look cool. It can be deployed using Docker. I'll have a look at it.

[–] CodaBool@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

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.

[–] momsi@lemmy.world 2 points 1 year ago

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.

load more comments
view more: next ›