In case you have a requirement to automate the certificate installation without docker and you have installed certificate on
Ubuntu Machine 18.04 using.
sudo apt install software-properties-common
.
sudo apt update
.
sudo add-apt-repository ppa:certbot/certbot
.
sudo apt update
.
sudo apt-get install python-certbot-nginx
.
sudo apt install python3-pip
.
sudo pip3 install certbot-dns-route53
.
Don't do sudo apt install certbot. Because the latest version there doesn't get updated and you will run into this error .
pkg_resources.VersionConflict: (certbot 0.31.0 (/usr/lib/python3/dist-packages), Requirement.parse('certbot>=0.34.0')) Please see the logfile '/tmp/tmp6nwxhyt_' for more details.
.
Because pip3 will install the latest version of the certbot and the ubuntu one and python one will clash.
To avoid this. Either don't install or if you have followed the digitalocean guide and you already did. Run
sudo apt-get remove certbot
.
This should fix it.
Finally command is sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -d *.rylah.in