Recently it’s come to my attention that Caddy has an AI sponsor so I have been looking at moving away from Caddy.

I’m currently looking for another reverse proxy to use in place of Caddy. For TLS I am looking into using CertBot and it appears there’s a module (https://github.com/desec-io/certbot-dns-desec) I can use that works for https://desec.io/ to handle my certs.

I have two questions, the first is about CertBot. Since Caddy is handling my certs automatically, how often would I want to renew my certs? Desec.io has this command to obtain a cert:

certbot certonly \
     --authenticator dns-desec \
     --dns-desec-credentials /etc/letsencrypt/secrets/$DOMAIN.ini \
     -d "$DOMAIN" \
     -d "*.$DOMAIN"

Would I be required to run the same command periodically to renew my cert?

My second question is a bit more open ended. I am looking to hear any suggestions or experiences about different reverse proxies that are preferably free of AI. There is a list here with some suggested alternatives: https://codeberg.org/ethical-foss/open-slopware#web-servers

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    14 hours ago

    I’m also using Certbot with DeSEC. I simply run it daily with anacron. If it doesn’t need to renew the certs yet it will say so and stop. That’s basically it.

    I think it’s a very good idea for your LE renewal to be independent of whatever reverse proxy or web server you’re using.

    Please keep in mind that Certbot is a Python app so you can manage it with venv. Here’s how I install it in a dedicated dir (let’s say /srv/letsencrypt because using /etc is not appropriate and it bugs me 😆):

    #!/bin/bash
    set -e
    apt install python3-venv
    /usr/bin/python3 -m venv .venv
    source .venv/bin/activate
    python3 -m pip install --upgrade pip
    python3 -m pip install --upgrade certbot certbot-dns-desec
    

    And to update it:

    #!/bin/bash
    set -e
    source .venv/bin/activate
    python3 -m pip install --upgrade pip
    python3 -m pip install --upgrade certbot certbot-dns-desec
    

    As for renewing certs (the script is longer, I’m making sure to create dirs and so on but this is the gist of it):

    source .venv/bin/activate
    
    ./.venv/bin/certbot \
    --config-dir "$CFGDIR" \
    --logs-dir "$LOGDIR" \
    --work-dir "$TMPDIR" \
    --domain "${DOMAIN}" \
    --domain "*.${DOMAIN}" \
    --authenticator dns-desec \
    --dns-desec-credentials "${SECDIR}/${DOMAIN}.ini" \
    --non-interactive --agree-tos \
    --email "$EMAIL" \
    certonly
    
    openssl x509 -text -in "${CFGDIR}/live/${DOMAIN}/fullchain.pem" |\
    grep -e 'Not Before' -e 'Not After'
    

    For DeSEC you need secrets/${DOMAIN}.ini to contain:

    dns_desec_token = YOURTOKENHERE
    

    Please note that DeSEC lets you restrict what the token can do, but setting the rights on the token has to be done through their API so you need a separate token for the API 😅.

    To use the certs from Caddy, point it at the files under the config/live/${DOMAIN}/ dir (which are symlinks that are maintained by Certbot), NOT the ones under archive/.

    tls /path/to/certbot/config/live/example.com/fullchain.pem /path/to/certbot/config/live/example.com/privkey.pem
    

    Or, if you want to also add mTLS to the mix:

    tls /path/to/certbot/config/live/example.com/fullchain.pem /path/to/certbot/config/live/example.com/privkey.pem {
        client_auth {
            mode verify_if_given # or whatever access mode you want
            trust_pool file /path/to/custom/ca.pem
        }
    }
    

    Let me know if you have questions.

    • confusedpuppy@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 hours ago

      This is great, thank you for taking the time for this write up :) The provided scripts are a huge help to me

      So far my only question I have is about the directories you use. I was wondering if you could provide the directories you use or even just an example so I could better understand the file tree. I’m very particular with my files and have a whole system dedicated to maintaining neat and organized files

      I agree about not using /etc for server related stuff. I keep all my server/container related stuff in /srv so it’s easier for me to manage

      • lemmyvore@feddit.nl
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        The dirs are subdirs of /srv/letsencrypt. I like to take advantage of explicit dir assignment if the software allows it, so I don’t have any surprises if the defaults change.

        ROOT=/srv/letsencrypt
        SECDIR="${ROOT}/secrets"
        CFGDIR="${ROOT}/config"
        LOGDIR="${ROOT}/logs"
        TMPDIR="${ROOT}/tmp"
        
        for DIR in "$SECDIR" "$CFGDIR" "$LOGDIR" "$TMPDIR"; do
                mkdir -p "$DIR"
        done
        
        cd "$ROOT"
        
        ... then venv activate and run venv certbot ...
        
  • diecknet@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    3 hours ago

    I used traefik in the past, but moved to Caddy a while ago. In traefik I had to restart the service to apply the renewed certificate, which I found annoying. Caddy on the other hand just works <- Edit: might be wrong

    Anyway, are you using anything by the Linux Foundation?

    • Appoxo@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 hours ago

      Whaaat?
      I have auto renewing certs on my traefik instance and never had to renew my config except if I modified the config.yml…

    • q7mJI7tk1@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      15 hours ago

      Not about certs, but I found the opposite moving from Caddy to Traefik: in amending the caddyfile, I had to restart the Caddy service which would kill any open connections that were being used. In Traefik, it’s dynamic, so can update the services without having to restart Traefik itself.

      My main move to Traefik was due to file transfers for reverse proxy services like File Browser slowing down after a period of time, whereas in Traefik, they stayed at a constant speed.

      I now run Traefik as part of Pangolin, so most config is set by that.

      • stratself@lemdro.id
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        You can use caddy reload -c /path/to/Caddyfile to reload the config midway through

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    36
    ·
    1 day ago

    I use Traefik as my reverse proxy and it deals with my certs automatically.

    Keep in mind just because Caddy has an AI sponsor, it doesn’t mean they are using ai products, it could be the AI platform is using caddy and gave done the bare minimum of sponsoring the project.

  • Shimitar@downonthestreet.eu
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    5
    ·
    1 day ago

    I believe that it’s impossible to avoid ai generated or ai committed or ai designed or ai helped code. Or will very soon be.

    Better to learn to cope with it.

    • lambalicious@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      Harder, yes; impossible, no.

      For example, even if there was currently not an alternative to a specific piece of software (might take a while, might be too niche, etc) nothing says you can’t use the latest version of Caddy or whatever before they got slopified. Lists like Open Slopware help find the correct release version numbers for that.

    • confusedpuppy@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      3
      ·
      1 day ago

      Impossible? There are people who still write code by hand. There are people who oppose AI, some more actively (or destructively) than others.

      Harder to avoid seems like a more reasonable take.

      However I am coping, by actively seeking, talking about and supporting alternatives with the hope of spreading that knowledge to those who would like to avoid the use of AI or enable those who support AI.

      Human creativity has a much longer and far more interesting history when compared to AI or machine learning. AI hasn’t always existed and does not need to have complete influence over our future.

      • forbiddenlake@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        21 hours ago

        Your stance rules out all the big and mature software. No judgement on the stance, but you are asking a difficult question.

        Off that alternatives list, the only one I’ve heard of is lighttpd, and it’s news to me that lighty can do reverse proxying. But I would try that.

        I expect it to be a lot more difficult to find documentation and support for anything more obscure than lighty. Which may be fine for you, just know what you’re getting in to.

        As for certbot, iirc you need to add a renew command to cron, but otherwise certbot will take care of it. I’m sure the cron is in the documentation.

        • confusedpuppy@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 hours ago

          I definitely expect this path to be a bit of a challenge

          I was looking at lighttpd as well. That was the only one on the list that sounded familiar to me. I may check it out and see if it can fit me needs. I do run a very minimal setup so I might just be enough.

  • stratself@lemdro.id
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 hours ago

    For TLS I am looking into using CertBot and it appears there’s a module (https://github.com/desec-io/certbot-dns-desec) I can use that works for https://desec.io/ to handle my certs.

    You can consider using lego-acme as well. It’s not too different, just that it comes prepackaged with a bunch of DNS providers including desec, so you don’t need to install an additional module.

    Since Caddy is handling my certs automatically, how often would I want to renew my certs?

    By default, certs are valid for 90 days so you’d wanna renew a bit earlier than that. There’s also the option to use 45-day certs or 6-day certs, depending on the profile chosen.

    Would I be required to run the same command periodically to renew my cert?

    Yes, but it’s better if you automate them, like Caddy did, and both Certbot and lego can do this well. I run lego via a cronjob which checks for the certs’ expiry, and renew it when it passes a certain deadline.

    I am looking to hear any suggestions or experiences about different reverse proxies that are preferably free of AI

    Not sure I can recommend anything from that list because I’m not familiar with them, but I’ve heard haproxy to be very performant.

    • confusedpuppy@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      12 hours ago

      Thank you, I’ll have a look at lego-acme, it looks interestingly. I prefer to use cron so this is could be something I would consider using.

      • lemmyvore@feddit.nl
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 hours ago

        FWIW I’ve tried all the major CLI tools for cert renewal (certbot, lego, acme.sh) and certbot was by far the easiest to use. The others were various shades of horrible – bad documentation, obscure error messages, you name it. Wish I had tried certbot first and not wasted my time.

        You can find the magical incantations online and coax them to work eventually but they made me wonder if that’s the kind of tool I want to trust with my cert renewal. Also I’m starting to think it’s not a coincidence that other tools like NPM bundle certbot (as opposed to something else).

    • NarrativeBear@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      HAProxy seems like it’s always overlooked. I have been using it for years myself, pretty solid and just works.

      If you run pfSense you can also use HAProxy with a GUI.

      • lemmyvore@feddit.nl
        link
        fedilink
        English
        arrow-up
        5
        ·
        14 hours ago

        Just keep in mind that HAProxy is only a proxy (technically a performance-oriented load-balancer). It’s not a web server.

        I mention it because some of us also rely on our reverse proxy to serve small static webpages for various purposes (I serve a small status page generated by a cron script, for example).

  • anamethatisnt@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 day ago

    I think pivoting to BSD is the easiest way to find solutions that aren’t tainted by AI.
    https://www.openbsdhandbook.com/relayd/

    An example of OpenBSD denying AI code contributions:
    https://marc.info/?l=openbsd-tech&m=177411620801633&w=2

    edit: Seems even OpenBSD is tainted nowadays, from your own link https://github.com/openbsd/src/commit/9c2b8e445a0bdfafdd6148b1760f00aa5429627b and https://github.com/openbsd/src/commit/e9af5eb5a61d189327b553b24d0d31f19c64b63f

    edit 2: Here’s the only relevant mail threads I found regarding the AI contributions in openbsd
    https://marc.info/?l=openbsd-misc&m=177513420401322&w=2
    https://marc.info/?l=openbsd-misc&m=177573214912349&w=2

  • curbstickle@anarchist.nexusM
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    I’m fairly certain NPM (nginx proxy manager) doesn’t have any llm use inherently within the project, not sure on financial support. Other people have made context providers to use an LLM with NPM, but I don’t believe the core package itself does.

    May be what meets your reqs.

  • HelloRoot@lemy.lol
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 day ago

    I’m a gui pleb, so I do all my selfhosting through dokploy, which uses traefik under the hood and I’m quite happy with it so far.

  • Denys Nykula@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    1 day ago

    Apache has mod_md, a built-in LetsEncrypt-compatible module that requires very little configuration and no external daemons or cron jobs: https://httpd.apache.org/docs/2.4/mod/mod_md.html Three lines per virtual host: MDomain, MDContactEmail and MDCertificateAgreement. Using it in production for three years without any issue. I don’t know what’s Apache stance on LLMs, I guess neither for nor against.