Quick hack to use the letsencrypt DNS challenge with dnsimple.
Requires ruby 2.3.0.
$ gem install bundler
$ bundle install
$ DNSIMPLE_API_USER=you@foo.org \
DNSIMPLE_API_TOKEN=... \
NAMES=foo.org,www/foo.org \
ACME_CONTACT=mailto:you@foo.org \
bundle exec ruby main.rb
.pem
files will be written to files named after the value of NAMES
, with the above config they would match foo.org_www.foo.org-*
:
foo.org_www.foo.org-cert.pem
foo.org_www.foo.org-chain.pem
foo.org_www.foo.org-fullchain.pem
foo.org_www.foo.org-key.pem
Check out https://github.com/meskyanichi/dockerized-letsencrypt-dnsimple which wraps this in a Docker container so a ruby install is not needed.
Comes from the environment.
DNSIMPLE_API_USER
andDNSIMPLE_API_TOKEN
: get these from https://dnsimple.com/userNAMES
: a,
-separated list of names that will be in the requested cert. Use/
instead of.
to denote the separation between subdomain and dnsimple domain. For example, to request a cert forwww.danp.net
, wheredanp.net
is the domain dnsimple knows about, you'd usewww/danp.net
.ACME_CONTACT
: the contact to use for registrationLETSENCRYPT_ENDPOINT
: optional, defaults to the production endpoint athttps://acme-v01.api.letsencrypt.org/
OUTPUT_FILE_BASE
: optional, if specified, overrides the output filename base