certbot

Certbot commands

Install certbot

wget https://raw.githubusercontent.com/serverok/server-setup/master/install/letsencrypt.sh
bash letsencrypt.sh

OR

cd /usr/bin
wget https://dl.eff.org/certbot-auto
chmod a+x /usr/bin/certbot-auto
mv /usr/bin/certbot-auto /usr/bin/certbot

Install SSL certificate on Apache

certbot --authenticator webroot --webroot-path PATH_TO_DOC_ROOT_HERE --installer apache --agree-tos --no-eff-email --email [email protected] -d YOUR-DOMAIN.EXT -d www.YOUR-DOMAIN.EXT

On Nginx

certbot --authenticator webroot --webroot-path PATH_TO_DOC_ROOT_HERE --installer nginx --agree-tos  --no-eff-email --email [email protected] -d YOUR-DOMAIN.EXT -d www.YOUR-DOMAIN.EXT

This will stop web server. Generate SSL, then start web server.

Getting SSL with out installing

certbot certonly --authenticator webroot --webroot-path PATH_TO_DOC_ROOT_HERE --agree-tos --email [email protected] -d YOUR-DOMAIN.EXT

Getting SSL with out web server

Domain should be pointed to the server IP and IP should be public to generate SSL. Run the following command.

certbot certonly --standalone --agree-tos --no-eff-email --email [email protected] -d YOUR-DOMAIN.EXT

Auto Renew SSL Certificate

Set the following cronjob to auto-renew SSL

crontab -e

Add

@weekly /usr/bin/certbot renew > /var/log/le-renew.log 2>&1

List All SSL

certbot certificates

Change the Email Associated with the account

certbot register --update-registration --email YOUR_EMAIL_HERE

Search for LetsEncrypt SSL status

https://crt.sh

LetsEncrypt Renewal file

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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