2019-03-08 18:47:06 +00:00
|
|
|
---
|
|
|
|
title: "DNS Providers"
|
|
|
|
date: 2019-03-03T16:39:46+01:00
|
|
|
|
draft: false
|
|
|
|
weight: 3
|
|
|
|
---
|
|
|
|
|
2019-03-18 16:42:54 +00:00
|
|
|
## 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.
|
2019-03-08 18:47:06 +00:00
|
|
|
|
2020-09-29 22:27:08 +00:00
|
|
|
Here is an example bash command using the Cloudflare DNS provider:
|
2019-03-08 18:47:06 +00:00
|
|
|
|
2024-08-14 21:55:11 +00:00
|
|
|
```bash
|
2022-06-16 22:25:42 +00:00
|
|
|
$ CLOUDFLARE_EMAIL=you@example.com \
|
|
|
|
CLOUDFLARE_API_KEY=b9841238feb177a84330febba8a83208921177bffe733 \
|
|
|
|
lego --dns cloudflare --domains www.example.com --email you@example.com run
|
2019-03-08 18:47:06 +00:00
|
|
|
```
|
|
|
|
|
2019-03-18 16:42:54 +00:00
|
|
|
### 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`.
|
|
|
|
|
|
|
|
{{% notice note %}}
|
|
|
|
The file must contain only the value.
|
|
|
|
{{% /notice %}}
|
|
|
|
|
|
|
|
Here is an example bash command using the CloudFlare DNS provider:
|
|
|
|
|
2024-08-14 21:55:11 +00:00
|
|
|
```bash
|
2019-03-18 16:42:54 +00:00
|
|
|
$ cat /the/path/to/my/key
|
|
|
|
b9841238feb177a84330febba8a83208921177bffe733
|
|
|
|
|
|
|
|
$ cat /the/path/to/my/email
|
2022-06-16 22:25:42 +00:00
|
|
|
you@example.com
|
2019-03-18 16:42:54 +00:00
|
|
|
|
|
|
|
$ CLOUDFLARE_EMAIL_FILE=/the/path/to/my/email \
|
2022-06-16 22:25:42 +00:00
|
|
|
CLOUDFLARE_API_KEY_FILE=/the/path/to/my/key \
|
|
|
|
lego --dns cloudflare --domains www.example.com --email you@example.com run
|
2019-03-18 16:42:54 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## DNS Providers
|
|
|
|
|
2022-06-16 22:25:42 +00:00
|
|
|
{{% tableofdnsproviders %}}
|