User Tools

Site Tools


documentation:letsencrypt_certificate_installation_and_renew

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:letsencrypt_certificate_installation_and_renew [2021/09/15 09:16]
daniele
documentation:letsencrypt_certificate_installation_and_renew [2021/09/15 09:19] (current)
daniele
Line 15: Line 15:
  
 **1 SSH into the server**\\ **1 SSH into the server**\\
 +
 SSH into the server running your HTTP website as a user with sudo privileges. SSH into the server running your HTTP website as a user with sudo privileges.
  
 **2 Install snapd**\\ **2 Install snapd**\\
 +
 You'll need to install snapd and make sure you follow any instructions to enable classic snap support.\\ You'll need to install snapd and make sure you follow any instructions to enable classic snap support.\\
 Follow these instructions on snapcraft's site to install snapd: [[https://snapcraft.io/docs/installing-snapd|https://snapcraft.io/docs/installing-snapd]] Follow these instructions on snapcraft's site to install snapd: [[https://snapcraft.io/docs/installing-snapd|https://snapcraft.io/docs/installing-snapd]]
  
 **3 Ensure that your version of snapd is up to date**\\ **3 Ensure that your version of snapd is up to date**\\
 +
 Execute the following instructions on the command line on the machine to ensure that you have the latest version of snapd.\\ Execute the following instructions on the command line on the machine to ensure that you have the latest version of snapd.\\
  
Line 27: Line 30:
  
 **4 Remove certbot-auto and any Certbot OS packages**\\ **4 Remove certbot-auto and any Certbot OS packages**\\
 +
 If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager.\\ If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager.\\
 The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot, sudo dnf remove certbot, or sudo yum remove certbot.\\ The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot, sudo dnf remove certbot, or sudo yum remove certbot.\\
 +
 If you previously used Certbot through the certbot-auto script, you should also remove its installation by following the instructions here [[https://certbot.eff.org/docs/uninstall.html|https://certbot.eff.org/docs/uninstall.html]] If you previously used Certbot through the certbot-auto script, you should also remove its installation by following the instructions here [[https://certbot.eff.org/docs/uninstall.html|https://certbot.eff.org/docs/uninstall.html]]
  
 **5 Install Certbot**\\ **5 Install Certbot**\\
 +
 Run this command on the command line on the machine to install Certbot. Run this command on the command line on the machine to install Certbot.
  
 sudo snap install --classic certbot sudo snap install --classic certbot
  
-**6 Prepare the Certbot command\\**+**6 Prepare the Certbot command**\\ 
 Execute the following instruction on the command line on the machine to ensure that the certbot command can be run. Execute the following instruction on the command line on the machine to ensure that the certbot command can be run.
  
Line 42: Line 49:
  
 **7 Choose how you'd like to run Certbot**\\ **7 Choose how you'd like to run Certbot**\\
 +
 Either get and install your certificates...\\ Either get and install your certificates...\\
 Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step. Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step.
Line 48: Line 56:
  
 **Or, just get a certificate**\\ **Or, just get a certificate**\\
 +
 If you're feeling more conservative and would like to make the changes to your Apache configuration by hand, run this command. If you're feeling more conservative and would like to make the changes to your Apache configuration by hand, run this command.
  
 sudo certbot certonly --apache sudo certbot certonly --apache
  
 +**8 Set the certificate on auto renew**\\
 +
 +Open crontab as sudo:
 +
 +sudo crontab -e
 +
 +Use the following command to execute the autorenw every day at noon:
  
 +0 12 * * * /usr/bin/certbot renew --quiet
  
documentation/letsencrypt_certificate_installation_and_renew.1631697410.txt.gz · Last modified: 2021/09/15 09:16 by daniele