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

1 point

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.
permalink
report
reply
1 point

I have not tested it, but someone did auto discovery for caddy

https://github.com/lucaslorentz/caddy-docker-proxy

permalink
report
parent
reply
1 point

You mean using dns providers like cloud flare?

It’s very easy just don’t this

caddy add-package github.com/caddy-dns/cloudflare

permalink
report
parent
reply
1 point

It doesn’t support configuring virtual hosts automatically via docker labelsl (like Traefik).

Here you go: https://github.com/lucaslorentz/caddy-docker-proxy. No more extra Caddy configuration file.

permalink
report
parent
reply
1 point

Whoa, just when I thought I had completed my setup haha

permalink
report
parent
reply
1 point

If you are using Docker, check out this repository for Caddy builds with different plugins https://github.com/serfriz/caddy-custom-builds

permalink
report
parent
reply
1 point

Nice!

permalink
report
parent
reply
1 point

Random question from a noobie…. Why do you use something like Traefik versus something like Cloudflare Zero Access? (Again sorry if question is dumb). I’m just a new guy to this learning as I go and after getting up zero access with a $8 domain and now being able to securely access everything via subdomains it seems confusing why apps like Traefik are still so popular? I know I’m missing something there but hoping someone points it out.

permalink
report
parent
reply
1 point

Because this is r/selfhosted. :-)

permalink
report
parent
reply
1 point

I use Caddy and agree with your last point in the context of Crowdsec

permalink
report
parent
reply
1 point

I wrote something that can setup caddy automatically from docker labels.

It’s not well documented as I mostly wrote it for myself. https://hub.docker.com/r/mheys1/docker-dynamic-caddy https://github.com/mattheys/ddc

It basically acts like a DNS server serving up SRV records that caddy can use for dynamic configuration, I added in an on_demand_tls endpoint as well so that you don’t get spammed for non existent TLS records.

permalink
report
parent
reply
1 point

Anyone know if Caddy would be a good pick for a reverse proxy on a public subnet to distribute traffic to a bunch of subdomains in low traffic settings? I figure it could be a single source for all HTTPS stuff in my stack.

Or is it really just for like single applications running through Docker? Sorry, I haven’t played with it too much.

permalink
report
parent
reply
1 point

Yes, it excels at that usecase. Caddy will automatically set up and manage certificates for each subdomain.

permalink
report
parent
reply
1 point

Don’t hate me but I use Apache2, why would use caddy?

permalink
report
parent
reply
1 point

I used Apache for many years. It’s great! But Caddy is simpler, easier and lighter weight.

permalink
report
parent
reply
1 point

What is it? Is it an alternative to unraid?

permalink
report
reply
1 point

No, it’s a web server and reverse proxy.

It automatically adds HTTPS using let’s encrypt certificates.

permalink
report
parent
reply
1 point

there are some trade offs, mostly performance

permalink
report
reply
2 points

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.

permalink
report
reply
1 point

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.

permalink
report
reply

Self-Hosted Main

!main@selfhosted.forum

Create post

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.

For Example

  • Service: Dropbox - Alternative: Nextcloud
  • Service: Google Reader - Alternative: Tiny Tiny RSS
  • Service: Blogger - Alternative: WordPress

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

Community stats

  • 1

    Monthly active users

  • 1.8K

    Posts

  • 11K

    Comments

Community moderators