nextcloud/all-in-one · error · InvalidSettingConfigurationException
Domain must not contain colons!
Error message
Domain must not contain colons!
What it means
Third check in ConfigurationManager::setDomain(): the domain must not contain ':'. In practice this means a port suffix was included, e.g. 'cloud.example.com:8443' (a scheme like 'https://' would already have been rejected by the earlier slash check). Throws InvalidSettingConfigurationException → HTTP 422 shown in the AIO UI. Ports are not part of the domain setting; the listen port is controlled separately via the mastercontainer's APACHE_PORT environment variable.
Source
Thrown at php/src/Data/ConfigurationManager.php:609
/**
* @throws InvalidSettingConfigurationException
*
* We can't turn this into a private validation method because of the second argument.
*/
public function setDomain(string $domain, bool $skipDomainValidation) : void {
// Validate that at least one dot is contained
if (!str_contains($domain, '.')) {
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
}
// 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) {View on GitHub (pinned to 6b788eec5e)
Solutions
- Remove the port from the domain field — enter 'cloud.example.com' only
- If AIO must listen on another port, set the APACHE_PORT environment variable on the mastercontainer (and point the reverse proxy at it), not in the domain field
- For scripted configs, split host and port before submitting, e.g. with parse_url()
Example fix
// before domain = 'cloud.example.com:8443' // after domain = 'cloud.example.com' // (and configure -e APACHE_PORT=8443 on the mastercontainer instead)
Defensive patterns
Strategy: validation
Validate before calling
// Ports belong in APACHE_PORT, not in the domain: split them off
$host = parse_url('//' . $domain, PHP_URL_HOST) ?? $domain;
if (str_contains($host, ':')) {
$errors[] = 'Remove the port from the domain; configure APACHE_PORT instead';
} Try / catch
use AIO\Data\InvalidSettingConfigurationException;
try {
$configurationManager->setDomain($domain, $skipDomainValidation);
} catch (InvalidSettingConfigurationException $e) {
$formErrors[] = $e->getMessage();
} Prevention
- Keep host and port in separate variables/config keys
- For non-443 installs set APACHE_PORT on the mastercontainer instead of appending ':port' to the domain
- Reject ':' in client-side domain validation
When it happens
Trigger: domain='cloud.example.com:443' or 'cloud.example.com:8443'; scripts concatenating host and port into one variable; copy-pasting 'host:port' from a tutorial into the domain field.
Common situations: Reverse-proxy installs where AIO listens on a non-443 port and users append the port to the domain instead of setting APACHE_PORT; SSH-style 'host:port' habits.
Related errors
- Domain must contain at least one dot!
- Domain must not contain slashes!
- Domain is not a valid domain!
- Please enter a domain and not an IP-address!
- DNS config is not set for this domain or the domain is not a
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/8fd8ce5c24277682.
Report an issue: GitHub.