coollabsio/coolify · error · RuntimeException

Cannot claim the Coolify host itself.

Error message

Cannot claim the Coolify host itself.

What it means

Error "Cannot claim the Coolify host itself." thrown in coollabsio/coolify.

Source

Thrown at app/Services/ServerTransfer/ServerTransferClaimer.php:31

    /**
     * Claim a managed host for this Coolify instance.
     *
     * Database ownership (metadata + Sentinel settings) is committed in one transaction so a
     * mid-flight failure rolls back. Remote SSH claim-file writes happen after commit and are
     * best-effort — they cannot participate in the DB transaction.
     *
     * @return array{
     *     server_uuid: string,
     *     claim: array<string, mixed>,
     *     sentinel_rebound: bool,
     *     claim_written: bool,
     *     message: string
     * }
     */
    public function claim(Server $server, bool $writeRemote = true, bool $rebindSentinel = true): array
    {
        if ($server->id === 0) {
            throw new RuntimeException('Cannot claim the Coolify host itself.');
        }

        $instanceUrl = rtrim((string) (instanceSettings()->fqdn ?: config('app.url')), '/');
        if ($instanceUrl === '') {
            throw new RuntimeException('Instance URL (FQDN or APP_URL) must be set before claiming a server.');
        }

        $exportId = data_get($server->server_metadata, 'transfer.export_id');

        $claim = [
            'instance_url' => $instanceUrl,
            'server_uuid' => $server->uuid,
            'team_id' => $server->team_id,
            'claimed_at' => now()->toIso8601String(),
            'export_id' => $exportId,
            'schema_version' => ServerTransferBundle::SCHEMA_VERSION,
        ];

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/ServerTransfer/ServerTransferClaimer.php:31 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/165d920849521a51. Report an issue: GitHub.