Currently, I use dockerproxy + swag and Cloudflare for externally-facing services. I really like that I don’t have to open any ports on my router for this to work, and I don’t need to create any routes for new services. When a new service is started, I simply include a label to call swag and the subdomain & TLS cert are registered with Cloudflare. About the only complaint I have is Cloudflare’s 100MG upload limit, but I can easily work around that, and it’s not a limit I see myself hitting too often.

What’s not clear to me is what I’m missing by not using Traefik or Caddy. Currently, the only thing I don’t have in my setup is central authentication. I’m leaning towards Authentik for that, and I might look at putting it on a VPS, but that’s the only thing I have planned. Other than that, almost everything’s running on a single Beelink S12. If I had to, I could probably stand up a failover pretty quickly, though.

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    7 days ago

    I switched from SWAG to Caddy. Its config file is much simpler, with many best practice settings being default resulting in each sites being like 3 lines of code. Implementing something like mTLS requires one line per site, just super nice to configure, and you’re not left without a template config for more obscure services.

    That being said, SWAG does more than enough and Nginx is a powerful software so you really aren’t missing out on anything but more streamlined config.

    Traefik is kind of just like, a nightmare that tries to sell you on it being “self configuring” but it takes some work to get to that point and the “self configuring” requires the same amount of time in a text editor as manually configuring Caddy does. I can see Traefik being powerful if you’re using it with actually clustered k8s and distributed workloads. If that’s not your use case it’s kinda just more work than it’s worth.

  • Cpo@lemm.ee
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    7 days ago

    I was an avid nginx user but having caddy handle the ssl certificate creation and renewal is amazing.

    I probably am outdated on nginx (maybe it supports it?) but caddy is what I use from here on out.

  • Shimitar@feddit.it
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 days ago

    Not depend on a specific corporation to access all your services for one.

    A reverse proxy (I use nginx) will let you centralize certificates and allow the use of subdomains easily, without depending from a specific service provider like cloudflare.

    Looks like you are are a lucky american with access to a real IP address, good for you, a luxury nowadays where CG-NAT is common place everywhere.

    Opening a port is not even possible where I live.

  • N0x0n@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 days ago

    Except that everything is under your control and not managed by a third party, not much I think.

    If this setup works for you and you’re happy with it, just keep it going.

    If you have time to spare, want to learn new things, tinkerer arround with network security, certificates, DNS, reverse proxy and, and, and… You can give it a try in a virtual machine and docker containers. But keep in mind that’s not an easy way and involves a lot of personal time before you get a GOOD working self-hosted / exposed services.

    I wouldn’t recommend to open any port on your router except for a secured tunnel like wireguard and connect to your services through that tunnel. Opening port 443/80 on your router is bound to some heavy automated scanning and brute force by bots. If you don’t have the necessary knowledge/tool/hardware, this is just going to put you at risk of ddos and remote attacks.

    That’s way something like cloudflare is populare, they most of the time take care of that nuisance and also why something like wireguard is popular among the selfhosting community.

      • N0x0n@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

        Thanks for the tip !! I will certainly give it a look, It’s kinda annoying for my family members to always connect via wireguard.

        For me it’s fine though, I even route my traffic to ProtonVPN but my family is always nagging how they need to “do something” to get access to the hosted services or that it “doesn’t work”.

      • Lem453@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

        Do you have a guide on how to do his? I couldn’t get the middleware to work to actually bounce connections

        • mbirth@lemmy.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          7 days ago

          You have to actually add the middleware into the (default) chain for your https entrypoint (I think in most tutorials it’s called websecure) - in my static conf I have this:

          entryPoints:
            https:                                                           
              address: :443                                                  
              http:                                                          
                middlewares:                                                 
                  - crowdsec-bouncer@file                                    
                  - secure-headers@file 
          

          And in my dynamic conf I have this:

          http:
            middlewares:
              crowdsec-bouncer:
                plugin:
                  crowdsec-bouncer-traefik-plugin:
                    CrowdsecLapiKey: "### Enter your LAPI Key here ###"
                    Enabled: true