# le-store-certbot

> The "certbot" storage strategy for Greenlock.js

Latest version **2.2.4** (published 2024-05-13) · (MIT OR Apache-2.0) license · 0 weekly downloads

## Install

```sh
npm install le-store-certbot
pnpm add le-store-certbot
yarn add le-store-certbot
bun add le-store-certbot
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.4 |
| Published | 2024-05-13 |
| First published | 2016-08-09 |
| Weekly downloads | 0 |
| License | (MIT OR Apache-2.0) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 29.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AJ ONeal |
| Maintainers | coolaj86 |
| Keywords | le-store, le-store-, certbot, letsencrypt, node |

## Links

- npm: https://www.npmjs.com/package/le-store-certbot
- Repository: https://git.coolaj86.com/coolaj86/le-store-certbot.js
- Issues: https://git.coolaj86.com/coolaj86/le-store-certbot.js/issues
- npm.io page: https://npm.io/package/le-store-certbot

## Dependencies (3)

- [pyconf](https://npm.io/package/pyconf.md) ^1.1.7
- [@root/mkdirp](https://npm.io/package/@root/mkdirp.md) ^1.0.0
- [safe-replace](https://npm.io/package/safe-replace.md) ^1.1.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.2.4 (latest) — 2024-05-13
- 2.2.3 — 2019-04-16
- 2.2.2 — 2019-04-05
- 2.2.1 — 2018-11-06
- 2.2.0 — 2018-07-12
- 2.1.8 — 2018-07-05
- 2.1.7 — 2018-07-04
- 2.1.3 — 2018-06-15
- 2.1.2 — 2018-05-21
- 2.1.0 — 2018-05-13
- 2.0.5 — 2017-04-14
- 2.0.4 — 2017-04-14
- 2.0.3 — 2016-08-10
- 2.0.2 — 2016-08-10
- 2.0.1 — 2016-08-09
- … 1 more at https://npm.io/package/le-store-certbot/versions

## README

# 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

The "certbot" storage strategy for
[Greenlock.js](https://git.coolaj86.com/coolaj86/le-store-certbot.js).

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@2.x
```

```bash
var leStore = require('le-store-certbot').create({
  configDir: require('homedir')() + '/acme/etc'          // or /etc/acme or wherever
, 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
, chainPath: ':configDir/live/:hostname/chain.pem'              //       greenlock.js

, logsDir: require('homedir')() + '/tmp/acme/log'

, webrootPath: '~/acme/srv/www/:hostname/.well-known/acme-challenge'

, debug: false
});
```

The store module can be used globally with Greenlock like this:

```
var Greenlock = require('greenlock');

Greenlock.create({
  ...
, store: leStore
});
```

Example File Structure
----------------------

```
~/acme/
└── etc
    ├── accounts
    │   └── acme-staging.api.letsencrypt.org
    │       └── directory
    │           └── cd96ac4889ddfa47bfc66300ab223342
    │               ├── meta.json
    │               ├── private_key.json
    │               └── regr.json
    ├── archive
    │   └── example.com
    │       ├── cert0.pem
    │       ├── chain0.pem
    │       ├── fullchain0.pem
    │       └── privkey0.pem
    ├── live
    │   └── example.com
    │       ├── cert.pem
    │       ├── chain.pem
    │       ├── fullchain.pem
    │       ├── privkey.pem
    │       └── privkey.pem.bak
    └── renewal
        ├── example.com.conf
        └── example.com.conf.bak
```

---
_Source: https://npm.io/package/le-store-certbot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
