# @abtnode/certificate-manager

> Manage ABT Node SSL certificates

Latest version **1.17.12** (published 2026-04-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @abtnode/certificate-manager
pnpm add @abtnode/certificate-manager
yarn add @abtnode/certificate-manager
bun add @abtnode/certificate-manager
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.17.12 |
| Published | 2026-04-22 |
| First published | 2022-01-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 32.8 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | polunzh |
| Maintainers | wangshijun, polunzh, mave99a |

## Links

- npm: https://www.npmjs.com/package/@abtnode/certificate-manager
- Repository: https://github.com/ArcBlock/blocklet-server
- Homepage: https://github.com/ArcBlock/blocklet-server#readme
- Issues: https://github.com/ArcBlock/blocklet-server/issues
- npm.io page: https://npm.io/package/@abtnode/certificate-manager

## Dependencies (16)

- [joi](https://npm.io/package/joi.md) 17.12.2
- [debug](https://npm.io/package/debug.md) ^4.4.1
- [express](https://npm.io/package/express.md) ^4.18.2
- [punycode](https://npm.io/package/punycode.md) ^2.3.1
- [@root/csr](https://npm.io/package/@root/csr.md) ^0.8.1
- [@root/pem](https://npm.io/package/@root/pem.md) ^1.0.4
- [@fidm/x509](https://npm.io/package/@fidm/x509.md) ^1.2.1
- [@root/acme](https://npm.io/package/@root/acme.md) ^3.1.0
- [@abtnode/cron](https://npm.io/package/@abtnode/cron.md) 1.17.12
- [@abtnode/util](https://npm.io/package/@abtnode/util.md) 1.17.12
- [@abtnode/queue](https://npm.io/package/@abtnode/queue.md) 1.17.12
- [@root/keypairs](https://npm.io/package/@root/keypairs.md) ^0.10.3
- [@abtnode/logger](https://npm.io/package/@abtnode/logger.md) 1.17.12
- [@abtnode/models](https://npm.io/package/@abtnode/models.md) 1.17.12
- [@blocklet/error](https://npm.io/package/@blocklet/error.md) ^0.3.5
- [@greenlock/manager](https://npm.io/package/@greenlock/manager.md) ^3.1.0

## Recent versions

- 1.17.12 (latest) — 2026-04-22
- 1.17.13-beta-20261020-042751-541e5c03 (beta) — 2026-10-20
- 1.16.29-next-680cf137 (next) — 2024-07-19
- 1.17.13-beta-20261019-135643-7047c876 — 2026-10-19
- 1.17.13-beta-20261019-111429-5cdb5af8 — 2026-10-19
- 1.17.13-beta-20261019-082907-fe71de61 — 2026-10-19
- 1.17.13-beta-20261019-070231-87338763 — 2026-10-19
- 1.17.13-beta-20261019-060220-4c251fcf — 2026-10-19
- 1.17.13-beta-20261019-013222-23d4b329 — 2026-10-19
- 1.17.13-beta-20261018-133339-4428feb0 — 2026-10-18
- 1.17.13-beta-20261018-131740-92d9b271 — 2026-10-18
- 1.17.13-beta-20261018-112055-27bdf21c — 2026-10-18
- 1.17.13-beta-20261018-074057-557246bf — 2026-10-18
- 1.17.13-beta-20261018-055715-2b3472bb — 2026-10-18
- 1.17.13-beta-20261018-053134-df4f1988 — 2026-10-18
- … 1011 more at https://npm.io/package/@abtnode/certificate-manager/versions

## README

# Certificate Manager

Manage SSL certificates:

- 管理上传的证书
- 生成/自动更新 Let's Encrypt 证书
- 过期提醒

## Usage

### Well-known route

```javascript
const certificateManager = require('@abtnode/certificate-manager');

app.use(certificateManager.routes);
```

### Core Manager

#### Initialize

```javascript
const CertificateManager = require('@abtnode/certificate-manager/sdk/manager');

const certManager = new CertificateManager({
  maintainerEmail: '{email of the certificate manager}',
  dataDir: '{data directory of the certificate manager}',
});

certManager.start(); // Start renewal cron jobs
```

#### Events

1. cert.issued: Issue certificate successfully
1. cert.error: Issue certificate failed

#### CRUD

- `getAll()`: Get all certificates, includes in-progress status.
- `getAllNormal()`: Get normal state certificate, without in-progress status.
- `getByDomain(domain)`: Get the certificate by domain.
- `add(certificate)`: Add certificate to database.
- `issue(domain)`: Add the generate certificate task.
- `upsertByDomain(certificate)`: Add certificate to database, if the domain already exists, update it.
- `update(id, certificate)`: Update certificate by ID.
- `remove(id)`: Remove certificate by ID.
- `addWithoutValidations(certificate)`: Same as `add(certificate)`, but no data validation.

---
_Source: https://npm.io/package/@abtnode/certificate-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
