Create Lets Encrypt SSL Certs via Certbot DNS Validation in Acme v02

Discussion in 'Tips/Tricks/Mods' started by ahrasis, May 6, 2018.

  1. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I haven't updated this though I personally have been using dns challenge / validation on my server ever since this thread is opened but I noted that there might be some hiccup for those who are following and using the tips / tricks in here since the use of snap to install certbot.

    The solution is to remove various old certbot/letsencrypt/certbot-auto thoroughly from your server, which includes any symlinks and especially all of its related plugins, but no need to remove any of the LE certs. One then installs certbot via snap as advised by certbot official site, then its dns plugins that one needs, also via snap.

    If one by mistake installed its dns plugins before certbot is properly installed via snap, make sure to remove all of it first because certbot installation cannot proceed if any of them existed, otherwise, kinda "mysterious" error(s) will occur. Even renewal of the LE certs won't be possible as it will complain a parsing error.

    For those who face the above mentioned error(s) and need a way to fix them, this is an example for CLoudFlare DNS:
    Code:
    apt install snapd
    snap install core; snap refresh core
    apt-get remove certbot
    rm /usr/bin/certbot
    snap remove certbot-dns-cloudflare #to remove plugins if you already have it installed
    snap install --classic certbot
    ln -s /snap/bin/certbot /usr/bin/certbot
    snap set certbot trust-plugin-with-root=ok
    snap install certbot-dns-cloudflare
    
    NB: My idea to add all of these to ISPConfig was already shared via other threads (e.g. Attempt To Add Support Let's Encrypt Validation Via DNS), but there is nothing to update or add on that for the time being, since I have not attended to it ever since.

    except
     
    Last edited: Jul 30, 2024

Share This Page