All the command that I use for Let's encrypt

Install Certbot

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx

Process Certbot Domain

sudo certbot --nginx -d -d
sudo certbot renew --dry-run

Check all certificate

sudo certbot certificates

Adding subdomain from existing certificate

lets say you've done this
sudo certbot --nginx -d -d
then just rewrite it again
sudo certbot --nginx -d -d -

Delete certificate

sudo certbot delete --cert-name


Certbot renew error – Invalid response from

  1. Try to make folder .well-known/acme-challenge/test.html and run it to browser if works try again.
  2. Try to stop nginx and start it again... not reload but to stop first and start again.

Worth to look

  • /etc/letsencrypt/archive
  • /etc/letsencrypt/live
  • /etc/letsencrypt/renewal