coollabsio/coolify · error · Exception

Configuration is not synced

Error message

Configuration is not synced

What it means

\Exception from StartProxy when GetProxyConfiguration::run($server) returns a falsy configuration before saving it to the server. It guards the invariant that the proxy's docker-compose YAML must exist and be non-empty before base64/md5 stamping and remote execution. In practice GetProxyConfiguration already throws its own exception on empty output, so reaching this branch usually indicates an empty-string (not null) return or an older/custom fork where the two actions drifted apart.

Source

Thrown at app/Actions/Proxy/StartProxy.php:34

    public function handle(Server $server, bool $async = true, bool $force = false, bool $restarting = false): string|Activity
    {
        $proxyType = $server->proxyType();
        if ((is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop || $server->isBuildServer()) && $force === false) {
            return 'OK';
        }
        $server->proxy->set('status', 'starting');
        $server->save();
        $server->refresh();

        if (! $restarting) {
            ProxyStatusChangedUI::dispatch($server->team_id);
        }

        $commands = collect([]);
        $proxy_path = $server->proxyPath();
        $configuration = GetProxyConfiguration::run($server);
        if (! $configuration) {
            throw new \Exception('Configuration is not synced');
        }
        SaveProxyConfiguration::run($server, $configuration);
        $docker_compose_yml_base64 = base64_encode($configuration);
        $server->proxy->last_applied_settings = str($docker_compose_yml_base64)->pipe('md5')->value();
        $server->save();

        if ($server->isSwarmManager()) {
            $commands = $commands->merge([
                "mkdir -p $proxy_path/dynamic",
                "cd $proxy_path",
                "echo 'Creating required Docker Compose file.'",
                "echo 'Starting coolify-proxy.'",
                'docker stack deploy --detach=true -c docker-compose.yml coolify-proxy',
                "echo 'Successfully started coolify-proxy.'",
            ]);
        } else {
            if (isDev()) {
                if ($proxyType === ProxyTypes::CADDY->value) {

View on GitHub (pinned to 70b9acc424)

Solutions

  1. Open Server -> Proxy, re-select the proxy type (Traefik/Caddy) and save so a valid configuration is generated, then start again.
  2. Run CheckProxy::run($server, false) first and only call StartProxy when it returns true.
  3. Inspect the proxy config directory on the server (proxyPath()) and delete the empty file so regeneration writes a full default.

Example fix

// before
$configuration = GetProxyConfiguration::run($server);
if (! $configuration) {
    throw new \Exception('Configuration is not synced');
}

// after (regenerate deterministically before failing)
$configuration = GetProxyConfiguration::run($server, forceRegenerate: true);
if (! $configuration) {
    throw new \Exception('Configuration is not synced');
}
Defensive patterns

Strategy: validation

Validate before calling

if (! $server->isProxyShouldRun()) {
    return; // don't attempt StartProxy
}
// ensure a fresh configuration exists before starting
$config = GetProxyConfiguration::run($server, forceRegenerate: true);
if (empty($config)) {
    // regenerate failed; fix proxy settings instead of starting
    return;
}

Try / catch

try {
    StartProxy::run($server);
} catch (\Exception $e) {
    if ($e->getMessage() === 'Configuration is not synced') {
        GetProxyConfiguration::run($server, forceRegenerate: true);
        StartProxy::run($server); // one deliberate retry after regen
    } else {
        throw $e;
    }
}

Prevention

When it happens

Trigger: Starting/restarting coolify-proxy while the stored configuration is missing or regeneration produced an empty string (proxy type misconfigured as CUSTOM/NONE with a leftover start action); race where another process writes proxy settings mid-start; code paths returning '' instead of throwing.

Common situations: First proxy start on a freshly added server whose proxy was never initialized; after switching proxy types back and forth; corrupted proxy_path on the server (empty docker-compose.yaml); concurrent UI actions triggering StartProxy twice.

Related errors


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