Install system dependencies
apt install python3 python3-venv libaugeas0
Remove any existing installation of Certbot
apt remove certbot
Set up a Python virtual environment
python3 -m venv /opt/certbot/
/opt/certbot/bin/pip install --upgrade pip
Install Certbot
/opt/certbot/bin/pip install certbot
Link the Certbot executable to make it accessible from the CLI
ln -s /opt/certbot/bin/certbot /usr/bin/certbot
Setup a cron job to automatically renew your cert(s)
echo "0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | tee /etc/cron.d/certbot && \
systemctl restart cron.service
Use the following command to keep Certbot up-to-date
/opt/certbot/bin/pip install --upgrade certbot
dnf install epel-release && \
dnf install certbot python3-certbot-nginx
Install
snap install --classic certbot
Create a symbolic link to the environment PATH location so that the certbot command can be run
ln -s /snap/bin/certbot /usr/bin/certbot