2019-04-05 05:02:41 +00:00
|
|
|
# Deprecated
|
|
|
|
|
|
|
|
`le-store-certbot` has been replaced with [`le-store-fs`](https://git.coolaj86.com/coolaj86/le-store-fs.js).
|
|
|
|
|
|
|
|
The new storage strategy **keeps file system compatibility**, but **drops support** for Python config files.
|
|
|
|
|
|
|
|
Unless you're running `certbot` and Greenlock side-by-side, or interchangeably, you switch to `le-store-fs`.
|
|
|
|
|
|
|
|
## Migrating to `le-store-fs`
|
|
|
|
|
|
|
|
It's **painless** and all of your existing certificates will be **preserved**
|
|
|
|
(assuming you use the same `configDir` as before).
|
|
|
|
|
|
|
|
```js
|
|
|
|
Greenlock.create({
|
|
|
|
|
|
|
|
// Leave configDir as it, if you've been setting it yourself.
|
|
|
|
// Otherwise you should explicitly set it to the previous default:
|
|
|
|
configDir: '~/letsencrypt/etc'
|
|
|
|
|
|
|
|
// le-store-fs takes the same options as le-store-certbot,
|
|
|
|
// but ignores some of the ones that aren't important.
|
|
|
|
, store: require('le-store-fs').create({})
|
|
|
|
|
|
|
|
...
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
## Alternatives
|
|
|
|
|
|
|
|
* Search npm for ["le-store-"](https://www.npmjs.com/search?q=le-store-) to find many alternatives.
|
|
|
|
|
|
|
|
# le-store-certbot
|
2016-08-05 07:41:42 +00:00
|
|
|
|
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
|
|
|
```
|