coollabsio/coolify · error · Exception

A server with this IP/Domain is already in use by another…

Error message

A server with this IP/Domain is already in use by another team.

What it means

Same uniqueness probe in Server Show's syncData(), but the conflicting row belongs to a different team (foundServer->team_id !== currentTeam()->id). The check is a global query across teams, not team-scoped, so an IP registered by any other Coolify team blocks reuse - reflecting that the shared host is already managed elsewhere. The submitted IP is reverted before the exception propagates.

Solutions

  1. Have the other team release the server (delete it there) before registering it here
  2. Use a distinct IP/hostname that reaches the box (e.g. a DNS name instead of the raw IP) if you own the host
  3. If the row is a leftover from a transfer you control, remove it in the source team and retry
  4. Contact the instance administrator for cross-team cleanup on managed instances

Example fix

// before
$this->server->ip = $this->ip; // no duplicate check

// after
$found = \App\Models\Server::where('ip', $this->ip)
    ->where('id', '!=', $this->server->id)->first();
if (! $found) {
    $this->server->ip = $this->ip;
} else {
    $this->dispatch('error', $found->team_id === currentTeam()->id
        ? 'A server with this IP/Domain already exists in your team.'
        : 'A server with this IP/Domain is already in use by another team.');
}
Defensive patterns

Strategy: validation

Validate before calling

$found = \App\Models\Server::where('ip', $this->ip)
    ->where('id', '!=', $this->server->id)->first();
if ($found && $found->team_id !== currentTeam()->id) {
    // the IP is owned by another team - coordinate release or use another hostname
}

Try / catch

Catch \Exception in submit and dispatch('error', $e->getMessage()); do not retry the same IP - cross-team collisions need the other row removed or a different hostname.

Prevention

When it happens

Trigger: Two teams on the same Coolify instance (or cloud) trying to register the same host; a server transferred from another team leaving the old row behind; trying to manage a host already managed by a different account.

Common situations: Shared/VPS hosts claimed by a previous organization account; leftover rows after a failed server transfer; consultants re-adding a client box under a new team.

Related errors


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

Appendix: source

Thrown at app/Livewire/Server/Show.php:248

            ->toArray();
    }

    public function syncData(bool $toModel = false)
    {
        if ($toModel) {
            $this->validate();

            $this->authorize('update', $this->server);
            $foundServer = Server::where('ip', $this->ip)
                ->where('id', '!=', $this->server->id)
                ->first();
            if ($foundServer) {
                $this->ip = $this->server->ip;
                if ($foundServer->team_id === currentTeam()->id) {
                    throw new \Exception('A server with this IP/Domain already exists in your team.');
                }

                throw new \Exception('A server with this IP/Domain is already in use by another team.');
            }

            $this->server->name = $this->name;
            $this->server->description = $this->description;
            $this->server->ip = $this->ip;
            $this->server->user = $this->user;
            $this->server->port = $this->port;
            $this->server->validation_logs = $this->validationLogs;
            $this->server->save();

            $this->server->settings->connection_timeout = $this->connectionTimeout;
            $this->server->settings->is_swarm_manager = $this->isSwarmManager;
            $this->server->settings->wildcard_domain = $this->wildcardDomain;
            $this->server->settings->is_swarm_worker = $this->isSwarmWorker;
            $this->server->settings->is_build_server = $this->isBuildServer;
            $this->server->settings->is_metrics_enabled = $this->isMetricsEnabled;
            $this->server->settings->sentinel_token = $this->sentinelToken;
            $this->server->settings->sentinel_metrics_refresh_rate_seconds = $this->sentinelMetricsRefreshRateSeconds;

View on GitHub (pinned to 70b9acc424)