How to upgrade certbot (installed using snap) on Ubuntu 20.04?

My web server is (include version):
Open LIte Speed

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

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

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

Hi guys, I installed certbot following the installation guide with snap. But I can not upgrade my certbot . The commands apt update , apt upgrade only upgrade the other packages , and "apt list --upgradable" does not list certbot. Am I missing something?? How can I confirm if I have added certbot repositories??

thanks for your helps friends.

1 Like

Versio 0.40.0 really sounds like a version installed using apt and not using snap. Did you remove all non-snap versions of Certbot as instructed by the Certbot instruction guide?

Further more, if I understand Managing updates | Snapcraft documentation correctly, snaps are updated automatically.

4 Likes

Thanks Osiris for your comment, but I used these commands to install certbot

  1. Install / Verify “snapd” instalation.

sudo snap install core; sudo snap refresh core

  1. Delete any “certbot” installation on server

sudo apt-get remove certbot

  1. Fresh install of certbot

sudo snap install –classic certbot

  1. Testing that certbot can be executed

sudo ln -s /snap/bin/certbot /usr/bin/certbot

And as you say, it suppose snaps keeps certbot updated but it is not working. I am running this on AWS EC2 instance Ubuntu 20.04.

You may have multiple versions of certbot installed.
What shows?:
certbot --version
which certbot
find / -name certbot

3 Likes

Thanks @rg305 , this is the output

certbot --version
certbot 0.40.0

which certbot
/usr/bin/certbot

sudo find / -name certbot
[sudo] password for user:
/usr/share/doc/certbot
/usr/lib/python3/dist-packages/certbot
/usr/bin/certbot
/etc/cron.d/certbot
/etc/logrotate.d/certbot

1 Like

I don't see any /snap/lib/certbot in that list.
Only the old certbot 0.40.0 [installed from apt].

You say you ran those commands [post #3], but the system doesn't show any of that.
Did you happen to restore from a previous snapshot?

3 Likes

@rg305 , thanks for your time. I am sure I did run those command because was the guide I used to install my first certificate, at this moment I have 7 certs running on this server. To move forward, should I run the steps of the guide mentioned above to install certbot snap version?? Is there risk of conflicts with my current certificates that I am using?

  • Install snap core,
  • apt-get remove certbot
  • snap install -classic certbot
  • ln -s /snap/bin/certbot /usr/bin/certbot
3 Likes

If they are being managed by certbot, no.
It is upwards compatible.

3 Likes

My certs were installed and managed by certbot. Finally, I re-installed certbot as the guide, for sure I missed something last time but I think it is looking good now. Thanks @rg305 .

certbot --version
certbot 1.32.0

which certbot
/usr/bin/certbot

sudo find / -name certbot
/usr/lib/python3/dist-packages/certbot
/usr/bin/certbot
/var/snap/certbot
/snap/certbot
/snap/certbot/2511/bin/certbot
/snap/certbot/2511/lib/python3.8/site-packages/certbot
/snap/bin/certbot
/root/snap/certbot
/etc/cron.d/certbot
/etc/logrotate.d/certbot

3 Likes