Skip to content
English
  • There are no suggestions because the search field is empty.

LEGO ACME Client Integration with OpusDNS

Use the go-acme/lego client with OpusDNS as DNS provider for DNS-01 challenges

lego (go-acme/lego) is an open source ACME client and library written in Go. It obtains SSL/TLS certificates from Let's Encrypt and other ACME certificate authorities and is common in DevOps workflows, CI/CD pipelines and self-hosted systems.

OpusDNS is an official DNS provider in lego (since v5.2.0) with the code opusdns. lego creates the TXT records for the DNS-01 challenge through the OpusDNS API and removes them afterwards, which also lets you obtain wildcard certificates. Background on certificates and ACME: What Are SSL Certificates, and How Does ACME Work?

 

What lego offers

  • ACME v2 (RFC 8555) with HTTP-01, DNS-01 and TLS-ALPN-01 challenges
  • Wildcard certificates via DNS-01
  • More than 200 DNS providers
  • Use as a command line tool or as a Go library

 

Requirements

  • lego v5.2.0 or later.
  • The domain's DNS zone is hosted at OpusDNS.
  • An OpusDNS API key. Create it under Developer > API Credentials, see Creating API Credentials.

 

Setup

Pass the API key in the environment variable OPUSDNS_API_KEY and select the provider opusdns:

OPUSDNS_API_KEY=opk_... lego run --dns opusdns -d '*.example.com' -d example.com

Optional settings: OPUSDNS_TTL (TTL of the challenge record, default 60 seconds), OPUSDNS_PROPAGATION_TIMEOUT (default 120 seconds), OPUSDNS_POLLING_INTERVAL and OPUSDNS_HTTP_TIMEOUT.

If you used lego v4 before, run lego migrate once after updating. lego v5 no longer has a separate renew command.

 

Renewal

lego has no built-in scheduler. Run the same lego run command regularly, for example daily with cron or a systemd timer. lego renews the certificate when it is due.

 

More information

OpusDNS GitHub banner: Deploy faster with our official tools on GitHub, with the button View Our GitHub