coollabsio/coolify · error · RuntimeException

Failed to sync REGISTRY_URL to .env. Settings were not saved

Error message

Failed to sync REGISTRY_URL to .env. Settings were not saved.

What it means

Error "Failed to sync REGISTRY_URL to .env. Settings were not saved." thrown in coollabsio/coolify.

Source

Thrown at app/Livewire/Settings/Updates.php:91

        }
    }

    protected function syncRegistryUrlToEnv(string $registryUrl): void
    {
        if (! $this->server) {
            return;
        }

        try {
            instant_remote_process([
                $this->registryEnvSyncCommand($registryUrl),
            ], $this->server);
        } catch (\Exception $e) {
            Log::warning('Failed to sync REGISTRY_URL to .env', [
                'error' => $e->getMessage(),
            ]);

            throw new \RuntimeException('Failed to sync REGISTRY_URL to .env. Settings were not saved.', previous: $e);
        }
    }

    private function registryEnvSyncCommand(string $registryUrl): string
    {
        $envFile = '/data/coolify/source/.env';
        $sedExpression = escapeshellarg("s|^REGISTRY_URL=.*|REGISTRY_URL={$registryUrl}|");
        $registryLine = escapeshellarg("REGISTRY_URL={$registryUrl}");

        return "if grep -q '^REGISTRY_URL=' {$envFile}; then sed -i {$sedExpression} {$envFile}; else printf '%s\\n' {$registryLine} >> {$envFile}; fi";
    }

    public function submit()
    {
        try {
            $this->authorize('update', $this->settings);
            $this->resetErrorBag();
            $this->validate();

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Livewire/Settings/Updates.php:91 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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