⚠️ don't use this yet ⚠️ First pass at a Node.js wrapper around the certbot command-line tool https://certbot.eff.org
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
.travis.yml
CHANGELOG.md
CONDUCT.md
CONTRIBUTING.md
LICENSE.md
README.md
example.js
index.js
package.json

README.md

certbot-wrapper

Create Let's Encrypt SSL certificates from Node.js using the certbot command-line tool.

npm travis standard conduct

About

A Node.js wrapper around the certbot command-line tool.

This module was built for staticland and related projects.

Work in progress

This module is a minimal wrapper around the certbot command, so should be reliable, but it has also only seen minimal testing.

What works?

Only the certonly and renew methods have been tested and used regularly. Other methods should work, but haven't been used regularly yet.

This module has only been tested and used on recent versions of Ubuntu. We recommend Ubuntu 16.10.

Requirements

  • Use Ubuntu 16.10 or newer
  • Use certbot version // TODO: ???????
  • Use nginx version // TODO: ???????

Why this module?

I tried using a couple different Node.js clients for ACME (the cert issuer that Let's Encrypt uses), but found them difficult to use, and in one case ended up getting invalid certs because of something not working correctly that was very difficult to debug.

Running commands from Node has drawbacks as well, but at least this way the complicated logic is left up to the official certbot command that is recommended for use and well-maintained. This module's job is just to run that command.

It currently is used by static.land to request certs.

Install

First install the certbot command

TODO: certbot install instructions

npm install --save certbot-wrapper

Usage

All arguments are passed to the command-line tool.

Property keys in camelCase format will be converted to --camel-case for the certbot command.

var certbotWrapper = require('certbot-wrapper')

var certbot = certbotWrapper({
  command: '/path/to/certbot/command'
})

var args = {
  staging: true,
  standalone: true,
  domains: ['faketest.static.land'],
  agreeTos: true,
  email: 'hi@static.land',
  text: true
}

certbot.certonly(args, function (err, stdout, stderr) {
  console.log(err, stdout, stderr)
})

Documentation

Examples

Contributing

Contributions are welcome! Please read the contributing guidelines first.

Conduct

It's important that this project contributes to a friendly, safe, and welcoming environment for all, particularly for folks that are historically underrepresented in technology. Read this project's code of conduct

Change log

Read about the changes to this project in CHANGELOG.md. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Contact

License

ISC