2016-08-05 07:41:42 +00:00
|
|
|
le-store-certbot
|
|
|
|
================
|
|
|
|
|
2018-05-13 00:49:48 +00:00
|
|
|
The "certbot" storage strategy for
|
|
|
|
[Greenlock.js](https://git.coolaj86.com/coolaj86/le-store-certbot.js).
|
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
|
2016-08-07 06:05:31 +00:00
|
|
|
npm install --save le-store-certbot@2.x
|
2016-08-05 07:41:42 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
var leStore = require('le-store-certbot').create({
|
2018-05-13 00:49:48 +00:00
|
|
|
configDir: require('homedir')() + '/acme/etc' // or /etc/acme or wherever
|
2016-08-08 22:42:13 +00:00
|
|
|
, privkeyPath: ':configDir/live/:hostname/privkey.pem' //
|
|
|
|
, fullchainPath: ':configDir/live/:hostname/fullchain.pem' // Note: both that :configDir and :hostname
|
|
|
|
, certPath: ':configDir/live/:hostname/cert.pem' // will be templated as expected by
|
2018-05-13 00:49:48 +00:00
|
|
|
, chainPath: ':configDir/live/:hostname/chain.pem' // greenlock.js
|
2016-08-05 07:41:42 +00:00
|
|
|
|
2018-05-13 04:03:06 +00:00
|
|
|
, logsDir: require('homedir')() + '/tmp/acme/log'
|
2016-08-05 07:41:42 +00:00
|
|
|
|
2018-05-13 00:49:48 +00:00
|
|
|
, webrootPath: '~/acme/srv/www/:hostname/.well-known/acme-challenge'
|
2016-08-07 06:05:31 +00:00
|
|
|
|
2016-08-05 07:41:42 +00:00
|
|
|
, debug: false
|
|
|
|
});
|
2018-05-13 00:49:48 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The store module can be used globally with Greenlock like this:
|
2016-08-05 07:41:42 +00:00
|
|
|
|
2018-05-13 00:49:48 +00:00
|
|
|
```
|
|
|
|
var Greenlock = require('greenlock');
|
2016-08-05 07:41:42 +00:00
|
|
|
|
2018-05-13 00:49:48 +00:00
|
|
|
Greenlock.create({
|
|
|
|
...
|
2016-08-05 07:41:42 +00:00
|
|
|
, store: leStore
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
Example File Structure
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
```
|
2018-05-13 00:49:48 +00:00
|
|
|
~/acme/
|
2016-08-05 07:41:42 +00:00
|
|
|
└── etc
|
|
|
|
├── accounts
|
|
|
|
│ └── acme-staging.api.letsencrypt.org
|
|
|
|
│ └── directory
|
|
|
|
│ └── cd96ac4889ddfa47bfc66300ab223342
|
|
|
|
│ ├── meta.json
|
|
|
|
│ ├── private_key.json
|
|
|
|
│ └── regr.json
|
|
|
|
├── archive
|
2018-05-13 00:49:48 +00:00
|
|
|
│ └── example.com
|
2016-08-05 07:41:42 +00:00
|
|
|
│ ├── cert0.pem
|
|
|
|
│ ├── chain0.pem
|
|
|
|
│ ├── fullchain0.pem
|
|
|
|
│ └── privkey0.pem
|
|
|
|
├── live
|
2018-05-13 00:49:48 +00:00
|
|
|
│ └── example.com
|
2016-08-05 07:41:42 +00:00
|
|
|
│ ├── cert.pem
|
|
|
|
│ ├── chain.pem
|
|
|
|
│ ├── fullchain.pem
|
|
|
|
│ ├── privkey.pem
|
|
|
|
│ └── privkey.pem.bak
|
|
|
|
└── renewal
|
2018-05-13 00:49:48 +00:00
|
|
|
├── example.com.conf
|
|
|
|
└── example.com.conf.bak
|
2016-08-05 07:41:42 +00:00
|
|
|
```
|