{"record":{"id":"dfff371f2395f08a","repo":"coollabsio/coolify","slug":"cannot-transfer-the-coolify-host-itself","errorCode":null,"errorMessage":"Cannot transfer the Coolify host itself.","messagePattern":"Cannot transfer the Coolify host itself\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Services/ServerTransfer/ServerTransferClaimer.php","lineNumber":110,"sourceCode":"            ? 'Server claimed. Ownership file written and Sentinel rebound to this instance.'\n            : 'Server claimed in Coolify. Remote ownership file was not written (SSH unavailable or skipped).';\n\n        return $result;\n    }\n\n    /**\n     * Mark a server as transferred away from this instance (source side).\n     * Disables automations to prevent dual management.\n     *\n     * All database writes run in one transaction so partial disable state cannot stick on failure.\n     * Local SSH key cache cleanup runs after commit (filesystem; not transactional).\n     *\n     * @return array{server_uuid: string, message: string}\n     */\n    public function markTransferred(Server $server, ?string $exportId = null, ?string $targetInstanceUrl = null): array\n    {\n        if ($server->id === 0) {\n            throw new RuntimeException('Cannot transfer the Coolify host itself.');\n        }\n\n        $result = DB::transaction(function () use ($server, $exportId, $targetInstanceUrl) {\n            $server = Server::query()->with('settings')->lockForUpdate()->findOrFail($server->id);\n\n            if ($server->settings) {\n                $server->settings->force_disabled = true;\n                $server->settings->is_sentinel_enabled = false;\n                $server->settings->save();\n            }\n\n            $metadata = $server->server_metadata ?? [];\n            $metadata['transfer'] = array_merge((array) data_get($metadata, 'transfer', []), [\n                'status' => 'transferred',\n                'export_id' => $exportId ?? data_get($metadata, 'transfer.export_id'),\n                'target_instance_url' => $targetInstanceUrl,\n                'transferred_at' => now()->toIso8601String(),\n            ]);","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Services/ServerTransfer/ServerTransferClaimer.php#L92-L128","documentation":"Error \"Cannot transfer the Coolify host itself.\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Services/ServerTransfer/ServerTransferClaimer.php:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}