Skip to content

DNS providers

A DNS provider is the service that hosts a domain’s zone. Stalwart can write records to the zone itself, which saves the administrator from copying records into the provider’s control panel and keeps them in step with the server’s configuration. It writes them for two purposes:

Stalwart reaches the zone in one of two ways. For a hosted provider, it uses the provider’s API. For a self-hosted name server, it sends RFC 2136 dynamic updates.

The provider and its credentials are stored in a DnsServer object, found in the WebUI under Settings › Network › DNS › DNS Providers. Domains refer to a DnsServer from their DNS management settings, so one DnsServer can serve every domain hosted at the same provider account.

The credential must allow Stalwart to read, create, replace and delete records in every zone it manages. Each of these permissions has a purpose:

  • Stalwart reads the existing records at a name before writing, so that unrelated TXT and CAA records are kept.
  • It creates and replaces the records it publishes.
  • It deletes records it no longer needs, such as retired DKIM keys and ACME challenge records.

Some ACME client documentation suggests a credential restricted to _acme-challenge TXT records. Such a credential is sufficient for DNS-01 alone, but not for automatic DNS management. DNS provider notes lists the minimum permissions for the common providers, and the errors seen when they are missing.

Like other secrets in the configuration, credentials can be stored inline, read from an environment variable or read from a file.

Every variant has a required description, which identifies the DnsServer when it is selected for a domain.

Every variant also shares a set of timing settings. The first two govern the records and the requests:

  • ttl is the TTL of the records Stalwart creates.
  • timeout is the timeout of each request to the provider.

The other three govern the wait for a new record to become visible on the provider’s name servers:

  • pollInterval sets how often Stalwart checks whether a record it is waiting for has become visible.
  • propagationTimeout sets how long it waits before giving up.
  • propagationDelay is an optional delay before the first check, for providers that take a while to serve new records.

The wait applies only where a record must be visible before the next step: before a DNS-01 validation, and before signing with a rotated DKIM key. Propagation describes it.

The Tsig variant serves zones on a self-hosted authoritative name server, such as BIND, Knot or PowerDNS. It sends dynamic updates, defined in RFC 2136, which change records in a zone over the DNS protocol itself. The updates are authenticated with a TSIG key (RFC 8945), a secret shared between Stalwart and the name server.

The variant has the following fields:

  • host is the IP address of the primary name server. A host name is not accepted.
  • port and protocol (udp or tcp) select how to reach the name server.
  • keyName is the name of the TSIG key, as configured on the name server.
  • key is the key secret, base64 encoded as name servers print it. A value that is not valid base64 is reported as Failed to base64 decode TSIG key.
  • tsigAlgorithm is the key’s algorithm.

The name server’s update policy must allow the key to change all the record types that Stalwart publishes in the zone, not only TXT records. Those are MX, TXT, SRV, CNAME and CAA records and, if used, TLSA records.

Each hosted provider is a variant of DnsServer with its own credential fields. The DnsServer reference describes every field. The following table lists the variants, and the fields each one requires or accepts in addition to the shared settings.

ProviderVariantCredential and connection fields
Akamai EdgeDNSEdgeDnshost, clientToken, clientSecret, accessToken, accountSwitchKey
Alibaba Cloud DNSAlidnsaccessKeyId, secretKey, region, sessionToken, line
ANS SafeDNSSafednssecret
ArvanCloudArvanCloudsecret
AWS LightsailLightsailaccessKeyId, secretKey, sessionToken, region, domain
AWS Route53Route53accessKeyId, secretKey, sessionToken, region, hostedZoneId, privateZoneOnly
Baidu Cloud DNSBaiduCloudaccessKeyId, secretKey
BlueCat Address ManagerBluecatV2url, username, password, configName, viewName, skipDeploy
BunnyDNSBunnysecret
CloudflareCloudflaresecret
ClouDNSClouDnsauthId, subAuthId, password
ConstellixConstellixapiKeyId, secretKey
cPanelCpanelurl, username, token
DDNSS.deDdnsssecret
DeSECDeSECsecret
DigitalOceanDigitalOceansecret
DNS Made EasyDnsMadeEasyapiKeyId, secret
DNSimpleDnsimpletoken, accountIdentifier
DomeneshopDomeneshoptoken, secret
DreamhostDreamhostsecret
DuckDNSDuckDnssecret
DynuDynusecret
EasyDNSEasyDnstoken, key
ExoscaleExoscaleapiKeyId, secret
freemyip.comFreeMyIpsecret
Gandi LiveDNS v5GandiV5secret
GcoreGcoresecret
GleSYSGlesysusername, apiKey
GoDaddyGodaddyapiKeyId, secret
Google Cloud DNSGoogleCloudDnsserviceAccountJson, projectId, managedZone, privateZone, impersonateServiceAccount
HetznerHetznersecret
hosting.deHostingDesecret
HostingerHostingersecret
Huawei Cloud DNSHuaweiCloudaccessKeyId, secretKey, region
Hurricane ElectricHurricanecredentials
IBM CloudIbmCloudusername, apiKey
Infoblox NIOS WAPIInfobloxhost, port, username, password, wapiVersion, dnsView
InfomaniakInfomaniaksecret
InterNetX AutoDNSAutodnsusername, password, context
INWXInwxusername, password, sharedSecret, sandbox
IONOSIonossecret
IPv64Ipv64secret
JokerJokerauth
LinodeLinodesecret
LuaDNSLuaDnsusername, token
Microsoft Azure DNSAzureDnstenantId, clientId, clientSecret, subscriptionId, resourceGroup, environment
Mythic BeastsMythicBeastsusername, password
Name.comNameDotComusername, token
NamecheapNamecheapapiUser, apiKey, clientIp, username
NameSiloNameSilosecret
NetcupNetcupcustomerNumber, apiKeyId, password
NetlifyNetlifysecret
NifcloudNifcloudaccessKeyId, secretKey
NS1Ns1secret
Oracle CloudOracleCloudtenancyOcid, userOcid, fingerprint, privateKeyPem, privateKeyPassword, region, compartmentOcid
OVHOvhapplicationKey, applicationSecret, consumerKey, ovhEndpoint
PleskPleskurl, apiKey
PorkbunPorkbunapiKeyId, secret
PowerDNS AuthoritativePowerDnsapiKey, url, serverId
ScalewayScalewaysecret
SpaceshipSpaceshipapiKeyId, secret
Tencent Cloud DNSPodTencentCloudaccessKeyId, secretKey, region, sessionToken
TransIPTransipusername, privateKeyPem
UltraDNSUltraDnsusername, password, url
VercelVerceltoken, teamId
Volcano EngineVolcengineaccessKeyId, secretKey, region, host, scheme
VultrVultrsecret
WebSupportWebSupportapiKeyId, secret
Yandex CloudYandexCloudapiKey, folderId