{"record":{"id":"04d32ce003b7a98c","repo":"coollabsio/coolify","slug":"server-is-disabled","errorCode":null,"errorMessage":"Server is disabled.","messagePattern":"Server is disabled\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Helpers/SshMultiplexingHelper.php","lineNumber":181,"sourceCode":"\n        if (data_get($server, 'settings.is_cloudflare_tunnel')) {\n            $scpCommand .= '-o ProxyCommand=\"cloudflared access ssh --hostname %h\" ';\n        }\n\n        $scpCommand .= self::getCommonSshOptions($server, $sshKeyLocation, self::getConnectionTimeout($server), config('constants.ssh.server_interval'), isScp: true);\n\n        // Download: remote source -> local dest\n        if ($server->isIpv6()) {\n            return $scpCommand.escapeshellarg($server->user).'@['.escapeshellarg($server->ip).']:'.escapeshellarg($remoteSource).' '.escapeshellarg($localDest);\n        }\n\n        return $scpCommand.self::escapedUserAtHost($server).':'.escapeshellarg($remoteSource).' '.escapeshellarg($localDest);\n    }\n\n    public static function generateSshCommand(Server $server, string $command, bool $disableMultiplexing = false, ?int $commandTimeout = null): string\n    {\n        if ($server->settings->force_disabled) {\n            throw new \\RuntimeException('Server is disabled.');\n        }\n\n        $sshConfig = self::serverSshConfiguration($server);\n        $sshKeyLocation = $sshConfig['sshKeyLocation'];\n\n        self::validateSshKey($server->privateKey);\n\n        $commandTimeout = $commandTimeout ?? (int) config('constants.ssh.command_timeout');\n        $sshCommand = $commandTimeout > 0 ? \"timeout {$commandTimeout} ssh \" : 'ssh ';\n\n        if (! $disableMultiplexing && self::isMultiplexingEnabled()) {\n            try {\n                if (self::ensureMultiplexedConnection($server)) {\n                    $sshCommand .= self::multiplexingOptions($server);\n                }\n            } catch (\\Throwable $e) {\n                Log::warning('SSH multiplexing failed, falling back to non-multiplexed connection', [\n                    'server' => $server->name ?? $server->ip,","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Helpers/SshMultiplexingHelper.php#L163-L199","documentation":"SshMultiplexingHelper::generateSshCommand() throws when $server->settings->force_disabled is true. Coolify lets admins force-disable a server (manual toggle, or automatically when a host is unreachable); after that, every SSH command generated for it fails fast with this message instead of attempting a connection.","triggerScenarios":"Any SSH-backed operation against a force-disabled server: deployments, proxy configuration, container status checks, terminal access, validations, backups — all route through generateSshCommand().","commonSituations":"Admin force-disabled the server after repeated connectivity failures and forgot to re-enable; automation/queue jobs still reference the disabled server in their payload; a server was disabled during an incident and never re-enabled.","solutions":["Re-enable the server: open the server in the UI, go to Settings, turn off 'Force Disable', then retry the operation.","If it was auto-disabled because the host was unreachable, fix the underlying SSH connectivity (IP, port, private key) before re-enabling.","If you call SSH helpers programmatically, check settings->force_disabled first and skip/queue the work instead of letting it throw."],"exampleFix":"// before: job throws 'Server is disabled.' mid-deployment\ninstant_remote_process($commands, $server);\n\n// after: fail fast with an actionable message before any SSH work\nif ($server->settings->force_disabled) {\n    throw new \\RuntimeException(\"Server '{$server->name}' is force-disabled. Re-enable it in the server settings.\");\n}\ninstant_remote_process($commands, $server);","handlingStrategy":"validation","validationCode":"// Guard every SSH-backed job before it reaches the SSH layer\nif ($server->settings->force_disabled) {\n    // skip, queue for later, or fail with an actionable message\n    throw new \\RuntimeException(\"Server '{$server->name}' is force-disabled; re-enable it in server settings.\");\n}\n\n$sshCommand = SshMultiplexingHelper::generateSshCommand($server, 'uptime');","typeGuard":"function serverSshAvailable(\\App\\Models\\Server $server): bool\n{\n    return ! $server->settings->force_disabled;\n}","tryCatchPattern":"try {\n    instant_remote_process($commands, $server);\n} catch (\\RuntimeException $e) {\n    if ($e->getMessage() === 'Server is disabled.') {\n        // do not retry — re-enablement is a user action; park the job\n        $this->release(3600);\n        return;\n    }\n    throw $e;\n}","preventionTips":["Filter force-disabled servers out of build-server and automation candidate lists up front.","Show the disabled state clearly in UI lists so users know why operations fail.","Never auto-retry this error — it only clears after a human re-enables the server."],"tags":["ssh","server","disabled","coolify"],"backgroundTag":"server-disabled","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}