Skip to content

Huawei Cloud DNS Configuration Guide

Overview

Huawei Cloud DNS is an authoritative DNS resolution service provided by Huawei Cloud, featuring high availability, high scalability, and high security, supporting dynamic DNS record creation and updates. This DDNS project authenticates through Access Key ID and Secret Access Key.

⚠️ Important Note: Huawei Cloud DNS Provider is currently in verification pending status, lacking sufficient real-world testing. Please provide feedback through GitHub Issues.

Official Links:

Authentication Information

Access Key Authentication

Use Huawei Cloud Access Key ID and Secret Access Key for authentication.

Obtaining Authentication Information

  1. Log in to Huawei Cloud Console
  2. Go to My Credentials > Access Keys
  3. Click "Add Access Key" button
  4. Copy the generated Access Key ID and Secret Access Key, please keep them safe
  5. Ensure the account has operation permissions for Cloud DNS
jsonc
{
    "dns": "huaweidns",
    "id": "your_access_key_id",     // Huawei Cloud Access Key ID
    "token": "your_secret_access_key" // Huawei Cloud Secret Access Key
}

Permission Requirements

Ensure the Huawei Cloud account has the following permissions:

  • DNS Administrator: Full management permissions for Cloud DNS (recommended)
  • DNS ReadOnlyAccess + Custom Write Permissions: Fine-grained permission control

You can view and configure permissions in Identity and Access Management.

Complete Configuration Example

jsonc
{
    "$schema": "https://ddns.newfuture.cc/schema/v4.1.json", // Format validation
    "dns": "huaweidns",                 // Current provider
    "id": "your_access_key_id",         // Huawei Cloud Access Key ID
    "token": "your_secret_access_key",  // Huawei Cloud Secret Access Key
    "index4": ["url:http://api.ipify.cn", "public"], // IPv4 address source
    "index6": "public",                     // IPv6 address source
    "ipv4": ["ddns.newfuture.cc"],           // IPv4 domain
    "ipv6": ["ddns.newfuture.cc", "ipv6.ddns.newfuture.cc"], // IPv6 domain
    "endpoint": "https://dns.myhuaweicloud.com", // API endpoint
    "line": "default",                      // Resolution line
    "ttl": 600                              // DNS record TTL (seconds)
}

Parameter Description

ParameterDescriptionTypeValue Range/OptionsDefaultParameter Type
dnsProvider IDStringhuaweidnsNoneProvider Param
idAuthentication IDStringHuawei Cloud Access Key IDNoneProvider Param
tokenAuthentication KeyStringHuawei Cloud Secret Access KeyNoneProvider Param
index4IPv4 SourceArrayReferencedefaultCommon Config
index6IPv6 SourceArrayReferencedefaultCommon Config
ipv4IPv4 DomainArrayDomain listNoneCommon Config
ipv6IPv6 DomainArrayDomain listNoneCommon Config
endpointAPI EndpointURLReference belowhttps://dns.myhuaweicloud.comProvider Param
lineResolution LineStringReference belowdefaultProvider Param
ttlTTL TimeInteger (seconds)1~2147483647300Provider Param
proxyProxy SettingsArrayReferenceNoneCommon Network
sslSSL VerificationBoolean/String"auto", true, falseautoCommon Network
cacheCache SettingsBoolean/Stringtrue, false, filepathtrueCommon Config
logLog ConfigObjectReferenceNoneCommon 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 Param: Supported by current provider, values related to current provider

Note: The supported values for ttl and line may vary depending on different service plans.

endpoint

Huawei Cloud DNS supports multiple regional endpoints. You can choose the optimal node based on region and network environment:

Domestic Nodes

  • Global Service (Recommended): https://dns.myhuaweicloud.com
  • North China-Beijing 4: https://dns.cn-north-4.myhuaweicloud.com
  • East China-Shanghai 1: https://dns.cn-east-3.myhuaweicloud.com
  • South China-Guangzhou: https://dns.cn-south-1.myhuaweicloud.com
  • North China-Ulanqab 1: https://dns.cn-north-9.myhuaweicloud.com
  • Southwest-Guiyang 1: https://dns.cn-southwest-2.myhuaweicloud.com

Overseas Nodes

  • Asia Pacific-Singapore: https://dns.ap-southeast-3.myhuaweicloud.com
  • Asia Pacific-Hong Kong: https://dns.ap-southeast-1.myhuaweicloud.com
  • Asia Pacific-Bangkok: https://dns.ap-southeast-2.myhuaweicloud.com
  • Africa-Johannesburg: https://dns.af-south-1.myhuaweicloud.com
  • Latin America-Santiago: https://dns.la-south-2.myhuaweicloud.com
  • Latin America-Mexico City 1: https://dns.la-north-2.myhuaweicloud.com
  • Latin America-São Paulo 1: https://dns.sa-brazil-1.myhuaweicloud.com

Note: It is recommended to use the default endpoint https://dns.myhuaweicloud.com, as Huawei Cloud will automatically route to the optimal node. Specific regional endpoints are only needed in special network environments.

line

The line parameter specifies DNS resolution lines. For supported lines in Huawei Cloud: Configure Custom Line Resolution.

Troubleshooting

Debug Mode

Enable debug logging to view detailed information:

sh
ddns -c config.json --debug

Common Issues

  • Authentication Failed: Check if Access Key ID and Secret Access Key are correct, confirm the keys have not been deleted or disabled
  • Domain Not Found: Ensure the domain has been added to Huawei Cloud DNS resolution, check spelling accuracy, and confirm the domain is active
  • Record Creation Failed: Check for conflicting records on subdomain, ensure reasonable TTL settings, and confirm modification permissions
  • Request Rate Limiting: Huawei Cloud API has call frequency limits, reduce request frequency

Common Error Codes

Error CodeDescriptionSolution
APIGW.0301Authentication failedCheck access keys
DNS.0101Domain not foundCheck domain configuration
DNS.0102Record set not foundCheck record settings
DNS.0103Record set existsCheck conflicting records
DNS.0203Request rate too highReduce request frequency

Support and Resources

⚠️ Verification Pending Status: Huawei Cloud DNS Provider lacks sufficient real-world testing. It is recommended to conduct thorough testing before using in production environments. If you encounter issues, please provide feedback through GitHub Issues.

Released under the MIT License