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.

98 lines
2.8 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
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: le issue webroot|no a.com [www.a.com,b.com,c.com]|no [key-length]|no [cert-file-path]|no [key-file-path]|no [ca-cert-file-path]|no [reloadCmd]|no
  28. ```
  29. You can set "no" to the param to use default falue.
  30. # Just issue a cert:
  31. ```
  32. le issue /home/wwwroot/aa.com aa.com www.aa.com,cp.aa.com
  33. ```
  34. First argument `/home/wwwroot/aa.com` is the web root folder, You must have `write` access to this folder.
  35. Second argument "aa.com" is the main domain you want to issue cert for.
  36. Third argument is the additional domain list you want to use. Comma separated list, which is Optional.
  37. You must point and bind all the domains to the same webroot dir:`/home/wwwroot/aa.com`
  38. The cert will be placed in `~/.le/aa.com/`
  39. The issued cert will be renewed every 50 days automatically.
  40. # Issue a cert, and install to apache/nginx
  41. ```
  42. 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 "/path/to/ca/certfil/apahce/nginx" "service apache2/nginx reload"
  43. ```
  44. Which issues the cert and then links it to the production apache or nginx path.
  45. 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`
  46. # Use Standalone server:
  47. Same usage as all above, just give `no` as the webroot.
  48. The tcp `80` port must be free to listen, otherwise you will be prompted to free the `80` port and try again.
  49. ```
  50. le issue no aa.com www.aa.com,cp.aa.com
  51. ```
  52. #Under the Hood
  53. Speak ACME language with bash directly to Let's encrypt.
  54. TODO:
  55. #License & Other
  56. License is GPLv3
  57. Please Star and Fork me.
  58. Issues and pullrequests are welcomed.