lets-encrypt-scripts/README.md

50 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2016-03-24 18:55:56 -06:00
# Lets Encrypt Scripts
2016-02-20 10:15:33 -07:00
2022-05-30 16:06:40 -06:00
Public Git URL: https://git.sosdg.org/brielle/lets-encrypt-scripts
2016-02-20 10:15:33 -07:00
2016-02-19 21:18:14 -07:00
By: Brielle Bruns <bruns@2mbit.com>
These are various scripts to make LetsEncrypt easier to use.
2016-03-24 18:55:56 -06:00
# Files
## Main Scripts
2016-02-19 21:18:14 -07:00
gen-cert.sh - Main script to make it easy to generate LE certs for domain(s)
2016-02-19 21:20:47 -07:00
2016-02-19 21:18:14 -07:00
gen-unifi-cert.sh - Script to add LE cert to a Unifi controller
2016-03-24 19:21:26 -06:00
## Support Files
2016-03-24 18:55:56 -06:00
2016-03-24 19:20:33 -06:00
DSTROOTCAX3.txt - Root CA cert for use with the gen-unifi-cert.sh script (now optional and unneeded as the cert is embedded)
2016-02-19 21:20:47 -07:00
2016-02-19 21:18:14 -07:00
apache-le-alias.conf - Use with apache for LE well-known alias config
2016-02-19 21:20:47 -07:00
2016-03-08 12:32:11 -07:00
apache-le-proxy.conf - Use with apache for LE well-known proxy config
2016-03-24 18:55:56 -06:00
# How To Use
2016-03-08 12:32:11 -07:00
2016-04-04 20:57:31 -06:00
## gen-cert.sh
1. Do initial cert generation (if using webroot, see script contents for more methods of authentication):
gen-cert.sh -e email@address.com -d somedomain.com -d otherdomain.com -r /var/www/letsencrypt-root/
2. Copy cron/renew-ssl-weekly.sh to /etc/cron.weekly, edit as appropriate
3. Run:
chmod 750 /etc/cron.weekly/renew-ssl-weekly.sh
3. Script will now run weekly and renew the certificate if necessary ( < 30 days remain). Don't forget to add any necessary file copies/symlinks/service restarts as needed once the scripts are updated.
2016-03-24 18:55:56 -06:00
## gen-unifi-cert.sh
2016-03-08 12:34:44 -07:00
2016-03-08 12:39:16 -07:00
1. Do initial cert generation:
2016-03-08 12:32:11 -07:00
2016-03-08 12:39:16 -07:00
gen-unifi-cert.sh -e email@address.com -d unifi.somedomain.com -d unifi.someotherdomain.com
2016-03-08 12:32:11 -07:00
2016-03-08 12:39:16 -07:00
2. Put in /etc/cron.weekly/renew-unifi-ssl if everything works okay:
2016-03-08 12:32:11 -07:00
2016-03-08 12:39:16 -07:00
/path/to/script/gen-unifi-cert.sh -r -d unifi.somedomain.com -d unifi.someotherdomain.com
2016-03-08 12:32:11 -07:00
2016-03-08 12:39:16 -07:00
3. Script will now run weekly and renew the certificate if necessary ( < 30 days remain) and restart unifi only if cert has been renewed.