Title. I looked at how to configure anything and found Caddy to be much easier to use. Aside from a lot of docker images integrating with it, why is everyone using it? Edit: I meant Traefik

  • vampatori@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I switched to Traefik as it has auto-configuring for containers for effortless deployment to any of your environments (dev, test, staging, production, etc.) either manually or straight from CI/CD.

    The way it works is that you put any configuration in your compose file which is then picked-up by Traefik when its deployed - it reads the config, re-configures itself accordingly, and you’re done! So all your reverse-proxy config, cert config, etc. is all with the project so aren’t going to get out-of-sync.

    Just keeps things really clean and simple. Plus it’s a great reverse proxy of course with tons of features, nice admin dashboard, logging, etc.

  • Domi@lemmy.secnd.me
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    If Caddy works for you, no reason to change it.

    I use Traefik because I like how tightly integrated it is with Docker. If the container with the config labels on it starts/stops the corresponding router in Traefik also starts/stops.

    Since my services are mostly running in Docker, it’s the perfect workflow for me.

  • fenndev@leminal.space
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    Tailscale is a VPN. Caddy is a reverse proxy. I’m not sure why you’re comparing the two, unless you meant Traefik?

  • korn@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 months ago

    First of all: not everyone can publish port 80/443 or even has a public IP.

  • Cousin Mose@lemmy.hogru.ch
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 months ago

    I prefer nginx to Caddy myself for reverse proxies. As far as VPN technologies go, Tailscale and WireGuard are where it’s at.

    Not sure why we’re comparing Caddy to Tailscale though.

    • uranibaba@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 months ago

      I meant Traefik, sorry.

      Also, why Nginx over Caddy? How does a minimal reverese proxy setup look like with Nginx?

      • Cousin Mose@lemmy.hogru.ch
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        It’s mostly about performance. Caddy’s Go-based garbage collector starts to negatively impact performance at high load. It looks something like:

        server {
            listen 443 ssl http2;
            server_name example.com;
        
            ssl_certificate     /etc/nginx/ssl/fullchain.pem;
            ssl_certificate_key /etc/nginx/ssl/privkey.pem;
        
            location / {
                proxy_pass http://localhost:3000/;
        
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
            }
        }
        
        • uranibaba@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 month ago

          How do you know which headers to set? I couldn’t find any documentation when I last tried (but that was some years ago now).

          • Cousin Mose@lemmy.hogru.ch
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 month ago

            It can be specific to the web application but generally speaking you’d want to pass the protocol, client IP address, etc.

  • Jason2357@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    I use both. Caddy on a VPS that reaches into my Tailscale network and proxies services hosted on a computer in my basement.

      • Jason2357@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 months ago

        The VPS is a $2 instance and very under powered, however it has a dedicated static IP and some Ddos protection. The basement computer is powerfully and capable of providing various services, but I don’t want any trouble with my home IP address. Tailscale let’s the VPS see the home computer securely.

          • Jason2357@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 months ago

            Thanks, I like it. The downside is that the VPS can see the content of my services, so it’s no good if you don’t trust the VPS provider, or if the content is too sensitive to allow that. I think it’s a good trade-off for my usage though. Performs well. One of the services I proxy is a rpi serving images downloaded from weather satellites. Connecting directly to the pi is super slow, but the proxy caching makes it 100% faster.