Billionmail/BillionMail · error

Unsupported DNS provider: {}

Error message

Unsupported DNS provider: {}

What it means

ApplySSLWithExistingServer's DNS branch only recognizes a fixed switch list (tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy). Any other dnsProvider string falls into the default case and returns this error before any ACME interaction. It is a pure input-validation failure — the value never reaches lego.

Source

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

				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))
		}
	}

	// Register or query existing user on ACME server
	var reg *registration.Resource
	// Try to query existing registration first (same key = same account)
	reg, err = client.Registration.QueryRegistration()
	if err != nil || reg == nil {
		// No existing registration, register new account
		reg, err = client.Registration.Register(registration.RegisterOptions{TermsOfServiceAgreed: true})
		if err != nil {
			return "", "", errors.New(public.LangCtx(ctx, "Failed to register user: {}", err.Error()))
		}
	}

	// Save user information
	myUser.Registration = reg

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Set dnsProvider to one of the exact supported strings: tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy
  2. Check for casing/whitespace/alias mismatch (e.g. send "alidns", not "aliyun" or "CloudFlare")
  3. If a genuinely new provider is needed, extend the switch in acme.go with a new SetDns* helper rather than passing an unsupported name

Example fix

// before
dnsProvider = "CloudFlare"
// after
dnsProvider = "cloudflare"
Defensive patterns

Strategy: validation

Validate before calling

var supportedDNS = map[string]bool{
    "tencentcloud": true, "alidns": true, "cloudxns": true,
    "azuredns": true, "cloudflare": true, "godaddy": true,
}
if vtype == "dns" && !supportedDNS[strings.TrimSpace(dnsProvider)] {
    return fmt.Errorf("dnsProvider %q not supported; use one of tencentcloud,alidns,cloudxns,azuredns,cloudflare,godaddy", dnsProvider)
}

Type guard

func isSupportedDNSProvider(p string) bool {
    switch strings.TrimSpace(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(), "Unsupported DNS provider") {
    return fmt.Errorf("fix dnsProvider value: %w", err)
}

Prevention

When it happens

Trigger: Calling ApplySSLWithExistingServer (via Apply, StartRenew, ApplyLetsEncryptCertWithHttp, ApplyConsoleCert) with vtype="dns" and a dnsProvider that is empty-after-trim, misspelled (e.g. "CloudFlare", "aliyun" instead of "alidns"), or a provider the app simply does not implement (e.g. dnspod, hetzner).

Common situations: Case-sensitivity mistakes from UI dropdowns/API callers; providers added in newer app versions being requested from an older build; free-text config values instead of enum-constrained input.

Related errors


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