le-store-certbot.js/README.md

70 lines
2.1 KiB
Markdown
Raw Normal View History

2016-08-05 07:41:42 +00:00
le-store-certbot
================
2016-08-05 04:55:31 +00:00
The "certbot" storage strategy for node-letsencrypt.
2016-08-05 07:41:42 +00:00
This le storage strategy aims to maintain compatibility with the
configuration files and file structure of the official certbot client.
Note: You cannot use this strategy on ephemeral instances (heroku, aws elastic).
Usage
-----
```bash
npm install --save le-store-certbot
```
```bash
var leStore = require('le-store-certbot').create({
configDir: require('homedir')() + '/letsencrypt/etc' // or /etc/letsencrypt or wherever
, privkeyPath: ':config/live/:hostname/privkey.pem' //
, fullchainPath: ':config/live/:hostname/fullchain.pem' // Note: both that :config and :hostname
, certPath: ':config/live/:hostname/cert.pem' // will be templated as expected by
, chainPath: ':config/live/:hostname/chain.pem' // node-letsencrypt
, workDir: require('homedir')() + '/letsencrypt/var/lib'
, logsDir: require('homedir')() + '/letsencrypt/var/log'
, debug: false
});
var LE = require('letsencrypt');
LE.create({
server: LE.stagingServerUrl // Change to LE.productionServerUrl in production
, store: leStore
});
```
Example File Structure
----------------------
```
~/letsencrypt/
└── etc
├── accounts
│   └── acme-staging.api.letsencrypt.org
│   └── directory
│   └── cd96ac4889ddfa47bfc66300ab223342
│   ├── meta.json
│   ├── private_key.json
│   └── regr.json
├── archive
│   └── example.daplie.me
│   ├── cert0.pem
│   ├── chain0.pem
│   ├── fullchain0.pem
│   └── privkey0.pem
├── live
│   └── example.daplie.me
│   ├── cert.pem
│   ├── chain.pem
│   ├── fullchain.pem
│   ├── privkey.pem
│   └── privkey.pem.bak
└── renewal
├── example.daplie.me.conf
└── example.daplie.me.conf.bak
```