• Stars
    star
    409
  • Rank 105,709 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Caddy module: dns.providers.cloudflare

Cloudflare module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with Cloudflare accounts.

Caddy module name

dns.providers.cloudflare

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "cloudflare",
				"api_token": "{env.CF_API_TOKEN}"
			}
		}
	}
}

or with the Caddyfile:

tls {
	dns cloudflare {env.CF_API_TOKEN}
}

You can replace {env.CF_API_TOKEN} with the actual auth token if you prefer to put it directly in your config instead of an environment variable.

Authenticating

See the associated README in the libdns package for important information about credentials.

NOTE: If migrating from Caddy v1, you will need to change from using a Cloudflare API Key to a scoped API Token. Please see link above for more information.

Troubleshooting

Error: Invalid request headers

If providing your API token via an ENV var which is accidentally not set/available when running Caddy, you'll receive this error from Cloudflare.

Double check that Caddy has access to a valid CF API token.

Error: timed out waiting for record to fully propagate

Some environments may have trouble querying the _acme-challenge TXT record from Cloudflare. Verify in the Cloudflare dashboard that the temporary record is being created.

If the record does exist, your DNS resolver may be caching an earlier response before the record was valid. You can instead configure Caddy to use an alternative DNS resolver such as Cloudflare's official 1.1.1.1.

Add a custom resolver to the tls directive:

tls {
  dns cloudflare {env.CF_API_TOKEN}
  resolvers 1.1.1.1
}

Or with Caddy JSON to the acme module: challenges.dns.provider.resolvers: ["1.1.1.1"].

More Repositories

1

duckdns

Caddy module: dns.providers.duckdns
Go
48
star
2

route53

Caddy module: dns.providers.route53
Go
39
star
3

digitalocean

Go
38
star
4

acmedns

Go
37
star
5

namecheap

Go
34
star
6

dnspod

Go
32
star
7

alidns

Caddy module: dns.providers.alidns
Go
32
star
8

hetzner

Caddy module: dns.providers.hetzner
Go
28
star
9

porkbun

Go
26
star
10

desec

deSEC module for Caddy
Go
17
star
11

googleclouddns

Go
14
star
12

google-domains

Support for ACME DNS challenge through Google Domains
Go
13
star
13

ovh

Caddy module: dns.providers.ovh
Go
12
star
14

vercel

Go
12
star
15

ionos

IONOS DNS module for caddy: dns.providers.ionos
Go
12
star
16

gandi

Caddy module: dns.providers.gandi
Go
12
star
17

netcup

netcup DNS module for caddy: dns.providers.netcup
Go
12
star
18

netlify

Go
11
star
19

powerdns

Caddy module: dns.providers.powerdns
Go
11
star
20

template

Template for new DNS provider modules
Go
10
star
21

rfc2136

Go
9
star
22

inwx

Caddy module: dns.providers.inwx
Go
8
star
23

dynv6

Go
7
star
24

azure

Caddy module: dns.providers.azure
Go
7
star
25

lego-deprecated

(DEPRECATED) DNS modules so Caddy can solve the ACME DNS challenge with over 75 providers
Go
7
star
26

njalla

Go
6
star
27

linode

Caddy module: dns.providers.linode
Go
6
star
28

godaddy

Go
6
star
29

hexonet

dns.providers.hexonet
Go
6
star
30

tencentcloud

Go
5
star
31

vultr

Go
5
star
32

openstack-designate

Caddy module: dns.providers.openstack_designate
Go
5
star
33

mythicbeasts

Go
4
star
34

loopia

Caddy module: dns.providers.loopia
Go
4
star
35

easydns

Go
3
star
36

namedotcom

Go
3
star
37

mailinabox

Go
3
star
38

directadmin

Go
3
star
39

scaleway

Caddy module: dns.providers.scaleway
Go
3
star
40

transip

Caddy module: dns.providers.transip
Go
3
star
41

leaseweb

Go
3
star
42

civo

Caddy module: dns.providers.civo
Go
2
star
43

bunny

Caddy module: dns.providers.bunny
Go
2
star
44

namesilo

Go
2
star
45

infomaniak

Go
2
star
46

nicrudns

1
star
47

glesys

Go
1
star
48

totaluptime

1
star
49

ddnss

Go
1
star
50

metaname

Go
1
star
51

hosttech

Caddy module: dns.providers.hosttech
Go
1
star
52

acmeproxy

Go
1
star
53

dnsimple

Caddy module: dns.providers.dnsimple
Go
1
star
54

dinahosting

Go
1
star
55

dnsmadeeasy

Go
1
star
56

luadns

Caddy module: dns.providers.luadns
Go
1
star
57

dynu

Caddy module: dns.providers.dynu
Go
1
star