coollabsio/coolify · warning · Exception

Proxy should not run. You selected the Custom Proxy.

Error message

Proxy should not run. You selected the Custom Proxy.

What it means

\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.

Source

Thrown at app/Actions/Proxy/CheckProxy.php:36

    {
        if (! $server->isFunctional()) {
            return false;
        }
        if ($server->isBuildServer()) {
            if ($server->proxy) {
                $server->proxy = null;
                $server->save();
            }

            return false;
        }
        $proxyType = $server->proxyType();
        if ((is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) && ! $fromUI) {
            return false;
        }
        if (! $server->isProxyShouldRun()) {
            if ($fromUI) {
                throw new \Exception('Proxy should not run. You selected the Custom Proxy.');
            } else {
                return false;
            }
        }

        // Determine proxy container name based on environment
        $proxyContainerName = $server->isSwarm() ? 'coolify-proxy_traefik' : 'coolify-proxy';

        if ($server->isSwarm()) {
            $status = getContainerStatus($server, $proxyContainerName);
            $server->proxy->set('status', $status);
            $server->save();
            if ($status === 'running') {
                return false;
            }

            return true;
        } else {

View on GitHub (pinned to 70b9acc424)

Solutions

  1. If you want Coolify to manage the proxy, set the server's proxy type to Traefik (or Caddy) in Server -> Proxy, then start it.
  2. If you truly use a custom proxy, manage it outside Coolify and ignore the Start Proxy action - the exception is the expected guardrail.
  3. For automation, call the check with fromUI: false so a not-should-run proxy returns false instead of throwing.

Example fix

// caller-side
// before
CheckProxy::run($server, true); // throws for CUSTOM/NONE

// after
if ($server->isProxyShouldRun()) {
    CheckProxy::run($server, true);
} else {
    // user-managed proxy: skip Coolify's start flow
}
Defensive patterns

Strategy: validation

Validate before calling

if (! $server->isProxyShouldRun()) {
    // proxy is NONE/custom or build server: do not call the UI start path
    return;
}
CheckProxy::run($server, true);

Type guard

function proxyManagedByCoolify(\App\Models\Server $server): bool
{
    return $server->isProxyShouldRun();
}

Try / catch

try {
    CheckProxy::run($server, true);
} catch (\Exception $e) {
    if (str_contains($e->getMessage(), 'Proxy should not run')) {
        // expected when proxy type is CUSTOM/NONE - ignore or inform user
    } else {
        throw $e;
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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