coollabsio/coolify · error · Exception
Port $port is in use.<br>You must stop the process using thi
Error message
Port $port is in use.<br>You must stop the process using this port.<br><br>Docs: <a target='_blank' class='dark:text-white hover:underline' href='https://coolify.io/docs'>https://coolify.io/docs</a><br>Discord: <a target='_blank' class='dark:text-white hover:underline' href='https://coolify.io/discord'>https://coolify.io/discord</a>
What it means
\Exception thrown from CheckProxy when $fromUI is true and the parallel port-conflict scan finds one of the proxy's required ports (typically 80/443/8080) already bound by another process on the server. The message intentionally embeds HTML links to docs/Discord because it is rendered in the Livewire error toast. Non-UI callers get false (proxy start skipped).
Source
Thrown at app/Actions/Proxy/CheckProxy.php:105
// Combine default ports with config ports
$portsToCheck = array_merge($portsToCheck, $configPorts);
}
} else {
$portsToCheck = [];
}
} catch (\Exception $e) {
Log::error('Error checking proxy: '.$e->getMessage());
}
if (count($portsToCheck) === 0) {
return false;
}
$portsToCheck = array_values(array_unique($portsToCheck));
// Check port conflicts in parallel
$conflicts = $this->checkPortConflictsInParallel($server, $portsToCheck, $proxyContainerName);
foreach ($conflicts as $port => $conflict) {
if ($conflict) {
if ($fromUI) {
throw new \Exception("Port $port is in use.<br>You must stop the process using this port.<br><br>Docs: <a target='_blank' class='dark:text-white hover:underline' href='https://coolify.io/docs'>https://coolify.io/docs</a><br>Discord: <a target='_blank' class='dark:text-white hover:underline' href='https://coolify.io/discord'>https://coolify.io/discord</a>");
} else {
return false;
}
}
}
return true;
}
}
/**
* Check multiple ports for conflicts in parallel
* Returns an array with port => conflict_status mapping
*/
private function checkPortConflictsInParallel(Server $server, array $ports, string $proxyContainerName): array
{
if (empty($ports)) {
return [];View on GitHub (pinned to 70b9acc424)
Solutions
- SSH to the server and identify the holder: `ss -tulpn | grep -E ':(80|443|8080)\s'`, then stop/disable that service (e.g. systemctl stop nginx).
- If the holder is an orphaned coolify-proxy container: `docker rm -f coolify-proxy` (or coolify-proxy_traefik on Swarm) and retry Start Proxy.
- If the ports must stay occupied, change the proxy's exposed ports in Coolify's proxy configuration or move the conflicting service elsewhere.
Example fix
# before clicking Start Proxy, on the server # (find and stop the conflicting process) ss -tulpn | grep -E ':(80|443|8080)\s' systemctl stop nginx && systemctl disable nginx # then retry Start Proxy in the UI
Defensive patterns
Strategy: validation
Validate before calling
// before starting proxy, verify required ports are free on the server
$ports = [80, 443, 8080];
$output = instant_remote_process(['ss -tulpn | grep -E ":(80|443|8080)\\s" || true'], $server, throwError: false);
if (trim((string) $output) !== '') {
// resolve conflicts before calling Start Proxy
} Try / catch
try {
CheckProxy::run($server, true);
} catch (\Exception $e) {
if (str_contains($e->getMessage(), 'is in use')) {
// parse the port, prompt user to stop the holder, then retry
} else {
throw $e;
}
} Prevention
- Dedicate servers to Coolify: stop/disable system webservers (nginx/apache) before adding the server.
- Check `ss -tulpn` for 80/443/8080 as part of server onboarding.
- After Swarm/local mode switches, remove orphaned proxy containers (coolify-proxy vs coolify-proxy_traefik).
- Prefer published-port apps over host-network apps on proxy servers to avoid port clashes.
When it happens
Trigger: Starting/restarting coolify-proxy from the UI while nginx, apache, another container, or a second coolify-proxy instance already listens on 80/443/8080; a stale coolify-proxy container still holding ports after a partial restart; Swarm vs non-Swarm name mismatch leaving an orphan container.
Common situations: Fresh server with a pre-existing web server; port changed in proxy config but an old process still bound; duplicated proxy containers (coolify-proxy vs coolify-proxy_traefik) after switching Swarm mode; another app deployed with host networking on the same ports.
Related errors
- Pre-deployment command: Could not find a valid container. Is
- Post-deployment command: Could not find a valid container. I
- ScheduledTaskJob failed: No valid container was found. Is th
- Command execution failed (exit code {$process_result->exitCo
- Unsupported database type: $databaseType
AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17).
Data as JSON: /api/errors/3e14e1fc4e8fa98a.
Report an issue: GitHub.