|
| 1 | +# simp_le |
| 2 | + |
| 3 | +Simple [Let's Encrypt](https://letsencrypt.org) client. |
| 4 | + |
| 5 | +```shell |
| 6 | +simp_le -f fullchain.pem -f key.pem \ |
| 7 | + -d example.com -d www.example.com --default_root /var/www/html \ |
| 8 | + -d other.com:/var/www/other_html |
| 9 | +``` |
| 10 | + |
| 11 | +For more info see `simp_le --help`. |
| 12 | + |
| 13 | +## Manifest |
| 14 | + |
| 15 | +1. [UNIX philosophy](https://en.wikipedia.org/wiki/Unix_philosophy): |
| 16 | + Do one thing and do it well! |
| 17 | + |
| 18 | +2. `simp_le --valid_min ${seconds?} -f cert.pem` implies that |
| 19 | + `cert.pem` is valid for at at least `valid_min`. Register new ACME |
| 20 | + CA account if necessary. Issue new certificate if no previous |
| 21 | + key/certificate/chain found. Renew only if necessary. |
| 22 | + |
| 23 | +3. (Sophisticated) "manager" for |
| 24 | + `${webroot?}/.well-known/acme-challenges` only. No challenges other |
| 25 | + than `http-01`. Existing web-server must be be running already. |
| 26 | + |
| 27 | +4. No magical webserver auto-configuration. |
| 28 | + |
| 29 | +5. Owner of `${webroot?}/.well-known/acme-challenges` must be able to |
| 30 | + run the script, without privilege escalation (`sudo`, `root`, |
| 31 | + etc.). |
| 32 | + |
| 33 | +6. `crontab` friendly: fully automatable - no prompts, etc. |
| 34 | + |
| 35 | +7. No configuration files. CLI flags as the sole interface! Users |
| 36 | + should write their own wrapper scripts or use shell aliases if |
| 37 | + necessary. |
| 38 | + |
| 39 | +8. Support multiple domains with multiple roots. Always create single |
| 40 | + SAN certificate per `simp_le` run. |
| 41 | + |
| 42 | +9. Flexible storage capabilities. Built-in `simp_le -f fullchain.pem |
| 43 | + -f privkey.pem`, `simp_le -f chain.pem -f cert.pem -d privkey.pem`, |
| 44 | + etc. Extensions through `simp_le -f external_pem.sh`. |
| 45 | + |
| 46 | +10. Do not allow specifying output file paths. Users should symlink if |
| 47 | + necessary! |
| 48 | + |
| 49 | +11. No need to allow arbitrary command when renewal has happened: just |
| 50 | + compare cert before and after (`sha256sum`, `mtime`, etc.). |
| 51 | + |
| 52 | +12. `--server` (support multiple CAs). |
| 53 | + |
| 54 | +## Installation |
| 55 | + |
| 56 | +```shell |
| 57 | +sudo ./bootstrap.sh |
| 58 | +./venv.sh |
| 59 | +. venv/bin/activate |
| 60 | +``` |
| 61 | + |
| 62 | +## Examples |
| 63 | + |
| 64 | +Have a look into `./examples/`. |
0 commit comments