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.

      • SheeEttin@lemmy.world
        link
        fedilink
        English
        arrow-up
        16
        arrow-down
        2
        ·
        10 months 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
          5
          ·
          10 months 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.

        • StefanT@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          10 months 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.

        • dauerstaender@feddit.de
          link
          fedilink
          English
          arrow-up
          15
          ·
          10 months ago

          Having certificates that are valid for over a year is contra-productive, as when they get in to the wrong hands they might still be valid for a year until they naturally run out of time. The reason LetsEncrypt issues only 90d valid certificates is not to annoy you, but save your ass once someone obtains your certificates.

          • FrederikNJS@lemm.ee
            link
            fedilink
            English
            arrow-up
            3
            ·
            10 months ago

            While shorter lived certs certainly improve the general security, certificate revocation lists are what you need if a cert gets compromised.

            • dauerstaender@feddit.de
              link
              fedilink
              English
              arrow-up
              6
              ·
              10 months ago

              They don’t work in practice, no modern browser actively queries any revocation DBs. It’s just much more efficient to let something expire sooner than keep track of all lost somethings.

  • WardPearce@lemmy.nz
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    2
    ·
    10 months ago

    Certbot is great when using Nginx (or Apache2), but if you can use a different engine. Its worthwhile checking out Caddy!

  • i_am_not_a_robot@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    7
    ·
    10 months ago

    Downloading certificates from your domain provider is often a security problem. Only you are supposed to know your private keys.

    • thirdBreakfast@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Good point. Although they are also hosting my DNS, so they can take the site over anytime they want anyway?

      • SirNuke@kbin.social
        link
        fedilink
        arrow-up
        6
        ·
        10 months 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.

    • SheeEttin@lemmy.world
      link
      fedilink
      English
      arrow-up
      27
      ·
      10 months 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.

    • gelframe@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      10 months ago

      This is what I use because fuck snap. I used certbot to do wild card certs but once they went to snap I quit.

      • dan@upvote.au
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 months ago

        On Debian you can apt install certbot and it’s just a regular Debian package with Python files inside. Are you on Ubuntu? I know they’ve been pushing snaps for a while.

        • anyhow2503@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          The certbot authors tried really hard at one point to make snap the only available distribution mechanism for their application and for some time the version that Fedora packaged would display some weird deprecation warning and urge you to use the snap version.

      • d_k_bo@feddit.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        If you don’t like snap, maybe you should try another distro instead (I went to fedora because I was annnoyed of snaps).

      • brenno@lemmy.brennoflavio.com.br
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 months ago

        This seems like free hate as you can use certbot without snap without any problems. Imagine stopping using Firefox because of the same reason for example

    • kill_dash_nine@lemm.ee
      cake
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I also use acme.sh. It has worked great for me and was dead simple to use. Super flexible on what it can do from just renewing the certs to web server integration. Love the simple to use hooks available too.

  • Kangie@lemmy.srcfiles.zip
    link
    fedilink
    English
    arrow-up
    10
    ·
    10 months ago

    I run all of my containerised services behind Traefik which does LetsEncrypt for me as well as handles fun stuff like routing to different containers / reverse proxy. It’s fantastic if you want to take your new knowledge to the next level!

    • thirdBreakfast@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Thanks, I do, and I’ve added a couple from the suggestions here. Caddy and Traefik are both on my list of things to investigate now.

  • killwill@feddit.nl
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 months 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.

  • genuineparts@feddit.de
    link
    fedilink
    English
    arrow-up
    19
    ·
    10 months ago

    You know what, thanks for making this post. I have used Letsencrypt and Certbot for years now, i’d never have thought about donating, but since you said that I just made a donation.

    • thirdBreakfast@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      10 months ago

      Good on you. For anyone else inspired, you can support Certbot here, and Let’s Encrypt here.

      I promise I don’t work for them - I was just struck by how phenomenally handy they are.

  • steltek@lemm.ee
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months 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
  • Unsealed9041@lemmy.ca
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 months 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.

    • BoneALisa@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months 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.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    10 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    HTTP Hypertext Transfer Protocol, the Web
    IP Internet Protocol
    LXC Linux Containers
    PiHole Network-wide ad-blocker (DNS sinkhole)
    SSL Secure Sockets Layer, for transparent encryption
    TLS Transport Layer Security, supersedes SSL
    VPS Virtual Private Server (opposed to shared hosting)
    nginx Popular HTTP server

    7 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

    [Thread #120 for this sub, first seen 8th Sep 2023, 16:25] [FAQ] [Full list] [Contact] [Source code]