nextcloud/all-in-one · error · InvalidSettingConfigurationException
DNS config is not set for this domain or the domain is not a
Error message
DNS config is not set for this domain or the domain is not a valid domain! (It was found to be set to '${dnsRecordIP}') What it means
First network check in ConfigurationManager::setDomain() (only when domain validation is not skipped): the domain must resolve to a usable IP via gethostbyname (A record) or dns_get_record (AAAA record); if neither yields a valid IP, the exception is thrown and ConfigurationController returns HTTP 422. The parenthesised value in the message shows what was resolved — usually an empty string, meaning no A/AAAA record was found at all. This is a DNS-state problem, not a syntax problem: all syntactic checks already passed.
Source
Thrown at php/src/Data/ConfigurationManager.php:640
// Skip domain validation if opted in to do so
if ($this->shouldDomainValidationBeSkipped($skipDomainValidation)) {
error_log('Skipping domain validation');
} else {
$dnsRecordIP = gethostbyname($domain);
if ($dnsRecordIP === $domain) {
$dnsRecordIP = '';
}
if (empty($dnsRecordIP)) {
$record = dns_get_record($domain, DNS_AAAA);
if (isset($record[0]['ipv6']) && !empty($record[0]['ipv6'])) {
$dnsRecordIP = $record[0]['ipv6'];
}
}
// Validate IP
if (!filter_var($dnsRecordIP, FILTER_VALIDATE_IP)) {
throw new InvalidSettingConfigurationException("DNS config is not set for this domain or the domain is not a valid domain! (It was found to be set to '" . $dnsRecordIP . "')");
}
// Get the apache port
$port = $this->apachePort;
if (!filter_var($dnsRecordIP, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
if ($port === '443') {
throw new InvalidSettingConfigurationException("It seems like the ip-address of the domain is set to an internal or reserved ip-address. This is not supported by the domain validation. (It was found to be set to '" . $dnsRecordIP . "'). Please set it to a public ip-address so that the domain validation can work or skip the domain validation!");
} else {
error_log("Info: It seems like the ip-address of " . $domain . " is set to an internal or reserved ip-address. (It was found to be set to '" . $dnsRecordIP . "')");
}
}
// Check if port 443 is open
$connection = @fsockopen($domain, 443, $errno, $errstr, 10);
if ($connection) {
fclose($connection);
} else {View on GitHub (pinned to 6b788eec5e)
Solutions
- Verify from the host: 'dig +short cloud.example.com A' and 'dig +short cloud.example.com AAAA' — at least one must return an IP
- Create the missing A record pointing at your server's public IP (an AAAA record alone also works)
- If resolution works on the host but not inside the container, fix the Docker/mastercontainer DNS setup (check the host resolv.conf and any --dns settings)
- For intentionally unresolvable staging domains, tick 'skip domain validation' in the AIO dialog or set SKIP_DOMAIN_VALIDATION=true on the mastercontainer
Example fix
# before cloud.example.com has no A/AAAA record # after cloud.example.com. 300 IN A 203.0.113.10
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight the DNS state the same way the mastercontainer will
if (!checkdnsrr($domain, 'A') && !checkdnsrr($domain, 'AAAA')) {
$errors[] = 'No A/AAAA record found — create DNS before submitting';
} Type guard
function isInvalidSettingConfigurationException(\Throwable $e): bool {
return $e instanceof \AIO\Data\InvalidSettingConfigurationException;
} Try / catch
use AIO\Data\InvalidSettingConfigurationException;
try {
$configurationManager->setDomain($domain, $skipDomainValidation);
} catch (InvalidSettingConfigurationException $e) {
// message embeds the resolved value; show it and let the user fix DNS or skip
$formErrors[] = $e->getMessage();
} Prevention
- Run dig +short <domain> A/AAAA from the Docker host before starting AIO domain setup
- Ensure the mastercontainer has working upstream DNS (check resolv.conf / --dns)
- For staging domains without DNS, pass the skip_domain_validation flag deliberately
When it happens
Trigger: Typo'd domain ('cloudd.example.com'); domain registered but no A/AAAA record created yet; DNS record created moments ago and not yet propagated; the mastercontainer has broken DNS (bad resolv.conf, DNSSEC failure, unreachable resolver) so resolution fails inside the container while working on the host.
Common situations: Fresh installs where the DNS record was forgotten; split-DNS setups where the record only exists on the LAN resolver; Docker hosts with filtered or broken upstream DNS.
Related errors
- It seems like the ip-address of the domain is set to an inte
- Domain does not point to this server or the reverse proxy is
- Domain must contain at least one dot!
- Domain must not contain slashes!
- Domain must not contain colons!
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/cfe8069d60663315.
Report an issue: GitHub.