Install letsencrypt
1 2 |
wget https://raw.githubusercontent.com/serverok/server-setup/master/install/letsencrypt.sh sh ./letsencrypt.sh |
OR
1 2 3 4 |
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
1 |
certbot --authenticator webroot --webroot-path <path to served directory> --installer apache --agree-tos --email admin@serverok.in -d YOUR-DOMAIN.EXT -d www.YOUR-DOMAIN.EXT |
On Nginx
1 |
certbot --authenticator webroot --webroot-path <path to served directory> --installer nginx --agree-tos --email admin@serverok.in -d YOUR-DOMAIN.EXT -d www.YOUR-DOMAIN.EXT |
This will stop web server. Generate SSL, then start web server.
Getting SSL with out web server
Domain should be pointed to the server IP and IP should be public to generate SSL. Run following command.
1 |
certbot certonly --standalone -d YOUR-DOMAIN.EXT |
Auto Renew SSL Certificate
Set following cronjob to auto renew SSL
1 |
crontab -e |
Add
1 |
30 2 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log |
List All SSL
1 |
certbot certificates |
Change Email Associated with account
1 |
certbot register --update-registration --email YOUR_EMAIL_HERE |
Search for LetsEncrypt SSL status
certbot certificates
Enable LetsEncrypt SSL in ISPConfig
Nginx Proxy SSL Verification