How to install a certbot dns plugin that is not available in the SnapStore using pip (certbot-dns-hetzner)

3.8k views Asked by At

Before I did use certbot-auto what is not supportet in my current system anymore:

cd /usr/local/bin/
curl https://dl.eff.org/certbot-auto > certbot-auto
chmod 755 certbot-auto
./certbot-auto

results in the following error message

Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives.

Now I'll have to install certbot using snap install --classic certbot what results in a completely other file structure so that my old installation with these commands does not work any longer (here installing the Hetzner DNS plugin).

cd /opt/eff.org/certbot/venv/bin
./pip2.7 install certbot-dns-hetzner

So how to install the plugins now? Where to find the certbot folders?

4

There are 4 answers

0
Ludwig On BEST ANSWER

I did the snap installation of certbot and a dns plugin this way (I am working as root in Ubuntu 18.04 so please prepend sudo if you're not root).

Don't be deceived

At least on Ubuntu I relly got deceived by certbot plugins, that did not show the plugin even though it is perfectly working.

Install pip, certbot (with snap) and then simply do the pip installation of the plugin.

apt install python3-pip
snap install --classic certbot
python3 -m pip install certbot-dns-hetzner
certbot plugins

Now certbot plugins does not list your installed plugin but again, don't get fooled, it will work (at least it did work for me).

If you are running into problems, have a look into the letsencrypt.log (normally /var/log/letsencrypt/letsencrypt.log) and find the paths let's encrypt searches for plugins (folder dist-packages). You should use the same python version, let's encrypt uses when installing your plugin.

The wrong way

After trying the right way above (not knowing that certbot already could find and use the dns plugin), I went on trying this. I thought this is the right way and got deceived by certbot plugin because the plugin showed up but was not found while running a certbot request. So this is just for the ones being interested in failures ;-)

Install certbot and check installed plugins:

snap install --classic certbot
certbot plugins

Install the desired dns plugin into your certbot (here Hetzner DNS) installation and check if installation succeeded:

cd /snap/certbot/current/usr/bin
./python3 -m pip install certbot-dns-hetzner
certbot plugins

Note: Some plugins are already prepared to be installed by snap, what is the easiest way of installation. Search the SnapStore to find out if your desired plugin is already available in a snap version (like certbot-dns-cloudxns, certbot-dns-madeeasy, certbot-dns-dnssimple, ...).

snap install certbot-dns-cloudxns
0
BigMichi1 On

you can try the snap published here: https://snapcraft.io/certbot-dns-hetzner

0
Alex On

The Plugins are available via snap, just use the find command to discover them

# snap find certbot
Name                      Version  Publisher        Notes    Summary
certbot                   1.20.0   certbot-eff✓     classic  Automatically configure HTTPS using Let's Encrypt
certbot-dns-cloudxns      1.20.0   certbot-eff✓     -        CloudXNS DNS Authenticator plugin for Certbot
certbot-dns-cloudflare    1.20.0   certbot-eff✓     -        Cloudflare DNS Authenticator plugin for Certbot
certbot-dns-dnsmadeeasy   1.20.0   certbot-eff✓     -        DNS Made Easy DNS Authenticator plugin for Certbot
certbot-dns-dnsimple      1.20.0   certbot-eff✓     -        DNSimple DNS Authenticator plugin for Certbot
certbot-dns-digitalocean  1.20.0   certbot-eff✓     -        DigitalOcean DNS Authenticator plugin for Certbot
certbot-dns-nsone         1.20.0   certbot-eff✓     -        NS1 DNS Authenticator plugin for Certbot
certbot-dns-sakuracloud   1.20.0   certbot-eff✓     -        Sakura Cloud DNS Authenticator plugin for Certbot
certbot-dns-rfc2136       1.20.0   certbot-eff✓     -        RFC 2136 DNS Authenticator plugin for Certbot
certbot-dns-ovh           1.20.0   certbot-eff✓     -        OVH DNS Authenticator plugin for Certbot
certbot-dns-luadns        1.20.0   certbot-eff✓     -        LuaDNS Authenticator plugin for Certbot
certbot-dns-linode        1.20.0   certbot-eff✓     -        Linode DNS Authenticator plugin for Certbot
certbot-dns-route53       1.20.0   certbot-eff✓     -        Route53 DNS Authenticator plugin for Certbot
certbot-dns-gehirn        1.20.0   certbot-eff✓     -        Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
certbot-dns-google        1.20.0   certbot-eff✓     -        Google Cloud DNS Authenticator plugin for Certbot
certbot-dns-hetzner       1.0.5    bigmichi1        -        Hetzner DNS Authenticator plugin for Certbot
certbot-dns-porkbun       v0.2.1   infinityofspace  -        Porkbun DNS Authenticator plugin for Certbot
certbot-dns-duckdns       v0.6.1   infinityofspace  -        DuckDNS Authenticator plugin for Certbot
certbot-dns-inwx          2.1.3    oggy             -        INWX DNS Authenticator plugin for Certbot
certbot-dns-aliyun        0.38.1   tengattack       -        Aliyun DNS Authenticator plugin for Certbot
passprox                  2.3.2    nsg              -        HAProxy with a bundled Certbot (Let's Encrypt support)
dnsrobocert               3.13.0   adferrand        -        Deploy and orchestrate DNS-challenged Let's Encrypt TLS certificates
tomcat-with-ssl           0.1      bsuttton         -        Apache Tomcat with SSL activated and managed by Certbot.

Then install with snap install certbot-dns-hetzner

0
clem On

I installed a DNS plugin pip install certbot-dns-ionos but certbot plugins would not display it.

So I followed this article and it fixed my issue: https://www.rushworth.us/lisa/?p=8887

sudo ln -s /usr/local/lib/python3.10/dist-packages/certbot_dns_ionos /usr/lib/python3/dist-packages/
sudo ln -s /usr/local/lib/python3.10/dist-packages/certbot-2.7.1.dist-info /usr/lib/python3/dist-packages