ddns-updater
ddns-updater copied to clipboard
Improve Cloudflare documentation with verified configuration approach
Pull Request Description: Improved Cloudflare Documentation with Verified Configuration
Authentication Issues Encountered
We experienced persistent Cloudflare authentication failures with DDNS-Updater, particularly after ISP modem restarts resulting in IP changes. Specifically:
- The most common error was: "Missing X-Auth-Key, X-Auth-Email or Authorization headers" (Code 9106)
- Even with correct API Tokens, authentication would sometimes fail after network interruptions
- The container would be unable to update DNS records, requiring manual intervention
- Domain records were sometimes reported as "DNS name is invalid" despite being correct
How Our Approach Resolves These Issues
After extensive testing, we identified a specific configuration pattern that reliably resolves these issues:
- Using the
config.jsonfile with a mounted volume for persistence (instead of environment variables) - Critical: Splitting the domain into separate "domain" and "host" fields:
"domain": "example.com", "host": "subdomain"
Rather than using a single field like:
"domain": "subdomain.example.com"
- Using API Token authentication rather than Global API Key
- Ensuring proper TTL values are specified
Verification and Testing
We've rigorously tested this approach through multiple scenarios:
- Confirmed working with both the latest container version and v2.5.0
- Tested through multiple ISP modem restarts and IP changes
- Verified long-term stability with this configuration
- Tested with various Cloudflare-managed domains
Critical Elements for Success
Our documentation emphasizes these essential elements:
- Domain/Host Splitting: Separating the domain into root domain and subdomain components
- API Token Authentication: Using the more secure and reliable token-based authentication
- Persistence with Mounted Volume: Ensuring configuration persists across container restarts
- File Path Clarity: Documenting the exact file locations on both host and container
- Comprehensive Troubleshooting: Addressing the most common errors with specific solutions
This pull request aims to help users avoid the frustrating authentication issues we encountered by documenting a proven, verified approach that works reliably in real-world conditions.