DNS Providers

Configuration and Credentials

Credentials and DNS configuration for DNS providers must be passed through environment variables.

Environment Variables: Value

The environment variables can reference a value.

Here is an example bash command using the Cloudflare DNS provider:

$ CLOUDFLARE_EMAIL=you@example.com \
  CLOUDFLARE_API_KEY=b9841238feb177a84330febba8a83208921177bffe733 \
  lego --dns cloudflare --domains www.example.com --email you@example.com run

Environment Variables: File

The environment variables can reference a path to file.

In this case the name of environment variable must be suffixed by _FILE.

The file must contain only the value.

Here is an example bash command using the CloudFlare DNS provider:

$ cat /the/path/to/my/key
b9841238feb177a84330febba8a83208921177bffe733

$ cat /the/path/to/my/email
you@example.com

$ CLOUDFLARE_EMAIL_FILE=/the/path/to/my/email \
  CLOUDFLARE_API_KEY_FILE=/the/path/to/my/key \
  lego --dns cloudflare --domains www.example.com --email you@example.com run

Experimental Features

To resolve CNAME when creating dns-01 challenge: set LEGO_EXPERIMENTAL_CNAME_SUPPORT to true.

DNS Providers

Provider name CLI flag name Required lego version
Akamai EdgeDNS Website edgedns v3.9.0
Alibaba Cloud DNS Website alidns v1.1.0
all-inkl Website allinkl v4.5.0
Amazon Lightsail Website lightsail v0.5.0
Amazon Route 53 Website route53 v0.3.0
ArvanCloud Website arvancloud v3.8.0
Aurora DNS Website auroradns v0.4.0
Autodns Website autodns v3.2.0
Azure Website azure v0.4.0
Bindman Website bindman v2.6.0
Bluecat Website bluecat v0.5.0
Checkdomain Website checkdomain v3.3.0
CloudDNS Website clouddns v3.6.0
Cloudflare Website cloudflare v0.3.0
ClouDNS Website cloudns v2.3.0
CloudXNS Website cloudxns v0.5.0
ConoHa Website conoha v1.2.0
Constellix Website constellix v3.4.0
deSEC.io Website desec v3.7.0
Designate DNSaaS for Openstack Website designate v2.2.0
Digital Ocean Website digitalocean v0.3.0
DNS Made Easy Website dnsmadeeasy v0.4.0
DNSimple Website dnsimple v0.3.0
DNSPod Website dnspod v0.4.0
Domain Offensive (do.de) Website dode v2.4.0
Domeneshop Website domeneshop v4.3.0
DreamHost Website dreamhost v1.1.0
Duck DNS Website duckdns v0.5.0
Dyn Website dyn v0.3.0
Dynu Website dynu v3.5.0
EasyDNS Website easydns v2.6.0
Epik Website epik v4.5.0
Exoscale Website exoscale v0.4.0
External program Website exec v0.5.0
freemyip.com Website freemyip v4.5.0
G-Core Labs Website gcore v4.5.0
Gandi Website gandi v0.3.0
Gandi Live DNS (v5) Website gandiv5 v0.5.0
Glesys Website glesys v0.5.0
Go Daddy Website godaddy v0.5.0
Google Cloud Website gcloud v0.3.0
Hetzner Website hetzner v3.7.0
Hosting.de Website hostingde v1.1.0
Hosttech Website hosttech v4.5.0
HTTP request Website httpreq v2.0.0
Hurricane Electric DNS Website hurricane v4.3.0
HyperOne Website hyperone v3.9.0
IBM Cloud (SoftLayer) Website ibmcloud v4.5.0
IIJ DNS Platform Service Website iijdpf v4.7.0
Infoblox Website infoblox v4.4.0
Infomaniak Website infomaniak v4.1.0
Internet Initiative Japan Website iij v1.1.0
Internet.bs Website internetbs v4.5.0
INWX Website inwx v2.0.0
Ionos Website ionos v4.2.0
iwantmyname Website iwantmyname v4.7.0
Joker Website joker v2.6.0
Joohoi's ACME-DNS Website acme-dns v1.1.0
Linode (v4) Website linode v1.1.0
Liquid Web Website liquidweb v3.1.0
Loopia Website loopia v4.2.0
LuaDNS Website luadns v3.7.0
Manual manual v0.3.0
MyDNS.jp Website mydnsjp v1.2.0
MythicBeasts Website mythicbeasts v0.3.7
Name.com Website namedotcom v0.5.0
Namecheap Website namecheap v0.3.0
Namesilo Website namesilo v2.7.0
NearlyFreeSpeech.NET Website nearlyfreespeech v4.8.0
Netcup Website netcup v1.1.0
Netlify Website netlify v3.7.0
Nicmanager Website nicmanager v4.5.0
NIFCloud Website nifcloud v1.1.0
Njalla Website njalla v4.3.0
NS1 Website ns1 v0.4.0
Open Telekom Cloud Website otc v0.4.1
Oracle Cloud Website oraclecloud v2.3.0
OVH Website ovh v0.4.0
Porkbun Website porkbun v4.4.0
PowerDNS Website pdns v0.4.0
Rackspace Website rackspace v0.4.0
reg.ru Website regru v3.5.0
RFC2136 Website rfc2136 v0.3.0
RimuHosting Website rimuhosting v0.3.5
Sakura Cloud Website sakuracloud v1.1.0
Scaleway Website scaleway v3.4.0
Selectel Website selectel v1.2.0
Servercow Website servercow v3.4.0
Simply.com Website simply v4.4.0
Sonic Website sonic v4.4.0
Stackpath Website stackpath v1.1.0
Tencent Cloud DNS Website tencentcloud v4.6.0
TransIP Website transip v2.0.0
UKFast SafeDNS Website safedns v4.6.0
Variomedia Website variomedia v4.8.0
VegaDNS Website vegadns v1.1.0
Vercel Website vercel v4.7.0
Versio.[nl|eu|uk] Website versio v2.7.0
VinylDNS Website vinyldns v4.4.0
Vscale Website vscale v2.0.0
Vultr Website vultr v0.3.1
WEDOS Website wedos v4.4.0
Yandex Website yandex v3.7.0
Zone.ee Website zoneee v2.1.0
Zonomi Website zonomi v3.5.0