You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.4 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. # le
  2. Simplest shell script for LetsEncrypt free Certificate client
  3. This is a shell version from https://github.com/diafygi/acme-tiny
  4. Pure written in bash, no dependencies to python , acme-tiny or LetsEncrypt official client (https://github.com/letsencrypt/letsencrypt)
  5. Just one script, to issue, renew your certificates automatically.
  6. Probably it's the smallest&easiest&smartest shell script to automatically issue&renew the free certificates from LetsEncrypt.
  7. #Supported OS
  8. 1. Ubuntu/Debian.
  9. 2. CentOS
  10. #How to use
  11. 1. Clone this project: https://github.com/Neilpang/le.git
  12. 2. Install le:
  13. ```
  14. ./le.sh install
  15. ```
  16. Which does 3 jobs:
  17. * create and copy `le.sh` to your home dir: `~/.le`
  18. All the certs will be placed in this folder.
  19. * create symbol link: `/bin/le -> ~/.le/le.sh`
  20. * create everyday cron job to check and renew the cert if needed.
  21. Ok, you are ready to issue cert now.
  22. Show help message:
  23. ```
  24. root@xvm:~# le
  25. Usage: issue|renew|renewAll|createAccountKey|createDomainKey|createCSR|install|uninstall
  26. root@xvm:~# le issue
  27. Usage: /bin/le webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path] [reloadCmd]
  28. ```
  29. # Just issue a cert:
  30. ```
  31. le issue /home/wwwroot/aa.com aa.com www.aa.com,cp.aa.com
  32. ```
  33. First argument `/home/wwwroot/aa.com` is the web root folder, You must have `write` access to this folder.
  34. Second argument "aa.com" is the main domain you want to issue cert for.
  35. Third argument is the additional domain list you want to use. Comma separated list, which is Optional.
  36. You must point and bind all the domains to the same webroot dir:`/home/wwwroot/aa.com`
  37. The cert will be placed in `~/.le/aa.com/`
  38. The issued cert will be renewed every 50 days automatically.
  39. # Issue a cert, and install to apache/nginx
  40. ```
  41. le issue /home/wwwroot/aa.com aa.com www.aa.com,cp.aa.com 2048 /path/to/certfile/in/apache/nginx /path/to/keyfile/in/apache/nginx "service apache2/nginx reload"
  42. ```
  43. Which issues the cert and then links it to the production apache or nginx path.
  44. The cert will be renewed every 50 days by default (which is configurable), Once the cert is renewed, the apache/nginx will be automatically reloaded by the command: ` service apache2 reload` or `service nginx reload`
  45. #Under the Hood
  46. Speak ACME language with bash directly to Let's encrypt.
  47. TODO:
  48. #License & Other
  49. License is GPLv3
  50. Please Star and Fork me.
  51. Issues and pullrequests are welcomed.