Billionmail/BillionMail · error

Failed to set CloudXNS DNS verification: {}

Error message

Failed to set CloudXNS DNS verification: {}

What it means

For vtype == "dns" with dnsProvider == "cloudxns", SetDnsCloudxns builds a lego CloudXNS (now Baidu/other successor services) DNS provider using dnsProviderToken and registers it for the dns-01 challenge. The error means that provider setup failed. Note CloudXNS has been discontinued/merged — its lego provider may no longer authenticate against a live API, making this error common even with 'correct' tokens.

Source

Thrown at core/internal/service/acme/acme.go:419

			return "", "", errors.New(public.LangCtx(ctx, "Failed to set HTTP verification: {}", err.Error()))
		}
	} else if vtype == "dns" && dnsProvider != "" {
		// Set DNS verification - same as in the standard ApplySSL function
		switch dnsProvider {
		case "tencentcloud":
			err = SetDnsTencentcloud(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set Tencent Cloud DNS verification: {}", err.Error()))
			}
		case "alidns":
			err = SetDnsAliyun(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set Alibaba Cloud DNS verification: {}", err.Error()))
			}
		case "cloudxns":
			err = SetDnsCloudxns(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set CloudXNS DNS verification: {}", err.Error()))
			}
		case "azuredns":
			err = SetDnsAzuredns(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set AzureDNS verification: {}", err.Error()))
			}
		case "cloudflare":
			err = SetDnsCloudflare(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set Cloudflare DNS verification: {}", err.Error()))
			}
		case "godaddy":
			err = SetDnsGodaddy(ctx, client, dnsProviderToken)
			if err != nil {
				return "", "", errors.New(public.LangCtx(ctx, "Failed to set Godaddy DNS verification: {}", err.Error()))
			}
		default:
			return "", "", errors.New(public.LangCtx(ctx, "Unsupported DNS provider: {}", dnsProvider))

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Migrate the DNS zone to a supported provider and pick a current dnsProvider (cloudflare, alidns, tencentcloud, etc.) instead of cloudxns
  2. If CloudXNS credentials still apply to the successor service, update dnsProviderToken with the new API key/secret
  3. Check the wrapped err text to distinguish malformed token format from endpoint/auth rejection

Example fix

// before
dnsProvider = "cloudxns"
// after
dnsProvider = "cloudflare" // or another active provider the zone is hosted on
Defensive patterns

Strategy: fallback

Validate before calling

if dnsProvider == "cloudxns" {
    log.Warn("cloudxns is discontinued; prefer cloudflare/alidns/tencentcloud")
    if strings.TrimSpace(dnsProviderToken) == "" {
        return errors.New("cloudxns token missing")
    }
}

Type guard

func providerSupported(p string) bool {
    switch p {
    case "tencentcloud", "alidns", "cloudxns", "azuredns", "cloudflare", "godaddy":
        return true
    }
    return false
}

Try / catch

cert, _, err := ApplySSLWithExistingServer(ctx, ...)
if err != nil && strings.Contains(err.Error(), "CloudXNS") {
    // retry with an active provider hosting the zone
    return ApplySSLWithExistingServer(ctx, domain, "dns", "cloudflare", cfToken, ...)
}

Prevention

When it happens

Trigger: ApplySSLWithExistingServer (via Apply, StartRenew, ApplyLetsEncryptCertWithHttp, ApplyConsoleCert) with vtype="dns", dnsProvider="cloudxns", and an invalid API key/secret pair, or with valid credentials against the defunct CloudXNS endpoint.

Common situations: Domains migrated off CloudXNS after the service wound down; legacy tokens stored from years ago; choosing cloudxns from a dropdown while the zone is actually hosted elsewhere.

Related errors


AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05). Data as JSON: /api/errors/cd99c6bd47302a14. Report an issue: GitHub.