p:: CLI

instructions

  • Ensure that your version of snapd is up to date
sudo snap install core; sudo snap refresh core
core 16-2.54.4 from Canonical✓ installed
snap "core" has no updates available
  • Install certbot
sudo snap install --classic certbot
certbot 1.27.0 from Certbot Project (certbot-eff✓) installed
  • Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot
  • Choose how you’d like to run Certbot

Are you ok with temporarily stopping your website?

Yes, my web server is not currently running on this machine.

Stop your webserver, then run this command to get a certificate. Certbot will temporarily spin up a webserver on your machine.

sudo certbot certonly --standalone
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): yourwebsite.com
Requesting a certificate for yourwebsite.com
 
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/yourwebsite.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/yourwebsite.com/privkey.pem
This certificate expires on 2022-08-06.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • Confirm that Certbot worked

To confirm that your site is set up properly, visit https://yourwebsite.com/ in your browser and look for the lock icon in the URL bar.