coollabsio/coolify · error · Exception

Server not found.

Error message

Server not found.

What it means

The 'new Docker destination' component loads the current team's servers (Server::ownedByCurrentTeam). When no server_id parameter is supplied and the collection is empty, it throws instead of rendering a picker with no options.

Source

Thrown at app/Livewire/Destination/New/Docker.php:51

    public bool $isSwarm = false;

    public function mount(?string $server_id = null): void
    {
        $this->network = new_public_id();
        $this->servers = Server::isUsable()->get();

        if (filled($server_id)) {
            $this->selectedServer = Server::ownedByCurrentTeam()->whereKey($server_id)->firstOrFail();

            if (! $this->servers->contains('id', $this->selectedServer->id)) {
                $this->servers->push($this->selectedServer);
            }

            $this->serverId = (string) $this->selectedServer->id;
        } else {
            $foundServer = $this->servers->first();
            if (! $foundServer) {
                throw new \Exception('Server not found.');
            }
            $this->selectedServer = $foundServer;
            $this->serverId = (string) $this->selectedServer->id;
        }
        $this->generateName();
    }

    public function updatedServerId(): void
    {
        $this->selectedServer = $this->servers->find($this->serverId);
        if (! $this->selectedServer) {
            throw new \Exception('Server not found.');
        }
        $this->generateName();
    }

    public function generateName(): void
    {

View on GitHub (pinned to 70b9acc424)

Solutions

  1. Register a server first (Servers > Add new server), then create the Docker network destination
  2. If a server should be visible, verify it belongs to the current team and was not deleted
Defensive patterns

Strategy: validation

Validate before calling

// guard before rendering the destination form
if (Server::ownedByCurrentTeam()->doesntExist()) {
    return redirect()->route('server.create')
        ->with('message', 'Add a server before creating a destination.');
}

Type guard

function teamHasServers(): bool
{
    return Server::ownedByCurrentTeam()->exists();
}

Prevention

When it happens

Trigger: Opening destination creation before the team has registered any server; all team servers deleted; the servers collection filtered to nothing.

Common situations: Fresh Coolify install where onboarding was skipped; a second team without servers; deep link to the destination page after the last server was removed.

Related errors


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