Zeit DNS for Let's Encrypt / ACME dns-01 challenges with ACME.js and Greenlock.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matteo Cannata cd74fd0740 Fix readme 2 months ago
lib v3.0.0: initial release 2 months ago
.gitignore v3.0.0: initial release 2 months ago
.prettierrc v3.0.0: initial release 2 months ago
AUTHORS v3.0.0: initial release 2 months ago
LICENSE Initial commit 2 months ago
README.md Fix readme 2 months ago
index.js v3.0.0: initial release 2 months ago
package.json Fix readme 2 months ago
test.js v3.0.0: initial release 2 months ago

README.md

acme-dns-01-zeit | a Root project

Zeit DNS + Let's Encrypt for Node.js

This handles ACME dns-01 challenges, compatible with ACME.js and Greenlock.js. Passes acme-dns-01-test.

Install

npm install --save acme-dns-01-zeit@3.x

Generate Zeit API Token:

Usage

Greenlock.js

server.js:

'use strict';

var app = require('./app.js');

require('greenlock-express')
	.init({
		packageRoot: __dirname,
		configDir: './greenlock.d',

		// contact for security and critical bug notices
		maintainerEmail: 'jon@example.com',

		// whether or not to run at cloudscale
		cluster: false
	})
	// Serves on 80 and 443
	// Get's SSL certificates magically!
	.serve(app);

./greenlock.d/config.json:

{
	"sites": [
		{
			"subject": "example.com",
			"altnames": ["example.com"],
			"challenges": {
				"dns-01": {
					"module": "acme-dns-01-zeit",
					"token": "xxxx"
				}
			}
		}
	]
}

See Greenlock Express and/or Greenlock.js documentation for more details.

ACME.js

// TODO

See the ACME.js for more details.

Build your own

dns01
	.set({
		identifier: { value: 'foo.example.com' },
		wildcard: false,
		dnsHost: '_acme-challenge.foo.example.com',
		dnsAuthorization: 'xxx_secret_xxx'
	})
	.then(function() {
		console.log('TXT record set');
	})
	.catch(function() {
		console.log('Failed to set TXT record');
	});

See acme-dns-01-test for more implementation details.

Tests

# node ./test.js domain-zone api-token
node ./test.js example.com xxxxxx