{"record":{"id":"08c997e81411db84","repo":"nextcloud/all-in-one","slug":"domain-does-not-point-to-this-server-or-the-revers","errorCode":null,"errorMessage":"Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')","messagePattern":"Domain does not point to this server or the reverse proxy is not configured correctly\\. See the mastercontainer logs for more details\\. \\('sudo docker logs -f nextcloud-aio-mastercontainer'\\)","errorType":"validation","errorClass":"InvalidSettingConfigurationException","httpStatus":422,"severity":"error","filePath":"php/src/Data/ConfigurationManager.php","lineNumber":695,"sourceCode":"                $guzzleResponse = $guzzleClient->get($testUrl);\n                # Get rid of trailing \\n\n                $response = str_replace(\"\\n\", \"\", (string)$guzzleResponse->getBody());\n            } catch (TransferException $e) {\n                $response = '';\n                $errorMessage = 'The error message was: ' . $e->getMessage();\n            }\n\n            if ($response !== $instanceID) {\n                error_log('The response of the connection attempt to \"' . $testUrl . '\" was: ' . $response);\n                error_log('Expected was: ' . $instanceID);\n                error_log($errorMessage);\n                $notice = \"Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')\";\n                if ($port === '443') {\n                    $notice .= \" If you should be using Cloudflare, make sure to disable the Cloudflare Proxy feature as it might block the domain validation. Same for any other firewall or service that blocks unencrypted access on port 443.\";\n                } else {\n                    error_log('Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!');\n                }\n                throw new InvalidSettingConfigurationException($notice);\n            }\n        }\n\n        $this->startTransaction();\n        // Write domain\n        // Don't set the domain via the attribute, or we create a loop.\n        $this->set('domain', $domain);\n        // Reset the borg restore password when setting the domain\n        $this->borgRestorePassword = '';\n        $this->commitTransaction();\n    }\n\n    public function getBaseDN() : string {\n        $domain = $this->domain;\n        if ($domain === \"\") {\n            return \"\";\n        }\n        return 'dc=' . implode(',dc=', explode('.', $domain));","sourceCodeStart":677,"sourceCodeEnd":713,"githubUrl":"https://github.com/nextcloud/all-in-one/blob/6b788eec5e61733cf03ed380a3572e43ae3f11ce/php/src/Data/ConfigurationManager.php#L677-L713","documentation":"Final check in ConfigurationManager::setDomain() (when validation is not skipped): the mastercontainer GETs the domain on port 443 and compares the response body to its INSTANCE_ID secret (served by the AIO apache container). Any other response — a default vhost, another server, a redirect, an error page — throws this notice; this variant without the Cloudflare suffix is the APACHE_PORT != 443 case, where the validation request is made over https and a reverse-proxy misroute is the typical cause. The actual and expected bodies are written to the mastercontainer log; ConfigurationController returns HTTP 422.","triggerScenarios":"APACHE_PORT set to a non-443 port behind a reverse proxy while the proxy does not route that Host to AIO's apache on its port; missing or incorrect proxy_pass/SNI config so the request hits the default vhost; another web server answering on 443 for that domain; a TLS/SNI mismatch closing the connection so the response comes back empty.","commonSituations":"Reverse-proxy installs (Caddy/Nginx/Traefik) where the AIO vhost is misconfigured or not enabled; the domain still pointing at previous hosting after a migration.","solutions":["Read the actual response: 'sudo docker logs -f nextcloud-aio-mastercontainer' logs the body it received and the expected INSTANCE_ID","Follow the logged guide https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug and verify the proxy passes to https://<server>:<APACHE_PORT> with correct SNI and Host header","Confirm the domain resolves to this server's public IP and not to old hosting","Make sure no other service or default vhost captures requests for that Host on port 443"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Reproduce the instance-id check for a non-443 APACHE_PORT install\n$testUrl = 'https://' . $domain . ':443';\n$client = new \\GuzzleHttp\\Client(['http_errors' => false, 'connect_timeout' => 10, 'timeout' => 10]);\n$response = trim((string) $client->get($testUrl)->getBody());\nif ($response !== $instanceId) {\n    $errors[] = 'Reverse proxy did not return the AIO instance id — fix the vhost first';\n}","typeGuard":"function isInvalidSettingConfigurationException(\\Throwable $e): bool {\n    return $e instanceof \\AIO\\Data\\InvalidSettingConfigurationException;\n}","tryCatchPattern":"use AIO\\Data\\InvalidSettingConfigurationException;\n\ntry {\n    $configurationManager->setDomain($domain, $skipDomainValidation);\n} catch (InvalidSettingConfigurationException $e) {\n    // the mastercontainer log holds the actual vs expected response bodies;\n    // point the user at reverse-proxy.md#how-to-debug\n    $formErrors[] = $e->getMessage();\n}","preventionTips":["Configure and test the reverse-proxy vhost (proxy_pass to https://host:APACHE_PORT with SNI) before entering the domain in AIO","Ensure exactly one service answers for that Host header on 443","Read 'sudo docker logs -f nextcloud-aio-mastercontainer' whenever this fires — it shows what actually answered"],"tags":["php","nextcloud-aio","reverse-proxy","domain-validation","configuration","network"],"backgroundTag":"reverse-proxy-misconfiguration","analyzedSha":"6b788eec5e61733cf03ed380a3572e43ae3f11ce","analyzedAt":"2026-08-21T05:47:24.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}