{"record":{"id":"02082133f2a66c8c","repo":"coollabsio/coolify","slug":"server-is-not-reachable-please-validate-your-conf","errorCode":null,"errorMessage":"Server is not reachable. Please validate your configuration and connection.<br>Check this <a target=\"_blank\" class=\"text-black underline dark:text-white\" href=\"https://coolify.io/docs/knowledge-base/server/openssh\">documentation</a> for further help. <br><br><div class=\"text-error\">Error: {$sanitizedError}</div>","messagePattern":"Server is not reachable\\. Please validate your configuration and connection\\.<br>Check this <a target=\"_blank\" class=\"text-black underline dark:text-white\" href=\"https://coolify\\.io/docs/knowledge-base/server/openssh\">documentation</a> for further help\\. <br><br><div class=\"text-error\">Error: (.+?)</div>","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Actions/Server/ValidateServer.php","lineNumber":73,"sourceCode":"            if (in_array($status, ['off', 'archive', 'deleted'], true)) {\n                $this->error = $status === 'deleted'\n                    ? 'DigitalOcean droplet is deleted or no longer accessible. Relink this server before validating.'\n                    : 'DigitalOcean droplet is '.($status ?? 'not running').'. Power it on before validating.';\n                $server->update([\n                    'validation_logs' => $this->error,\n                ]);\n                throw new \\Exception($this->error);\n            }\n        }\n\n        ['uptime' => $this->uptime, 'error' => $error] = $server->validateConnection();\n        if (! $this->uptime) {\n            $sanitizedError = htmlspecialchars($error ?? '', ENT_QUOTES, 'UTF-8');\n            $this->error = 'Server is not reachable. Please validate your configuration and connection.<br>Check this <a target=\"_blank\" class=\"text-black underline dark:text-white\" href=\"https://coolify.io/docs/knowledge-base/server/openssh\">documentation</a> for further help. <br><br><div class=\"text-error\">Error: '.$sanitizedError.'</div>';\n            $server->update([\n                'validation_logs' => $this->error,\n            ]);\n            throw new \\Exception($this->error);\n        }\n        $this->supported_os_type = $server->validateOS();\n        if (! $this->supported_os_type) {\n            $this->error = 'Server OS type is not supported. Please install Docker manually before continuing: <a target=\"_blank\" class=\"text-black underline dark:text-white\" href=\"https://docs.docker.com/engine/install/#server\">documentation</a>.';\n            $server->update([\n                'validation_logs' => $this->error,\n            ]);\n            throw new \\Exception($this->error);\n        }\n\n        $validationResult = $server->validatePrerequisites();\n        if (! $validationResult['success']) {\n            $missingCommands = implode(', ', $validationResult['missing']);\n            $this->error = \"Prerequisites ({$missingCommands}) are not installed. Please install them before continuing or use the validation with installation endpoint.\";\n            $server->update([\n                'validation_logs' => $this->error,\n            ]);\n            throw new \\Exception($this->error);","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Actions/Server/ValidateServer.php#L55-L91","documentation":"ValidateServer ran Server::validateConnection(), which executes `ls /` over SSH (instant_remote_process) and catches any Throwable. On failure the raw SSH error message is sanitized with htmlspecialchars and embedded into this HTML error (with an openssh docs link), persisted to validation_logs, and thrown. The embedded 'Error: {...}' part names the actual SSH failure — authentication, timeout, connection refused, etc.","triggerScenarios":"Wrong IP/SSH port/username in server settings; missing or revoked authorized key; firewall or cloud security group blocking SSH; DNS pointing at the wrong host; server powered off; host key/SSH mux issues (validateConnection disables mux first, so mux is usually not the cause).","commonSituations":"Fresh server where the Coolify team key was never installed; elastic IP changed after reboot; security group not opened to the Coolify instance's IP; local network blocking outbound 22.","solutions":["Read the embedded 'Error:' text — it distinguishes auth failure from timeout/refused and points at the fix.","Verify IP, port and user in the server settings, then test manually from the Coolify host: ssh -p <port> <user>@<ip>.","Open the server firewall/security group for SSH from the Coolify instance.","Reinstall the team's public key in ~/.ssh/authorized_keys on the host and re-validate."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"['uptime' => $up, 'error' => $err] = $server->validateConnection();\nif (! $up) {\n    return 'SSH unreachable: '.$err; // fail fast with the raw reason\n}\nValidateServer::run($server);","typeGuard":null,"tryCatchPattern":"try {\n    ValidateServer::run($server);\n} catch (\\Exception $e) {\n    if (str_contains($e->getMessage(), 'Server is not reachable')) {\n        // read the embedded Error: {...} — retry only for timeouts/transient network,\n        // never for auth failures; the full message is also in validation_logs\n    } else {\n        throw $e;\n    }\n}","preventionTips":["Pre-verify SSH from the Coolify host: ssh -p <port> <user>@<ip> before adding the server.","Keep the team's public key installed and firewalls open to the Coolify instance IP.","Note that validation_logs stores the exact sanitized error — read it before retrying.","Distinguish auth errors (fix keys) from timeouts (fix network) — retrying auth failures is pointless."],"tags":["ssh","connectivity","server-validation","firewall","authentication"],"backgroundTag":"ssh-connection-failed","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}