Go to file
2023-07-11 00:21:17 +02:00
dist fix 2017-01-01 05:18:50 +01:00
test fix 2017-01-01 05:18:50 +01:00
ts remove npm letsencrypt 2017-01-01 14:25:46 +01:00
.gitignore fix .gitignore 2016-10-24 02:42:45 +02:00
.gitlab-ci.yml improve gitlab ci 2016-07-24 20:07:24 +02:00
LICENSE Initial commit 2016-04-10 01:19:30 +02:00
npmextra.json switch to new org scheme 2023-07-10 02:42:26 +02:00
package.json added smartacme 2017-01-03 08:15:09 +01:00
pnpm-lock.yaml switch to new org scheme 2023-07-11 00:21:17 +02:00
qenv.yml install step now working 2016-06-21 20:02:57 +02:00
README.md update README 2016-10-22 04:23:12 +02:00

Cert

Easily obain SSL certificates from LetsEncrypt. Supports DNS-01 challenge. TypeScript ready.

Availabililty

npm git git docs

Status for master

build status coverage report Dependency Status bitHound Dependencies bitHound Code TypeScript node JavaScript Style Guide

Usage

import {Cert} from "cert";

let myCert = new Cert({
    cfEmail: "some@cloudflare.email",
    cfKey: "someCloudflareApiKey",
    sslDir: "someOutputPath", // NOTE: if you already have certificates, make sure you put them in here, so cert only requires the missing ones
    gitOriginRepo: "git@githhub.com/someuser/somereopo" // good for persistence in highly volatile environments like docker
});

myCert.getDomainCert("example.com"); // returns promise

Note: cert supports async parallel cert fetching. However any subsequent calls will wait for the queue of the same dns zone to clear. In other words: test1.domain1.tld and test2.domain2.tld will run in parallel, but test2.domain1.tld will wait for test1.domain1.tld !

sslDir

to use the certificates it is important to understand what the structure of the ssl directory looks like.

using a git origin repo.

Often times you want to keep track of certificates in order to keep them even if the point of initial certificate request is gone. Imagine you have a dockerenvironement and you keep starting new container versions for the same domain. YOu ideally want to use a proxy that handles SSL managemet for you. But even the proxy needs to be updated from time to time.

So you need some kind of persistence between versions. This is why you can sync up all certificates to a git repo over ssh Just make sure your id_rsa is in place for the node user and is allowed for the origin repo.

npm