DDNS Provider English Documentation
Overview
DNSPod is a DNS service provider under Tencent Cloud, widely used in mainland China. This DDNS project supports connecting to DNSPod via two authentication methods:
- API Token (Recommended)
- Email + Password (Legacy)
Authentication Methods
Method 1: API Token (Recommended)
The API Token method is more secure and is the recommended way to integrate with DNSPod.
How to Obtain an API Token
- Login to DNSPod Console
- Go to API Key Management
- Create a New API Key
- Click the “Create Key” button
- Enter a descriptive name (e.g., “DDNS Host”)
- Select appropriate permissions (domain management permission required)
- Click “Confirm” to create
- Copy Key Information
- ID: The key ID (numeric value)
- Token: The actual key string (long alphanumeric string)
- Important: Save both values immediately, as the key will only be shown once
Configuration Using API Token
{
"dns": "dnspod",
"id": "123456",
"token": "abcdef1234567890abcdef1234567890"
}
Parameters:
id
: Your API Token ID (numeric string)
token
: Your API Token secret
dns
: Must be set to "dnspod"
Method 2: Email + Password (Legacy)
This method uses your DNSPod account email and password. It is still supported but less secure than API Token.
How to Use Email Authentication
- Ensure Account Availability
- Make sure you can log in to DNSPod with your email and password
- Verify your account has domain management permissions
- Email and Password Configuration
{
"id": "your-email@example.com",
"token": "your-account-password",
"dns": "dnspod"
}
Parameters:
id
: Your DNSPod account email address
token
: Your DNSPod account password
dns
: Must be set to "dnspod"
Complete Configuration Examples
Example 1: API Token Configuration (Recommended)
{
"id": "123456",
"token": "abcdef1234567890abcdef1234567890abcdef12",
"dns": "dnspod",
"ipv6": ["home.example.com", "nas.example.com"]
}
Example 2: Email Authentication Configuration
{
"id": "myemail@gmail.com",
"token": "mypassword123",
"dns": "dnspod",
"ipv6": ["dynamic.mydomain.com"]
}
Example 3: Configuration with Line Settings
{
"id": "123456",
"token": "abcdef1234567890abcdef1234567890abcdef12",
"dns": "dnspod",
"ipv4": ["home.example.com"],
"ttl": 600,
"line": "电信"
}
Optional Configuration Parameters
TTL (Time To Live)
- Range: 1-604800 seconds
- Default: 600 seconds (10 minutes)
- Recommended: 120-600 seconds for dynamic DNS
Record Type
- Supported Types: A, AAAA, CNAME
- Default: A (IPv4)
- Use “AAAA” for IPv6 addresses
Line (ISP Route)
- Options: “默认” (Default), “电信” (China Telecom), “联通” (China Unicom), “移动” (China Mobile), etc.
- Default: “默认” (Default line)
Troubleshooting
Common Issues
“Authentication Failed” Error
- API Token: Check if ID and Token are correct
- Email: Check email and password for typos
- Permissions: Ensure the token/account has domain management permissions
“Domain Not Found” Error
- Verify the domain is added to your DNSPod account
- Check the domain spelling in your configuration
- Ensure the domain is active and not suspended
“Record Creation Failed”
- Check if the subdomain already exists with a different record type
- Verify TTL value is within the acceptable range
- Ensure you have permission to modify the specific domain
Debug Mode
Enable debug logging to troubleshoot issues:
This will display detailed logs for troubleshooting.
Support and Resources
It is recommended to use the API Token method for better security and easier DDNS configuration management.