How To Get Let’s Encrypt Certificate on Ubuntu 20.04

07/06/2020Infrastructure,UbuntuLets Encrypt,Ubuntu


NOTICE: Certbot-auto can NOT Work on Ubuntu 20.04

Generally we can download certbot-auto and use it by using like the following commands,

wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto

Example: Get a certificate

certbot-auto certonly --manual -d <your domain> -m <your email address>

However if you use Ubuntu 20.04, the following error message may appear and command is failed.

Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-virtualenv' has no installation candidate


Solution on Ubuntu 20.04

Use certbot instead certbot-auto.

Install certbot

sudo apt install certbot

Set a correct symbolic link

ln -s /usr/bin/certbot /usr/sbin/certbot

All set. You can obtain certificates with the certbot command.

Example: Get a certificate

certbot certonly --manual -d <your domain> -m <your email address>