- SSH into the server running your HTTP website as a user with sudo privileges.
- Make sure system packaged certbot is not installed:
sudo apt-get remove certbot
- Install python and other deps:
sudo apt update
sudo apt install python3 python3-venv libaugeas0
- Install certobot:
sudo /opt/certbot/bin/pip install certbot certbot-nginx
- Run certbot:
sudo certbot --nginx
- Follow the instructions.