{"record":{"id":"94a8d3907392e84a","repo":"coollabsio/coolify","slug":"proxy-should-not-run-you-selected-the-custom-prox","errorCode":null,"errorMessage":"Proxy should not run. You selected the Custom Proxy.","messagePattern":"Proxy should not run\\. You selected the Custom Proxy\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"app/Actions/Proxy/CheckProxy.php","lineNumber":36,"sourceCode":"    {\n        if (! $server->isFunctional()) {\n            return false;\n        }\n        if ($server->isBuildServer()) {\n            if ($server->proxy) {\n                $server->proxy = null;\n                $server->save();\n            }\n\n            return false;\n        }\n        $proxyType = $server->proxyType();\n        if ((is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) && ! $fromUI) {\n            return false;\n        }\n        if (! $server->isProxyShouldRun()) {\n            if ($fromUI) {\n                throw new \\Exception('Proxy should not run. You selected the Custom Proxy.');\n            } else {\n                return false;\n            }\n        }\n\n        // Determine proxy container name based on environment\n        $proxyContainerName = $server->isSwarm() ? 'coolify-proxy_traefik' : 'coolify-proxy';\n\n        if ($server->isSwarm()) {\n            $status = getContainerStatus($server, $proxyContainerName);\n            $server->proxy->set('status', $status);\n            $server->save();\n            if ($status === 'running') {\n                return false;\n            }\n\n            return true;\n        } else {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Actions/Proxy/CheckProxy.php#L18-L54","documentation":"\\Exception thrown from CheckProxy when $fromUI is true and $server->isProxyShouldRun() returns false. isProxyShouldRun() (Server.php:1284) returns false when proxyType() is NONE or the server is a build server - so the UI path ('Start/Check proxy' button) refuses to start a proxy the user explicitly set to Custom/NONE. Non-UI (automated) callers get a silent false instead.","triggerScenarios":"Server proxy type set to NONE or Custom in Server -> Proxy, then clicking start/restart proxy from the UI; a build server (is_build_server) whose proxy is started from the UI; proxy type changed but the stale UI still offers the start action.","commonSituations":"User selects 'Custom Proxy' because they run their own reverse proxy (nginx/Caddy outside Coolify), later clicks Coolify's Start Proxy button out of habit; misconfigured new server defaults; build servers unintentionally sent proxy commands.","solutions":["If you want Coolify to manage the proxy, set the server's proxy type to Traefik (or Caddy) in Server -> Proxy, then start it.","If you truly use a custom proxy, manage it outside Coolify and ignore the Start Proxy action - the exception is the expected guardrail.","For automation, call the check with fromUI: false so a not-should-run proxy returns false instead of throwing."],"exampleFix":"// caller-side\n// before\nCheckProxy::run($server, true); // throws for CUSTOM/NONE\n\n// after\nif ($server->isProxyShouldRun()) {\n    CheckProxy::run($server, true);\n} else {\n    // user-managed proxy: skip Coolify's start flow\n}","handlingStrategy":"validation","validationCode":"if (! $server->isProxyShouldRun()) {\n    // proxy is NONE/custom or build server: do not call the UI start path\n    return;\n}\nCheckProxy::run($server, true);","typeGuard":"function proxyManagedByCoolify(\\App\\Models\\Server $server): bool\n{\n    return $server->isProxyShouldRun();\n}","tryCatchPattern":"try {\n    CheckProxy::run($server, true);\n} catch (\\Exception $e) {\n    if (str_contains($e->getMessage(), 'Proxy should not run')) {\n        // expected when proxy type is CUSTOM/NONE - ignore or inform user\n    } else {\n        throw $e;\n    }\n}","preventionTips":["Decide once per server whether Coolify or you manage the proxy; don't mix.","Hide Start Proxy UI for servers with proxy type NONE/CUSTOM and build servers.","Use fromUI: false in automated flows so a non-running proxy is a boolean, not an exception."],"tags":["proxy","traefik","server-configuration","custom-proxy"],"backgroundTag":"invalid-proxy-configuration","analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}