This is just a quick cheatsheet to install and renew letsencrypt certificates. Let’s say, your domain name is and your email address is [email protected] and hosted on a CentOS server running Apache.

Step 1: Install letsencrypt

# cd ~/src
# git clone
# 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
# ./letsencrypt-auto certonly --webroot --webroot-path /var/www/html/ --renew-by-default [email protected] --text --agree-tos -d -d

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

Published by Ashiqur Rahman

Programmer and photography enthusiast.

Leave a comment

Your email address will not be published. Required fields are marked *