Skip to content

DNSPod China Configuration Guide

For International DNSPod, see DNSPod Global Configuration Guide.

Overview

DNSPod (dnspod.cn) is an authoritative DNS resolution service under Tencent Cloud, widely used in mainland China, supporting dynamic DNS record creation and updates. This DDNS project supports multiple authentication methods to connect to DNSPod for dynamic DNS record management.

Official Links:

Authentication Information

API Token method is more secure and is the recommended integration method by DNSPod.

Obtaining API Token

  1. Login to DNSPod Console
  2. Go to "User Center" > "API Key" or visit https://console.dnspod.cn/account/token/token
  3. Click "Create Key", fill in description, select domain management permissions, and complete creation
  4. Copy the ID (numeric) and Token (string). The key is only displayed once, please save it securely
jsonc
{
    "dns": "dnspod",
    "id": "123456",            // DNSPod API Token ID
    "token": "Your-API-TOKEN"  // DNSPod API Token Secret
}

Uses DNSPod account email and password. Lower security, only recommended for special scenarios.

jsonc
{
    "dns": "dnspod",
    "id": "your-email@example.com",  // DNSPod account email
    "token": "your-account-password" // DNSPod account password
}

3. Tencent Cloud AccessKey Method

For users using Tencent Cloud AccessKey, please refer to Tencent Cloud DNSPod Configuration Guide.

Complete Configuration Example

jsonc
{
    "$schema": "https://ddns.newfuture.cc/schema/v4.1.json", // Format validation
    "dns": "dnspod",                    // Current provider
    "id": "123456",                     // DNSPod API Token ID
    "token": "Your-API-TOKEN",           // DNSPod API Token
    "index4": ["url:http://api.ipify.cn", "public"], // IPv4 address source
    "index6": "public",                     // IPv6 address source
    "ipv4": ["ddns.newfuture.cc"],           // IPv4 domains
    "ipv6": ["ddns.newfuture.cc", "ipv6.ddns.newfuture.cc"], // IPv6 domains
    "line": "默认",                          // Resolution line
    "ttl": 600                              // DNS record TTL (seconds)
}

Parameter Description

ParameterDescriptionTypeRange/OptionsDefaultParameter Type
dnsProvider identifierStringdnspodNoneProvider Parameter
idAuthentication IDStringDNSPod API Token ID or emailNoneProvider Parameter
tokenAuthentication keyStringDNSPod API Token secret or passwordNoneProvider Parameter
index4IPv4 sourceArrayReferencedefaultCommon Config
index6IPv6 sourceArrayReferencedefaultCommon Config
ipv4IPv4 domainsArrayDomain listNoneCommon Config
ipv6IPv6 domainsArrayDomain listNoneCommon Config
lineResolution lineStringReference below默认Provider Parameter
ttlTTL timeInteger (seconds)Reference below600Provider Parameter
proxyProxy settingsArrayReferenceNoneCommon Network
sslSSL verificationBoolean/String"auto", true, falseautoCommon Network
cacheCache settingsBoolean/Stringtrue, false, filepathtrueCommon Config
logLog configurationObjectReferenceNoneCommon Config

Parameter Type Description:

  • Common Config: Standard DNS configuration parameters applicable to all supported DNS providers
  • Common Network: Network setting parameters applicable to all supported DNS providers
  • Provider Parameter: Supported by current provider, values related to current provider Note: ttl and line supported values may vary by service plan.

ttl

The ttl parameter specifies the Time To Live (TTL) of DNS records in seconds. DNSPod supports TTL range from 1 to 604800 seconds (7 days). If not set, the default value is used.

Plan TypeSupported TTL Range (seconds)
Free600 - 604800
Professional60 - 604800
Enterprise1 - 604800
Premium1 - 604800

Reference: DNSPod TTL Documentation

line

The line parameter specifies DNS resolution lines. DNSPod supported lines:

Line IdentifierDescription
默认Default
电信China Telecom
联通China Unicom
移动China Mobile
教育网China Education Network
搜索引擎Search Engine
境外Overseas

More lines reference: DNSPod Resolution Line Documentation

Troubleshooting

Debug Mode

Enable debug logging to view detailed information:

sh
ddns -c config.json --debug

Common Issues

  • Authentication Failed: Check if API Token or email/password are correct, confirm domain management permissions
  • Domain Not Found: Ensure domain has been added to DNSPod account, configuration spelling is correct, domain is in active state
  • Record Creation Failed: Check if subdomain has conflicting records, TTL settings are reasonable, confirm modification permissions
  • Request Rate Limit: DNSPod has API call rate limits, reduce request frequency

Support and Resources

Recommendation: Use API Token method to improve security and management convenience, avoid using email/password method.

Released under the MIT License