I have been self-hosting for a while now with Traefik. It works, but I’d like to give Nginx Proxy Manager a try, it seems easier to manage stuff not in docker.

Edit: btw I’m going to try this out on my RPI, not my hetzner vps, so no risk of breaking anything

  • @Xanza@lemm.ee
    link
    fedilink
    English
    01 year ago

    Traefik is a PITA.

    Caddy all the way. If you build it with Docker support (or grab the prebuilt), you can use docker container names to reverse proxy using names instead of any IP addresses or ports. It’s nice because if the IP updates, so does caddy. All automatically.

    Here’s what my caddyfile looks like;

    {
            acme_dns cloudflare {key}
    }
    
    domain.dev {
            encode zstd gzip
            root * /var/www/html/domain.dev/
            php_fastcgi unix//run/php/php8.1-fpm.sock
            tls {
                    dns cloudflare {key}
            }
    }
    *.domain.dev {
            encode zstd gzip
            tls {
                    dns cloudflare {key}
            }
            @docker host docker.domain.dev
            handle @docker {
                    encode zstd gzip
                    reverse_proxy {portainer}
            }
            @test host test.domain.dev
            handle @test {
                    encode zstd gzip
                    reverse_proxy 127.0.0.1:10000
            }
            @images host i.domain.dev
            handle @images {
                    encode zstd gzip
                    reverse_proxy 127.0.0.1:9002
            }
            @proxy host proxy.domain.dev
            handle @proxy {
                    encode zstd gzip
                    reverse_proxy proxy
            }
            @portal host portal.domain.dev
            handle @portal {
                    encode zstd gzip
                    reverse_proxy portal
            }
            @ping host ping.domain.dev
            handle @ping {
                    encode zstd gzip
                    respond "pong!"
            }
    }
    

    DNS hosted by cloudflare but because caddy handles ACME certs, all the subdomains automatically get SSL.

    • LenaOP
      link
      fedilink
      English
      01 year ago

      Actually I found traefik rather easy, I just had to make the proper docker labels and config.

      PITA

      Unrelated, I’m going to sound like a grammar nazi here, but holy shit there are so many acronmys, how am I supposed to know every one of them without googling? Please just say “traefik is a pain in the ass”. Also please don’t take this as a snarky reply.

      • @Xanza@lemm.ee
        link
        fedilink
        English
        01 year ago

        PITA = pain in the ass.

        I never said it was hard. Just a real pain in the ass. Like iptables vs UFW. They’re the same thing, but one is easy and a pain in the ass and the other is just easy… So I opt to make my life easier. lol

  • hendrik
    link
    fedilink
    English
    01 year ago

    In my experience, all the 3 big ones work just fine. Caddy, Traefik, Nginx. I use Nginx.

  • @lorentz@feddit.it
    link
    fedilink
    English
    01 year ago

    Nginx for my intranet because configuration is fully manual and I have complete control over it.

    Caddy for the public services on my vps because it handles cert renewal automatically and most of its configuration is magic which just works.

    It is unbelievable how shorter caddy configuration is, but on my intranet:

    1. I don’t want my reverse proxy to dial on internet to try to fetch new SSL certs. I know it can be disabled, but this is the default.
    2. I like to learn how stuff works, Nginx forces you to know more details but it is full of good documentation so it is not too painful compared to Caddy.
    • @Oisteink@feddit.nl
      link
      fedilink
      English
      01 year ago

      I switched to caddy just for the certs. I get trusted certs on all my internal subdomains without maintenance.

      I use haproxy, nginx and caddy at work including a caddy instance with internal CA. 4 lines in config and its signed by our normal CA, so its trusted by all our devices.

  • 𝘋𝘪𝘳𝘬
    link
    fedilink
    English
    01 year ago

    but I’d like to give Nginx Proxy Manager a try, it seems easier to manage stuff not in docker.

    NPM is pretty agnostic. If it receives a request for a specific address and port combination it just forwards the traffic to another specific address and port combination. This can be a docker container, but also can be a physical machine or any random URL.

    It also has Let’s Encrypt included (but that should be a no-brainer).

  • Matt The Horwood
    link
    fedilink
    English
    01 year ago

    I use nginx as the internet facing proxy, write my own config and manage it with source control. Also use traefik in docker land with service labels to configure it

  • @MXX53@programming.dev
    link
    fedilink
    English
    01 year ago

    I use traefik. I like it. Took a bit to understand, but it has some cool options like ssl passthrough and middlewares for basic auth.

    • mbirth 🇬🇧
      link
      fedilink
      English
      01 year ago

      You can even use it to do the SSL part for a local non-SSL IMAP server. And, there’s a CrowdSec middleware as well, that will block blacklisted IPs.

  • @kevincox@lemmy.ml
    link
    fedilink
    English
    01 year ago

    I’ve been using nginx forever. It works, I can do almost everything I want, even if more complex things sometimes require some contortions. I’m not sure I would pick it again if starting from scratch, but I have no problems that are worth switching for.

  • boydster
    link
    fedilink
    English
    01 year ago

    I’ve been mostly using Nginx Proxy Manager, but I recently set up Bunkerweb as a WAF for a couple of public services I’m hosting and I kind of like it. It does reverse proxy along with a bunch of other things (bad behavior blocking, geographic blocking, SSL cert handling, it does a lot).

    Mentioning it because I didn’t see any other mention of it yet.

    NPM is easy to use. Caddy sounds like something I’d like to try too now.

  • morethanevil
    link
    fedilink
    English
    01 year ago

    I like Zoraxy it has a lot of features, like Zerotier integration, status monitoring etc and a clean UI

    Runs fine for my needs and fully replaced NPM for me 😊

    You can run it in docker or as a single binary directly

  • @JASN_DE@lemmy.world
    link
    fedilink
    English
    01 year ago

    I use both, Traefik on my docker host that’s also used for trying out new stacks, and NPM at work for a config that won’t change (ever, probably).

    Yes, the NPM web ui is somewhat easier in regard to proxying targets outside Docker.

  • @brownmustardminion@lemmy.ml
    link
    fedilink
    English
    01 year ago

    I use nginx for static websites and TLS passthrough servers.

    I use traefik as a reverse proxy for sites with many services and SSO.

    Nginx is definitely easier to configure for simple things. But I prefer traefik for more complex setups.

  • @midnight@programming.dev
    link
    fedilink
    English
    01 year ago

    I’ll throw in another recommendation for Caddy. I’ve been using it for years and the few problems/feature suggestions I had got implemented by the developers pretty quickly. They’re super active on their forums and I haven’t yet run into an issue where I couldn’t either figure it out myself or with help from their community forums (usually from a dev.) They’re very friendly and won’t berate you for simple mistakes like other devs.

  • @merthyr1831@lemmy.ml
    link
    fedilink
    English
    01 year ago

    i use nginx proxy manager but im barely getting by. Theres zero useful documentation for setting up custom paths so everyone uses subdomains. I ended up buying my own domain just so i didnt feel guilty spamming freedns lmao.

    • Encrypt-Keeper
      link
      fedilink
      English
      01 year ago

      At that point you might be better off just using Nginx without the gui. SWAG is a nice reverse proxy focused implementation of it.