Skip to content

cloudflare

MXProxy integrates with Cloudflare to configure ACME DNS challenges and dynamic DNS (DDNS).

ACME DNS challenges

Use the cloudflare directive to configure your Cloudflare API token:

labels:
  cloudflare: $${API_KEY}

MXProxy configures Cloudflare as a provider for ACME DNS challenges.

The API_KEY variable must be available in the MXProxy container's environment. See Environment variables for details on passing variables to MXProxy and referencing secrets safely.

Dynamic DNS

You can also use Cloudflare to keep DNS records updated with your server's IP address.

Use the cloudflare.ddns subdirective:

labels:
  cloudflare: $${API_KEY}
  cloudflare.ddns: example.com

MXProxy automatically sets up and updates an A record for example.com.

You can specify multiple domains and subdomains using the syntax supported by caddy-dynamicdns:

labels:
  cloudflare: $${API_KEY}
  cloudflare.ddns: |
    example.com @ www
    example.net subdomain

This configures the root domains example.com and example.net, along with www.example.com and subdomain.example.net.