I’ve been downloading SSL certificates from my domain provider, using cat to join them together to make the fullchain.pem, uploading them to the server, and myself adding a 90 day calendar reminder. Every time I did this I’d think I should find out about this Certbot thing.

Well, I finally got around to it, and it was one of those jobs which turns out to be so easy you wish you’d done it ages ago.

The install was simple (I’m using nginx/ubuntu).

It scans up your server conf files to see which sites are being served, asks you a couple of questions, obtains the Let’s Encrypt certificate for them, installs it, updates your conf files to use it, and sets up a cron job to check if it’s time to renew the certificate, which it will also do auto-magically.

I was so pleased with it I made a donation to the EFF for it, then I started to think about how amazingly useful Let’s Encrypt is, and gave them one too. It’s just a really good time to be in this hobby.

I highly recommend Certbot. If you’ve been putting this off, or only just hearing about it, make some time for it.

  • Unsealed9041@lemmy.ca
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    If you like certbot, you should check out Caddy. Fully auto tls so long as the server resolves to a set domain name. Caddy-docker-proxy is pure magic with docker containers.

  • steltek@lemm.ee
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    I’m obviously a fan of LE but a simple self-hosted option with a custom CA would be great for local machines:

    • I don’t want every Raspberry Pi/laptop/temp VM/whatever published into the cert transparency record
    • Configuring the router to forward every local hostname to the machine’s .well-known would be awful (if my ISP even allowed port 80)
    • Exposing local machines to the Internet is an unnecessary degradation of security
    • thirdBreakfast@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      My use case is for domains hosted on a VPS rather than my home server-hosted stuff. None of that is exposed to the internet except via Tailnet. I’ve got a domain saved up for that but haven’t figured it out how to do it since the CA can’t access my server to verify it. I have the feeling the answer is going to be ten more commenters telling me to check out Caddy.

    • SirNuke@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It’s easy* to setup Hashicorp Vault with your own CA and do automated cert generation and rotation, if you are willing to integrate everything into Vault and install your root CA everywhere. (*not really harder than any other Vault setup, but yaknow). I may go down this route eventually since I don’t think a device I don’t control has ever accessed anything I selfhost, or ever will.

      I have a wildcard subdomain pointing to my public IP, and forward port 80 to an LXC container with certbot. Port 80 appears closed outside the brief window when certbot is renewing certs. Inside my network I have my PiHole configured to return the local IP for each service.

      Nothing exposed to the internet at all. There is a record of my hostnames on Let’s Encrypt but not concerned if someone will, say, deduce apollo-idrac is the iDRAC service for a Dell rackmount server called apollo and the other Greek/Roman gods are VMs on it. Seemed like a house of cards that would never work reliably, but three odd years later I only have issues if a DNS resolver insists on bypassing my PiHole. And that DNS resolver is SystemD-ResolveD which should crawl back into whatever hellhole it came out of.

  • killwill@feddit.nl
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I love the docker / traefik setup we have at work. We get tls certified domains for any docker container we run with just a few lines of yml. I can spin up a site in seconds.

      • SheeEttin@lemmy.world
        link
        fedilink
        English
        arrow-up
        13
        arrow-down
        1
        ·
        1 year ago

        Wait until you stand up your own CA and issue certs with multi-year validity so they don’t have to be renewed more often than you rebuild everything anyway

        At least until you try to access stuff on a Pixel phone which doesn’t let you install CA certs any more 😞

        • FrederikNJS@lemm.ee
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          Wait until you set up cert-manager to issue both Let’s Encrypt certificates, as well as generating your own CA and issuing certs from your own CA where you can set the validity however want.

        • SpaceCadet@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Pixel phone which doesn’t let you install CA certs any more

          Is that something new? I can still install CA certs on my Pixel 6. It does give a scary warning, but you can just click through it.

        • StefanT@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          I had no problem to install my CA on my Pixel (Android 13). I read that this was not possible for some time but Google changed it.

    • BoneALisa@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Just setup cert-manager for a client at our work thats moving to a Kubernetes cluster. Setup the ACME issuer using DNS Cloudflare challenges, its awesome how simple it is to even get internal hostnames with certs.

    • SheeEttin@lemmy.world
      link
      fedilink
      English
      arrow-up
      20
      ·
      1 year ago

      You’re supposed to upload the CSR, not the key.

      But yeah, if they do all the generation themselves, they also have the private key and could easily break into anything the cert is used for.

      • SirNuke@kbin.social
        link
        fedilink
        arrow-up
        7
        ·
        1 year ago

        They could hijack your site at any time, but with a copy of your live private certs they (or more likely whatever third party that will invariably breach your domain provider) can decrypt your otherwise secure traffic.

        I don’t think there’s significant real tangible risk since who cares about your private selfhosted services and I’d be more worried about the domain being hijacked, and really any sort of network breach is probably interested in finding delicious credit card numbers and passwords and crypto private keys to munch on. If someone got into my network, spying on my Jellyfin streaming isn’t what I’m going to be worried about.

        But it is why CSRs are used.