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.

86 lines
2.2 KiB

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 certiricates automatically.
  6. Possiblly it's the smallest&easiest&smartest shell script to automatically issue&renew the free certificates from LetsEncrypt.
  7. #Supported OS
  8. 1. Tested on Ubuntu/Debian.
  9. 2. CentOS is Not tested yet, It should work.
  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 2 things:
  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/ls.sh`
  20. 3. Ok, you are ready to issue cert now.
  21. Show help message:
  22. ```
  23. root@xvm:~# le
  24. Usage: issue|renew|renewAll|createAccountKey|createDomainKey|createCSR|install|uninstall
  25. root@xvm:~# le issue
  26. Usage: /bin/le webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path] [reloadCmd]
  27. ```
  28. # Just issue a cert:
  29. ```
  30. le issue /home/wwwroot/aa.com aa.com www.aa.com,cp.aa.com
  31. ```
  32. First argument " /home/wwwroot/aa.com" is the web root folder
  33. Second argument "aa.com" is the domain you want to issue cert for.
  34. Third argument is the additional domain list you want to use. Comma sperated list, Optional.
  35. 'You must point and bind all the domains to the same webroot dir:/home/wwwroot/aa.com'
  36. The cert will be placed in `~/.le/aa.com/`
  37. The issued cert will be renewed every 50 days automatically.
  38. # Issue a cert, and install to apache
  39. ```
  40. 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 reload"
  41. ```
  42. This can link the issued cert to the production apache or nginx path.
  43. Once the cert is renewed, the apache/nginx will be automatically reloaded by the command: ` service apache2 reload`
  44. #Under the Hood
  45. Use bash to say ACME language directly to Let's encrypt.
  46. TODO:
  47. #License & Other
  48. License is GPLv3
  49. Please Star and Fock me.
  50. Issues and pullrequests are welcomed.