Documentation: Cloudflare configuration documentation requires some improvements. #425

Closed
opened 2025-11-20 04:23:57 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @abpai94 on GitHub (Aug 9, 2024).

TLDR: Describe your issue in a one liner here

  1. Is this urgent: No
  2. DNS provider(s) you use: Cloudflare
  3. Program version:
    Running version 2.7.0 built on 2024-06-26T19:34:57.277Z (commit d37f057)
  4. What are you using to run the container: docker-compose

The Cloudflare documentation defined here: Cloudflare README was helpful to start configuring DDNS updates as follows:

{
    "settings": [
        {
            "provider": "cloudflare",
            "zone_identifier": "<zone_id>",
            "ttl": 600,
            "ip_version": "ipv4",
            "domain": "<domain>",
            "token": "<token>"
        },
        {
            "provider": "cloudflare",
            "zone_identifier": "<zone_id>",
            "ttl": 600,
            "ip_version": "ipv4",
            "domain": "<second_domain>",
            "token": "<token>"
        }
    ]
}

This produces the following log output:

2024-08-09T09:12:43+02:00 WARN cannot DNS resolve <domain> after 5 tries: lookup <domain>: no such host
2024-08-09T09:12:43+02:00 INFO ipv4 address of <domain> is invalid IP and your ipv4 address  is <IP>
2024-08-09T09:12:43+02:00 WARN cannot DNS resolve <second_domain after 5 tries: lookup <second_domain>: no such host
2024-08-09T09:12:43+02:00 INFO ipv4 address of <second_domain> is invalid IP and your ipv4 address  is <IP>
2024-08-09T09:12:43+02:00 INFO Updating record [domain: <domain | host:  | provider: cloudflare | ip: ipv4] to use <IP> 2024-08-09T09:12:44+02:00 ERROR creating record: unsuccessful result: error 1004: DNS Validation Error; 
2024-08-09T09:12:44+02:00 INFO Updating record [domain: <second_domain> | host:  | provider: cloudflare | ip: ipv4] to use <IP>
2024-08-09T09:12:45+02:00 ERROR creating record: unsuccessful result: error 1004: DNS Validation Error; 
2024-08-09T09:14:20+02:00 WARN Caught OS signal, shutting down

The issue appears to be that the DNS cannot be validated. The API key contains the require Zone.Zone and Zone.DNS to update the IP address for the domain.

After searching through some discussion and finally finding the following: #366 and #243.

I was able to update the DNS with the following configuration:

{
    "settings": [
        {
            "provider": "cloudflare",
            "zone_identifier": "<zone_id>",
            "ttl": 600,
            "ip_version": "ipv4",
            "domain": "<domain>",
            "host": "@",
            "token": "<token>"
        },
        {
            "provider": "cloudflare",
            "zone_identifier": "<zone_id>",
            "ttl": 600,
            "ip_version": "ipv4",
            "domain": "<domain>",
            "host": "*",
            "token": "<token>"
        }
    ]
}

The problem is minor as the documentation needs to be updated to mention the host being the configuration needed to define with @ or * so that all domains and sub-domains are updated in cloudflare with the correct IP address.

Originally created by @abpai94 on GitHub (Aug 9, 2024). **TLDR**: *Describe your issue in a one liner here* 1. Is this urgent: No 2. DNS provider(s) you use: Cloudflare 3. Program version: `Running version 2.7.0 built on 2024-06-26T19:34:57.277Z (commit d37f057)` 4. What are you using to run the container: docker-compose The Cloudflare documentation defined here: [Cloudflare README](https://github.com/qdm12/ddns-updater/blob/master/docs/cloudflare.md) was helpful to start configuring DDNS updates as follows: ``` { "settings": [ { "provider": "cloudflare", "zone_identifier": "<zone_id>", "ttl": 600, "ip_version": "ipv4", "domain": "<domain>", "token": "<token>" }, { "provider": "cloudflare", "zone_identifier": "<zone_id>", "ttl": 600, "ip_version": "ipv4", "domain": "<second_domain>", "token": "<token>" } ] } ``` This produces the following log output: ``` 2024-08-09T09:12:43+02:00 WARN cannot DNS resolve <domain> after 5 tries: lookup <domain>: no such host 2024-08-09T09:12:43+02:00 INFO ipv4 address of <domain> is invalid IP and your ipv4 address is <IP> 2024-08-09T09:12:43+02:00 WARN cannot DNS resolve <second_domain after 5 tries: lookup <second_domain>: no such host 2024-08-09T09:12:43+02:00 INFO ipv4 address of <second_domain> is invalid IP and your ipv4 address is <IP> 2024-08-09T09:12:43+02:00 INFO Updating record [domain: <domain | host: | provider: cloudflare | ip: ipv4] to use <IP> 2024-08-09T09:12:44+02:00 ERROR creating record: unsuccessful result: error 1004: DNS Validation Error; 2024-08-09T09:12:44+02:00 INFO Updating record [domain: <second_domain> | host: | provider: cloudflare | ip: ipv4] to use <IP> 2024-08-09T09:12:45+02:00 ERROR creating record: unsuccessful result: error 1004: DNS Validation Error; 2024-08-09T09:14:20+02:00 WARN Caught OS signal, shutting down ``` The issue appears to be that the DNS cannot be validated. The API key contains the require Zone.Zone and Zone.DNS to update the IP address for the domain. After searching through some discussion and finally finding the following: #366 and #243. I was able to update the DNS with the following configuration: ``` { "settings": [ { "provider": "cloudflare", "zone_identifier": "<zone_id>", "ttl": 600, "ip_version": "ipv4", "domain": "<domain>", "host": "@", "token": "<token>" }, { "provider": "cloudflare", "zone_identifier": "<zone_id>", "ttl": 600, "ip_version": "ipv4", "domain": "<domain>", "host": "*", "token": "<token>" } ] } ``` The problem is minor as the documentation needs to be updated to mention the `host` being the configuration needed to define with `@` or `*` so that all domains and sub-domains are updated in cloudflare with the correct IP address.
Author
Owner

@qdm12 commented on GitHub (Aug 17, 2024):

The wiki is versioned, see at the top of the readme: https://github.com/qdm12/ddns-updater?tab=readme-ov-file#versioned-documentation

Since 07d7645d78 (latest image, master branch, no release yet), you can just use the domain field to have your host.domain.com. For v2.7.0, this is not the case so please refer to the correct versioned documentation. If this is incorrect, please re-open another issue citing this one!

@qdm12 commented on GitHub (Aug 17, 2024): The wiki is versioned, see at the top of the readme: https://github.com/qdm12/ddns-updater?tab=readme-ov-file#versioned-documentation Since https://github.com/qdm12/ddns-updater/commit/07d7645d787a81e3a6c5ee52b9ec3ccf65a4c2ea (latest image, master branch, no release yet), you can just use the `domain` field to have your host.domain.com. For v2.7.0, this is not the case so please refer to the correct versioned documentation. If this is incorrect, please re-open another issue citing this one!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ddns-updater#425