Snap install of `certbot` is not at latest version

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: not domain related question

I ran this command: certbot --version

It produced this output: See below

My web server is (include version):

The operating system my web server runs on is (include version): Ubuntu 20.04

My hosting provider, if applicable, is: NA

I can login to a root shell on my machine (yes or no, or I don't know): YES

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): NO

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.20.0


$ snap find certbot
Name                      Version  Publisher        Notes    Summary
certbot                   1.22.0   certbot-effâś“     classic  Automatically configure HTTPS using Let's Encrypt
certbot-dns-cloudxns      1.22.0   certbot-effâś“     -        CloudXNS DNS Authenticator plugin for Certbot
certbot-dns-cloudflare    1.22.0   certbot-effâś“     -        Cloudflare DNS Authenticator plugin for Certbot
certbot-dns-dnsmadeeasy   1.22.0   certbot-effâś“     -        DNS Made Easy DNS Authenticator plugin for Certbot
certbot-dns-dnsimple      1.22.0   certbot-effâś“     -        DNSimple DNS Authenticator plugin for Certbot
certbot-dns-digitalocean  1.22.0   certbot-effâś“     -        DigitalOcean DNS Authenticator plugin for Certbot
certbot-dns-nsone         1.22.0   certbot-effâś“     -        NS1 DNS Authenticator plugin for Certbot
certbot-dns-sakuracloud   1.22.0   certbot-effâś“     -        Sakura Cloud DNS Authenticator plugin for Certbot
certbot-dns-rfc2136       1.22.0   certbot-effâś“     -        RFC 2136 DNS Authenticator plugin for Certbot
certbot-dns-ovh           1.22.0   certbot-effâś“     -        OVH DNS Authenticator plugin for Certbot
certbot-dns-luadns        1.22.0   certbot-effâś“     -        LuaDNS Authenticator plugin for Certbot
certbot-dns-linode        1.22.0   certbot-effâś“     -        Linode DNS Authenticator plugin for Certbot
certbot-dns-route53       1.22.0   certbot-effâś“     -        Route53 DNS Authenticator plugin for Certbot
certbot-dns-gehirn        1.22.0   certbot-effâś“     -        Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
certbot-dns-google        1.22.0   certbot-effâś“     -        Google Cloud DNS Authenticator plugin for Certbot
certbot-dns-hetzner       1.22.0   bigmichi1        -        Hetzner DNS Authenticator plugin for Certbot
certbot-dns-porkbun       v0.2.1   infinityofspace  -        Porkbun DNS Authenticator plugin for Certbot
certbot-dns-dnspod        0.24.1   ericzhang456     -        DNSPod 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.2   tengattack       -        Aliyun DNS Authenticator plugin for Certbot
passprox                  2.3.2    nsg              -        HAProxy with a bundled Certbot (Let's Encrypt support)
dnsrobocert               3.15.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.
$ certbot --version
certbot 1.20.0
certbot@ply-certbot03:/snap/bin$ which certbot
/usr/local/bin/certbot
certbot@ply-certbot03:/snap/bin$ ls -lsa /usr/local/bin | grep certbot
0 lrwxrwxrwx  1 root root   24 Oct 20 19:30 certbot -> /opt/certbot/bin/certbot

$ apt list --installed | grep -i -E 'certb|lets'

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
$

$ systemctl status snapd.socket
â—Ź snapd.socket - Socket activation for snappy daemon
     Loaded: loaded (/lib/systemd/system/snapd.socket; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-10-21 03:57:28 UTC; 2 months 15 days ago
   Triggers: â—Ź snapd.service
     Listen: /run/snapd.socket (Stream)
             /run/snapd-snap.socket (Stream)
      Tasks: 0 (limit: 7029)
     Memory: 20.0K
     CGroup: /system.slice/snapd.socket

1 Like

That should be:
/snap/bin/certbot

Seems like you have multiple certbot versions installed.

Try:
/snap/bin/certbot --version

2 Likes

Thanks for the help.

$ /snap/bin/certbot --version
-bash: /snap/bin/certbot: No such file or directory

I expected something under /bin/snap, but there was no certbot there, although it looks like it was NOT installed via apt, and there is output from snap find

2 Likes

maybe it was pip installed?? Still would not expect snap find to have results for certbot though.

# find / -name "certbot" -ls
   662149      0 lrwxrwxrwx   1 root     root           24 Oct 20 19:29 /usr/bin/certbot -> /opt/certbot/bin/certbot
   677630      0 lrwxrwxrwx   1 root     root           24 Oct 20 19:30 /usr/local/bin/certbot -> /opt/certbot/bin/certbot
   404959      4 drwxr-xr-x   6 root     root         4096 Oct 20 19:17 /opt/certbot
   409689      4 -rwxr-xr-x   1 root     root          219 Oct 20 19:20 /opt/certbot/bin/certbot
   409314      4 drwxr-xr-x   8 root     root         4096 Oct 20 19:20 /opt/certbot/lib/python3.8/site-packages/certbot
       23      4 -rw-------   1 certbot  crontab      1824 Jan  5 16:20 /var/spool/cron/crontabs/certbot
      814      4 -rw-------   1 root     certbot       224 Jan  5 02:18 /run/sudo/ts/certbot
   400974      4 drwxr-xr-x  12 certbot  certbot      4096 Jan  4 03:55 /srv/certbot
   801299      4 drwxr-xr-x   3 certbot  certbot      4096 Jan  5 05:12 /home/certbot
1 Like

That looks like it was manually downloaded and compiled.

1 Like

it does, doesn't it? Maybe that's what was done. Strange.

1 Like

FWIW, doesn't look to be anything from PIP

certifi                2019.11.28
root@ply-certbot03:/snap/bin# pip3 list | grep -i cert
certifi                2019.11.28
1 Like

Yes, APT is also at 0.40.0
I don't know where you got 1.20.0 from.

What happens with?:
snap install certbot --classic

I end up with:

find / -name certbot -ls
   788164      4 drwxr-xr-x   4 root  root    4096 Jan  5 20:09 /var/snap/certbot
  2359544      4 drwxr-xr-x   4 root  root    4096 Jan  5 20:09 /root/snap/certbot
   262165      4 drwxr-xr-x   3 root  root    4096 Jan  5 20:09 /snap/certbot
        6      1 -rwxr-xr-x   1 root  root     215 Dec  7 22:12 /snap/certbot/1670/bin/certbot
      106      0 drwxr-xr-x   8 root  root     333 Dec  7 22:12 /snap/certbot/1670/lib/python3.8/site-packages/certbot
   262167      0 lrwxrwxrwx   1 root  root      13 Jan  5 20:09 /snap/bin/certbot -> /usr/bin/snap
1 Like

/opt/ used to be the place where the certbot-auto script would put Certbot, but AFAIK that was /opt/eff/certbot.. Maybe looking at the directory with ls -la /opt/certbot would shed some light on the situation. I'm guessing pip. And I'm also guessing Certbot wasn't installed (properly) using snap.

2 Likes

Thanks Osiris.

# ls -la /opt/certbot
total 28
drwxr-xr-x 6 root root 4096 Oct 20 19:17 .
drwxr-xr-x 5 root root 4096 Oct 22 18:50 ..
drwxr-xr-x 2 root root 4096 Oct 20 19:20 bin
drwxr-xr-x 2 root root 4096 Oct 20 19:17 include
drwxr-xr-x 3 root root 4096 Oct 20 19:17 lib
lrwxrwxrwx 1 root root    3 Oct 20 19:17 lib64 -> lib
-rw-r--r-- 1 root root   70 Oct 20 19:17 pyvenv.cfg
drwxr-xr-x 3 root root 4096 Oct 20 19:17 share
3 Likes

Looks like a Python virtual environment with certbot probably installed using pip.

I recommend you to debug why your snap install of certbot didn't work. Could you try again to install using snap and post all the output here?

2 Likes

thanks, I will do that

2 Likes

I reinstalled, and it seems to be working now.

3 Likes

Did you get rid of the 1.20.0 version?

2 Likes

I did. I think there was still something hangin around, so i deleted everything and started from scratch. I had tried snap install and pip install, but although I was removing one before I tried the other, I think there was still an issue related to have both. I started with a clean slate and tested snap install, but then removed it in favor of the pip install, since it has plugin modules not available via snap. Thanks for the help.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.