acme-dns-01-zeit
v3.0.3
Published
Zeit DNS for Let's Encrypt / ACME dns-01 challenges with ACME.js and Greenlock.js
Downloads
6
Maintainers
Readme
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 [email protected]
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: '[email protected]',
// 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