letsencrypt-dnsimple
letsencrypt-dnsimple copied to clipboard
Quick hack to use letsencrypt DNS challenge with dnsimple
letsencrypt-dnsimple
Quick hack to use the letsencrypt DNS challenge with dnsimple.
Running with installed ruby
Requires ruby 2.3.0.
$ gem install bundler
$ bundle install
$ [email protected] \
DNSIMPLE_API_TOKEN=... \
NAMES=foo.org,www/foo.org \
ACME_CONTACT=mailto:[email protected] \
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
Running with Docker
Check out https://github.com/meskyanichi/dockerized-letsencrypt-dnsimple which wraps this in a Docker container so a ruby install is not needed.
Config
Comes from the environment.
-
DNSIMPLE_API_USER
andDNSIMPLE_API_TOKEN
: get these from https://dnsimple.com/user -
NAMES
: 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 registration -
LETSENCRYPT_ENDPOINT
: optional, defaults to the production endpoint athttps://acme-v01.api.letsencrypt.org/
-
OUTPUT_FILE_BASE
: optional, if specified, overrides the output filename base