Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nachbarshund/b11888bdbc4f27cefc4950eaea7d1abc to your computer and use it in GitHub Desktop.
Save nachbarshund/b11888bdbc4f27cefc4950eaea7d1abc to your computer and use it in GitHub Desktop.

Install certbot

sudo su
yum install wget -y
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

Install certificate

(if we have no webroot yet, create one now by executing mkdir /var/www)

/opt/certbot-auto certonly --webroot -w /var/www -d your.domain.tld --debug

Create renew-certs cronjob

nano /etc/cron.daily/certbot-renew
#! /bin/sh
/opt/certbot-auto renew
service nginx reload

http://blog.werise.de/2016/01/23/setting-up-a-letsencrypt-ssl-cert-with-nginx.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment