This is just a quick cheatsheet to install and renew letsencrypt
certificates. Let’s say, your domain name is example.com
and your email address is [email protected]
and hosted on a CentOS server running Apache
.
Step 1: Install letsencrypt
# cd ~/src
# git clone https://github.com/letsencrypt/letsencrypt
# cd letsencrypt/
# chmod g+x letsencrypt-auto
# ./letsencrypt-auto
# service httpd restart
Step 2: Install certificates
# cd /src/letsencrypt/
# service httpd stop
# ./letsencrypt-auto --apache [email protected] -d example.com
# ./letsencrypt-auto certonly --webroot --webroot-path /var/www/html/ --renew-by-default [email protected] --text --agree-tos -d example.com -d www.example.com
Renew certificates
Let’s Encrypt certificates are issued for three months and need to be renewed periodically. If you want to renew the certificates manually instead of running a script, use the following commands.
# cd /src/letsencrypt/
# ./letsencrypt-auto renew
Leave a Reply