nextcloud/all-in-one · error · InvalidSettingConfigurationException

Please enter a domain and not an IP-address!

Error message

Please enter a domain and not an IP-address!

What it means

Fifth check in ConfigurationManager::setDomain(): if the value validates as an IP address (filter_var with FILTER_VALIDATE_IP, IPv4 or IPv6), it is rejected — AIO requires a DNS hostname for the domain setting. This check runs unconditionally, before the skip-domain-validation logic, so even ticking 'skip domain validation' does not allow IP addresses. Throws InvalidSettingConfigurationException → HTTP 422 in the AIO UI.

Source

Thrown at php/src/Data/ConfigurationManager.php:619

        // Validate that no slashes are contained
        if (str_contains($domain, '/')) {
            throw new InvalidSettingConfigurationException("Domain must not contain slashes!");
        }

        // Validate that no colons are contained
        if (str_contains($domain, ':')) {
            throw new InvalidSettingConfigurationException("Domain must not contain colons!");
        }

        // Validate domain
        if (filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false) {
            throw new InvalidSettingConfigurationException("Domain is not a valid domain!");
        }

        // Validate that it is not an IP-address
        if(filter_var($domain, FILTER_VALIDATE_IP)) {
            throw new InvalidSettingConfigurationException("Please enter a domain and not an IP-address!");
        }

        // 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'];
                }
            }

View on GitHub (pinned to 6b788eec5e)

Solutions

  1. Get a DNS name (a free deSEC / DuckDNS / dynamic-DNS subdomain is enough) that points to the server IP, and submit that name
  2. Do not paste the IP even with 'skip domain validation' enabled — the IP check runs before the skip logic
  3. Accept that AIO needs a domain: for IP-only plans, obtain a cheap or free domain first

Example fix

// before
domain = '192.168.1.10'
// after
// create an A record: cloud.example.com -> 192.168.1.10
domain = 'cloud.example.com'
Defensive patterns

Strategy: validation

Validate before calling

if (filter_var($domain, FILTER_VALIDATE_IP)) {
    $errors[] = 'Enter a DNS name that points to the IP, not the IP itself';
}

Try / catch

use AIO\Data\InvalidSettingConfigurationException;

try {
    $configurationManager->setDomain($domain, $skipDomainValidation);
} catch (InvalidSettingConfigurationException $e) {
    $formErrors[] = $e->getMessage();
}

Prevention

When it happens

Trigger: domain='192.168.1.10' (LAN IP) or the server's public IP; DDNS users pasting the currently resolved IP instead of the dynamic hostname; quick tests that bypass DNS entirely.

Common situations: No domain purchased yet; users wanting IP-only access (unsupported by AIO); confusion between a DDNS name and the address it currently points to.

Related errors


AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21). Data as JSON: /api/errors/0b7403f903f9b688. Report an issue: GitHub.