{"record":{"id":"dd64f574ec7c16cc","repo":"coollabsio/coolify","slug":"failed-to-sync-registry-url-to-env-settings-were","errorCode":null,"errorMessage":"Failed to sync REGISTRY_URL to .env. Settings were not saved.","messagePattern":"Failed to sync REGISTRY_URL to \\.env\\. Settings were not saved\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Livewire/Settings/Updates.php","lineNumber":91,"sourceCode":"        }\n    }\n\n    protected function syncRegistryUrlToEnv(string $registryUrl): void\n    {\n        if (! $this->server) {\n            return;\n        }\n\n        try {\n            instant_remote_process([\n                $this->registryEnvSyncCommand($registryUrl),\n            ], $this->server);\n        } catch (\\Exception $e) {\n            Log::warning('Failed to sync REGISTRY_URL to .env', [\n                'error' => $e->getMessage(),\n            ]);\n\n            throw new \\RuntimeException('Failed to sync REGISTRY_URL to .env. Settings were not saved.', previous: $e);\n        }\n    }\n\n    private function registryEnvSyncCommand(string $registryUrl): string\n    {\n        $envFile = '/data/coolify/source/.env';\n        $sedExpression = escapeshellarg(\"s|^REGISTRY_URL=.*|REGISTRY_URL={$registryUrl}|\");\n        $registryLine = escapeshellarg(\"REGISTRY_URL={$registryUrl}\");\n\n        return \"if grep -q '^REGISTRY_URL=' {$envFile}; then sed -i {$sedExpression} {$envFile}; else printf '%s\\\\n' {$registryLine} >> {$envFile}; fi\";\n    }\n\n    public function submit()\n    {\n        try {\n            $this->authorize('update', $this->settings);\n            $this->resetErrorBag();\n            $this->validate();","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Livewire/Settings/Updates.php#L73-L109","documentation":"Error \"Failed to sync REGISTRY_URL to .env. Settings were not saved.\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Livewire/Settings/Updates.php:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}