This seems too straightforward, what’s the catch?

Like how secure is it? Should I be turning it off (and disabling the port forwarding) when not using it?

Do I need any additional security? Mainly just want to use it for Jellyfin

Thanks

  • dinosaurdynasty@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I would not directly expose Jellyfin to the Internet (including reverse proxy) because of security issues they’ve had. And no, a reverse proxy (like Caddy) doesn’t usually add much insecurity or security^.

    The thing I currently do is use forward_auth w/ Authelia (from anywhere, you could also use basic_auth though the UX sucks) but bypass it for the app in private IP ranges (aka at home or in VPN):

    jellyfin.example {
            @notapp {
                    not {
                            header User-Agent *Jellyfin*
                            client_ip private_ranges
                    }
            }
    
            forward_auth @notapp localhost:8080 {
                    uri /api/verify?rd=https://authelia.example/
            }
            reverse_proxy 192.168.1.44:8080
    }
    

    Apps get to continue working, and I can access it from my phone without a VPN setup (because it’s annoying and I only look at metadata on my phone anyway).

    You can also do a simpler config (which I used to do) where you just give an HTTP Unauthorized for anything outside of private ranges (this lets you do the HTTP challenge for a certificate while still not exposing Jellyfin to the general internet).

    ^You can configure more security by doing authentication in the reverse proxy so that anyone trying to attack services behind it must first authenticate with the reverse proxy, but this is not the default. Security-wise this ends up similar to forcing all access through a VPN first, if a little harder to setup.

    • Do_TheEvolution@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Strange, I never quite got why ever would i want to swtich to NPM, tried it and never liked it…

      I ssh in and edit my caddyfile faster than I go to npm web interface and click through menus. I actually can just copy paste caddyfile config and have backup of it, while I am not even sure if npm has any backup solution by now, or you just suppose to backup on docker level.

      And it is kinda in the way, a gui layer if you wanna do something more…

  • adamshand@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I switched from Traefik to Caddy a few years ago and have no ragrets. The only complaints I have about Caddy:

    • It doesn’t support configuring virtual hosts automatically via docker labelsl (like Traefik).
    • Many features (like DNS auth for certs) require compiling Caddy. Which is easy but annoying.
  • Hot_Nectarine_5816@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I started with caddy because it seemed to have the least complex config file even though the documentation lacks examples which I found really annoying when troubleshooting or trying any less basic stuff. I also found certificate related issues really hard to fix.

    Now I run nignx-proxymanager as a docker-container which unifies nearly all services into portainer for updating therefore making it easier to keep my stuff up to date. nginx-proxymanager is also much easier imo on the certificate side of things. I create wildcard certificates for a few domains and select the right one depending on the proxy I add. I also use forwards for a few of my shelly-devices which don’t seem to work with proxies and make it easier for me to access them via a domain instead of memorizing a growing number of IPs.

  • sevlonbhoi1@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    been running my reverse proxy on caddy from last 4-5 years. No issues at all. No maintenance needed. Setup and forget. Just needs a simple config file. Auto certificate generation.

    • Do_TheEvolution@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      npm is nice for people who want easy web gui to configure stuff

      caddy makes me feel more in control, its easier to backup too, since its all in one easy and readable config, and probably has more features as you go with your needs

      There is also not that layer of which developer fucked up that you get when projects are projects of projects…

  • CWagner@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Caddy is great, been using it for a long time and made the switch from v1 to v2. The biggest negative, IMO, is that examples are usually for NGINX. This is fine if all you have to do is to translate the nginx 5-liner into a Caddy 1-liner, but for nextcloud, the code was a bit more complicated and required some googling (as people had that issue before and their forums are helpful).

    LLMs can also be useful for translating nginx directives to caddy.

  • wtfblubby@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    It just runs… Two years straight. Some more services since start of caddy… No worries.

    Recently added auth with authelia… Still straight forward.

    Easy setup, always online. That’s it. Period.

  • -eschguy-@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Been using it for a few years now, and yeah, it’s just that simple.

    I have 443 open and pointing at my Caddy instance, it handles everything else.

  • ithilelda@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    It is a simple layer 7 proxy and nothing more. It is the simplest so it works. As a comparison, almost all other reverse proxies can handle layer 4 traffic.

    and I don’t miss the label feature of traefik at all. centralized config for an entrance gateway is so much easier to maintain and find security flaws. I think labeling would be useful only in production clusters with thousands of microservices that you absolutely need the reverse of control to get away from dependency hell. Otherwise, I advice against using such feature, not even with a caddy plugin. (I mean if you really need it, why not just use traefik…)