Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Merge remote-tracking branch 'origin/next' into openid-auth-support

Andras Bacsai253e59e73143
diff --cc app/Livewire/Notifications/Email.php
index 089444f335,962c85c331..11280799e3
--- a/app/Livewire/Notifications/Email.php
+++ b/app/Livewire/Notifications/Email.php
@@@ -344,44 -327,6 +344,44 @@@ class Email extends Componen
}
}
+ private function validateSmtpSettings(): void
+ {
+ $this->validate([
+ 'smtpEnabled' => 'boolean',
+ 'smtpFromAddress' => 'required|email',
+ 'smtpFromName' => 'required|string',
+ 'smtpHost' => 'required|string',
+ 'smtpPort' => 'required|numeric',
+ 'smtpEncryption' => 'required|string|in:starttls,tls,none',
+ 'smtpUsername' => 'nullable|string',
+ 'smtpPassword' => 'nullable|string',
+ 'smtpTimeout' => 'nullable|numeric',
+ ], [
+ 'smtpFromAddress.required' => 'From Address is required.',
+ 'smtpFromAddress.email' => 'Please enter a valid email address.',
+ 'smtpFromName.required' => 'From Name is required.',
+ 'smtpHost.required' => 'SMTP Host is required.',
+ 'smtpPort.required' => 'SMTP Port is required.',
+ 'smtpPort.numeric' => 'SMTP Port must be a number.',
+ 'smtpEncryption.required' => 'Encryption type is required.',
+ ]);
+ }
+
+ private function validateResendSettings(): void
+ {
+ $this->validate([
+ 'resendEnabled' => 'boolean',
- 'resendApiKey' => 'required|string',
++ 'resendApiKey' => $this->resendEnabled ? 'required|string' : 'nullable|string',
+ 'smtpFromAddress' => 'required|email',
+ 'smtpFromName' => 'required|string',
+ ], [
+ 'resendApiKey.required' => 'Resend API Key is required.',
+ 'smtpFromAddress.required' => 'From Address is required.',
+ 'smtpFromAddress.email' => 'Please enter a valid email address.',
+ 'smtpFromName.required' => 'From Name is required.',
+ ]);
+ }
+
public function sendTestEmail()
{
try {
diff --cc app/Livewire/Profile/Index.php
index de7c268072,a20a1231b4..ae5d9b3ecd
--- a/app/Livewire/Profile/Index.php
+++ b/app/Livewire/Profile/Index.php
@@@ -32,10 -36,39 +32,43 @@@ class Index extends Componen
public bool $show_verification = false;
+ public bool $uses_sso = false;
+
+ public ?string $sso_provider_label = null;
+
+ public $avatar;
+
+ public function uploadAvatar(AvatarStorageService $avatarStorage): bool
+ {
+ try {
+ $this->validate([
+ 'avatar' => ['required', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120', 'dimensions:max_width=6000,max_height=6000'],
+ ]);
+
+ $avatarStorage->store(Auth::user(), $this->avatar);
+ $this->reset('avatar');
+ $this->dispatch('avatar-updated', url: route('profile.avatar', ['v' => Auth::user()->fresh()->updated_at->timestamp]));
+ $this->dispatch('success', 'Profile picture updated.');
+
+ return true;
+ } catch (\Throwable $e) {
+ handleError($e, $this);
+
+ return false;
+ }
+ }
+
+ public function removeAvatar(AvatarStorageService $avatarStorage): void
+ {
+ try {
+ $avatarStorage->delete(Auth::user());
+ $this->dispatch('avatar-updated', url: null);
+ $this->dispatch('success', 'Profile picture removed.');
+ } catch (\Throwable $e) {
+ handleError($e, $this);
+ }
+ }
+
public function mount()
{
$this->userId = Auth::id();
diff --cc app/Livewire/Server/LogDrains.php
index 58ca7b71bd,3af0a22610..ae53488bd5
--- a/app/Livewire/Server/LogDrains.php
+++ b/app/Livewire/Server/LogDrains.php
@@@ -177,50 -177,7 +177,50 @@@ class LogDrains extends Componen
}
}
+ public function toggleLogDrain(string $type): void
+ {
+ $previousNewRelicEnabled = $this->server->settings->is_logdrain_newrelic_enabled;
+ $previousAxiomEnabled = $this->server->settings->is_logdrain_axiom_enabled;
+ $previousCustomEnabled = $this->server->settings->is_logdrain_custom_enabled;
+
+ try {
+ $this->authorize('update', $this->server);
+ $this->resetErrorBag();
+
+ $enabledProperty = $this->enabledProperty($type);
+
+ if ($this->{$enabledProperty}) {
+ $this->{$enabledProperty} = false;
+ } else {
+ $this->validateLogDrainSettings($type);
+ $this->isLogDrainNewRelicEnabled = $type === 'newrelic';
+ $this->isLogDrainAxiomEnabled = $type === 'axiom';
+ $this->isLogDrainCustomEnabled = $type === 'custom';
+ }
+
+ $this->syncData(true);
+
+ if ($this->server->isLogDrainEnabled()) {
+ StartLogDrain::run($this->server);
+ $this->dispatch('success', 'Log drain service started.');
+ } else {
+ StopLogDrain::run($this->server);
+ $this->dispatch('success', 'Log drain service stopped.');
+ }
+ } catch (\Throwable $e) {
+ // Restore the previously persisted enabled flags so the UI/DB never
+ // claim a runtime state that the Start/StopLogDrain action failed to apply.
+ $this->server->settings->is_logdrain_newrelic_enabled = $previousNewRelicEnabled;
+ $this->server->settings->is_logdrain_axiom_enabled = $previousAxiomEnabled;
+ $this->server->settings->is_logdrain_custom_enabled = $previousCustomEnabled;
+ $this->server->settings->save();
+ $this->syncData();
+
+ handleError($e, $this);
+ }
+ }
+
- public function submit(string $type)
+ public function submit()
{
try {
$this->authorize('update', $this->server);
diff --cc app/Livewire/SettingsEmail.php
index 6a8e169d8b,121fe92a48..c6e9be3e4f
--- a/app/Livewire/SettingsEmail.php
+++ b/app/Livewire/SettingsEmail.php
@@@ -143,50 -143,16 +143,60 @@@ class SettingsEmail extends Componen
}
}
+ public function instantSaveSmtp(): void
+ {
+ $this->instantSave('SMTP');
+ }
+
+ public function instantSaveResend(): void
+ {
+ $this->instantSave('Resend');
+ }
+
+ public function toggleSmtp()
+ {
+ try {
+ $this->resetErrorBag();
+
+ if ($this->smtpEnabled) {
+ $this->smtpEnabled = false;
+ $this->syncData(true);
+ $this->dispatch('success', 'SMTP settings updated.');
+ } else {
+ $this->validateSmtpSettings();
+ $this->smtpEnabled = true;
+ $this->resendEnabled = false;
+ $this->submitSmtp();
+ }
+ } catch (\Throwable $e) {
+ $this->syncData();
+
+ return handleError($e, $this);
+ }
+ }
+
+ public function toggleResend()
+ {
+ try {
+ $this->resetErrorBag();
+
+ if ($this->resendEnabled) {
+ $this->resendEnabled = false;
+ $this->syncData(true);
+ $this->dispatch('success', 'Resend settings updated.');
+ } else {
+ $this->validateResendSettings();
+ $this->resendEnabled = true;
+ $this->smtpEnabled = false;
+ $this->submitResend();
+ }
+ } catch (\Throwable $e) {
+ $this->syncData();
+
+ return handleError($e, $this);
+ }
+ }
+
public function submitSmtp()
{
try {
@@@ -242,44 -228,6 +252,44 @@@
}
}
+ private function validateSmtpSettings(): void
+ {
+ $this->validate([
+ 'smtpEnabled' => 'boolean',
+ 'smtpFromAddress' => 'required|email',
+ 'smtpFromName' => 'required|string',
+ 'smtpHost' => 'required|string',
+ 'smtpPort' => 'required|numeric',
+ 'smtpEncryption' => 'required|string|in:starttls,tls,none',
+ 'smtpUsername' => 'nullable|string',
+ 'smtpPassword' => 'nullable|string',
+ 'smtpTimeout' => 'nullable|numeric',
+ ], [
+ 'smtpFromAddress.required' => 'From Address is required.',
+ 'smtpFromAddress.email' => 'Please enter a valid email address.',
+ 'smtpFromName.required' => 'From Name is required.',
+ 'smtpHost.required' => 'SMTP Host is required.',
+ 'smtpPort.required' => 'SMTP Port is required.',
+ 'smtpPort.numeric' => 'SMTP Port must be a number.',
+ 'smtpEncryption.required' => 'Encryption type is required.',
+ ]);
+ }
+
+ private function validateResendSettings(): void
+ {
+ $this->validate([
+ 'resendEnabled' => 'boolean',
- 'resendApiKey' => 'required|string',
++ 'resendApiKey' => $this->resendEnabled ? 'required|string' : 'nullable|string',
+ 'smtpFromAddress' => 'required|email',
+ 'smtpFromName' => 'required|string',
+ ], [
+ 'resendApiKey.required' => 'Resend API Key is required.',
+ 'smtpFromAddress.required' => 'From Address is required.',
+ 'smtpFromAddress.email' => 'Please enter a valid email address.',
+ 'smtpFromName.required' => 'From Name is required.',
+ ]);
+ }
+
public function sendTestEmail()
{
try {
diff --cc app/Providers/AppServiceProvider.php
index 876ea7d982,5856791662..e4d2b0a851
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@@ -13,8 -10,6 +13,7 @@@ use Illuminate\Support\Facades\Http
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Rules\Password;
use Laravel\Sanctum\Sanctum;
+use Laravel\Socialite\Contracts\Factory as SocialiteFactory;
- use Laravel\Telescope\TelescopeServiceProvider;
use Stripe\StripeClient;
class AppServiceProvider extends ServiceProvider
diff --cc composer.json
index 25f406d81f,871c6f010c..18e125510d
--- a/composer.json
+++ b/composer.json
@@@ -12,36 -12,35 +12,36 @@@
],
"require": {
"php": "^8.4",
- "danharrin/livewire-rate-limiting": "^2.1.0",
- "doctrine/dbal": "^4.4.1",
+ "danharrin/livewire-rate-limiting": "^2.2.1",
+ "doctrine/dbal": "^4.4.4",
+ "firebase/php-jwt": "7.1.0",
- "guzzlehttp/guzzle": "^7.10.0",
- "laravel/fortify": "^1.34.0",
- "laravel/framework": "^12.49.0",
- "laravel/horizon": "^5.43.0",
+ "guzzlehttp/guzzle": "^7.15.3",
+ "laravel/fortify": "^1.37.3",
+ "laravel/framework": "^12.65.0",
+ "laravel/horizon": "^5.48.2",
"laravel/mcp": "^0.6.7",
- "laravel/nightwatch": "^1.24",
- "laravel/pail": "^1.2.4",
- "laravel/prompts": "^0.3.11|^0.3.11|^0.3.11",
- "laravel/sanctum": "^4.3.0",
- "laravel/socialite": "^5.24.2",
- "laravel/tinker": "^2.11.0",
- "laravel/ui": "^4.6.1",
+ "laravel/nightwatch": "^1.28.6",
+ "laravel/pail": "^1.2.7",
+ "laravel/prompts": "^0.3.22|^0.3.22|^0.3.22",
+ "laravel/sanctum": "^4.3.3",
+ "laravel/socialite": "^5.29.0",
+ "laravel/tinker": "^2.11.1",
+ "laravel/ui": "^4.6.3",
"lcobucci/jwt": "^5.6.0",
- "league/flysystem-aws-s3-v3": "^3.31.0",
- "league/flysystem-sftp-v3": "^3.31",
- "livewire/livewire": "^3.7.8",
+ "league/flysystem-aws-s3-v3": "^3.35.2",
+ "league/flysystem-sftp-v3": "^3.33",
+ "livewire/livewire": "^3.8.3",
"log1x/laravel-webfonts": "^2.0.1",
- "lorisleiva/laravel-actions": "^2.9.1",
+ "lorisleiva/laravel-actions": "^2.10.2",
"nubs/random-name-generator": "^2.2",
- "phpseclib/phpseclib": "^3.0.49",
- "pion/laravel-chunk-upload": "^1.5.6",
- "poliander/cron": "^3.3.0",
+ "phpseclib/phpseclib": "^3.0.56",
+ "pion/laravel-chunk-upload": "^1.6.1",
+ "poliander/cron": "^3.3.1",
"purplepixie/phpdns": "^2.3.6",
- "pusher/pusher-php-server": "^7.2.7",
+ "pusher/pusher-php-server": "^7.3.0",
"resend/resend-laravel": "^0.20.0",
- "sentry/sentry-laravel": "^4.20.1",
- "socialiteproviders/authentik": "^5.2",
+ "sentry/sentry-laravel": "^4.27.0",
+ "socialiteproviders/authentik": "^5.3",
"socialiteproviders/clerk": "^5.1",
"socialiteproviders/discord": "^4.2",
"socialiteproviders/google": "^4.1",
diff --cc composer.lock
index 228800c228,c2c42ba71a..18c5260f32
--- a/composer.lock
+++ b/composer.lock
@@@ -4,7 -4,7 +4,7 @@@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "0cf904aa97d276a2eb2eefc9c7bbd0f7",
- "content-hash": "971daeb1b3078a36428c0fb56bb895b7",
++ "content-hash": "2d511da9e5e82eade5aa7e5094c888ae",
"packages": [
{
"name": "aws/aws-crt-php",
diff --cc resources/views/auth/login.blade.php
index d598341458,829a26cad3..b0b0dd4a3a
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@@ -1,102 -1,103 +1,103 @@@
<x-layout-simple>
- <section class="bg-gray-50 dark:bg-base">
- <div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
- <div class="w-full max-w-md space-y-8">
- <div class="text-center space-y-2">
- <h1 class="!text-5xl font-extrabold tracking-tight text-gray-900 dark:text-white">
- Coolify
- </h1>
- </div>
-
- <div class="space-y-6">
- @if (session('status'))
- <div class="mb-6 p-4 bg-success/10 border border-success rounded-lg">
- <p class="text-sm text-success">{{ session('status') }}</p>
- </div>
- @endif
-
- @if (session('error'))
- <div class="mb-6 p-4 bg-error/10 border border-error rounded-lg">
- <p class="text-sm text-error">{{ session('error') }}</p>
- </div>
- @endif
+ <x-auth.shell title="Coolify" description="Sign in to manage your applications and infrastructure.">
+ <div class="flex flex-col gap-4">
+ @if (session('status'))
+ <x-auth.alert type="success">{{ session('status') }}</x-auth.alert>
+ @endif
- @if ($errors->any())
- <div class="mb-6 p-4 bg-error/10 border border-error rounded-lg">
- @foreach ($errors->all() as $error)
- <p class="text-sm text-error">{{ $error }}</p>
- @endforeach
- </div>
- @endif
+ @if (session('error'))
+ <x-auth.alert type="error">{{ session('error') }}</x-auth.alert>
+ @endif
- <form action="/login" method="POST" class="flex flex-col gap-4">
- @csrf
- @env('local')
- <x-forms.input value="[email protected]" type="email" autocomplete="email" name="email" required
- label="{{ __('input.email') }}" />
- <x-forms.input value="password" type="password" autocomplete="current-password" name="password"
- required label="{{ __('input.password') }}" />
- @else
- <x-forms.input type="email" name="email" autocomplete="email" required
- label="{{ __('input.email') }}" />
- <x-forms.input type="password" name="password" autocomplete="current-password" required
- label="{{ __('input.password') }}" />
- @endenv
+ @if ($errors->any())
+ <x-auth.alert type="error">
+ <div class="flex flex-col gap-1">
+ @foreach ($errors->all() as $error)
+ <p>{{ $error }}</p>
+ @endforeach
+ </div>
+ </x-auth.alert>
+ @endif
- <div class="flex items-center justify-between">
- <a href="/forgot-password"
- class="text-sm dark:text-neutral-400 hover:text-coollabs dark:hover:text-warning hover:underline transition-colors">
- {{ __('auth.forgot_password_link') }}
- </a>
- </div>
+ <form action="/login" method="POST" class="flex flex-col gap-4">
+ @csrf
+ @env('local')
+ <x-forms.input value="[email protected]" type="email" autocomplete="email" name="email" required
+ autofocus label="{{ __('input.email') }}" />
+ <x-forms.input value="password" type="password" autocomplete="current-password" name="password"
+ required label="{{ __('input.password') }}" />
+ @else
+ <x-forms.input type="email" name="email" autocomplete="email" required autofocus
+ label="{{ __('input.email') }}" />
+ <x-forms.input type="password" name="password" autocomplete="current-password" required
+ label="{{ __('input.password') }}" />
+ @endenv
- <x-forms.button class="w-full justify-center py-3 box-boarding" type="submit" isHighlighted>
- {{ __('auth.login') }}
- </x-forms.button>
- </form>
-
- @if ($is_registration_enabled)
- <div class="relative my-6">
- <div class="absolute inset-0 flex items-center">
- <div class="w-full border-t border-neutral-300 dark:border-coolgray-400"></div>
- </div>
- <div class="relative flex justify-center text-sm">
- <span class="px-2 bg-gray-50 dark:bg-base text-neutral-500 dark:text-neutral-400 ">
- Don't have an account?
- </span>
- </div>
- </div>
- <a href="/register"
- class="block w-full text-center py-3 px-4 rounded-lg border border-neutral-300 dark:border-coolgray-400 font-medium hover:border-coollabs dark:hover:border-warning transition-colors">
- {{ __('auth.register_now') }}
+ <div class="flex justify-end">
+ @if (is_transactional_emails_enabled())
+ <a href="/forgot-password" class="auth-text-link">
+ {{ __('auth.forgot_password_link') }}
</a>
@else
- <div class="mt-6 text-center text-sm text-neutral-500 dark:text-neutral-400">
- {{ __('auth.registration_disabled') }}
- </div>
- @endif
-
- @if ($enabled_oauth_providers->isNotEmpty())
- <div class="relative my-6">
- <div class="absolute inset-0 flex items-center">
- <div class="w-full border-t border-neutral-300 dark:border-coolgray-400"></div>
- </div>
- <div class="relative flex justify-center text-sm">
- <span class="px-2 bg-gray-50 dark:bg-base text-neutral-500 dark:text-neutral-400">or
- continue with</span>
+ <span class="relative inline-flex"
+ x-data="{ visible: false, _t: null }"
+ @mouseenter="_t = setTimeout(() => {
+ visible = true;
+ $nextTick(() => requestAnimationFrame(() => {
+ const tip = $refs.tip;
+ if (!tip) return;
+ const r = $el.getBoundingClientRect();
+ const t = tip.getBoundingClientRect();
+ let top = r.top - t.height - 6;
+ let left = r.left;
+ if (top < 4) top = r.bottom + 6;
+ if (left + t.width > innerWidth - 8) left = innerWidth - 8 - t.width;
+ if (left < 4) left = 4;
+ tip.style.top = top + 'px';
+ tip.style.left = left + 'px';
+ }));
+ }, 300)"
+ @mouseleave="clearTimeout(_t); visible = false"
+ @focusin="visible = true"
+ @focusout="visible = false">
+ <span tabindex="0" role="link" aria-disabled="true"
+ class="auth-text-link cursor-not-allowed opacity-50"
+ aria-describedby="forgot-password-disabled-tooltip">
+ {{ __('auth.forgot_password_link') }}
+ </span>
+ <div id="forgot-password-disabled-tooltip" x-ref="tip" x-show="visible" x-cloak
+ class="auth-tooltip max-w-xs whitespace-normal">
+ {{ __('auth.forgot_password_disabled_tooltip') }}
</div>
- </div>
- <div class="flex flex-col gap-3">
- @foreach ($enabled_oauth_providers as $provider_setting)
- <x-forms.button class="w-full justify-center" type="button"
- onclick="document.location.href='/auth/{{ $provider_setting->provider }}/redirect'">
- {{ $provider_setting->loginLabel() }}
- </x-forms.button>
- @endforeach
- </div>
+ </span>
@endif
</div>
- </div>
+
+ <x-forms.button class="w-full justify-center" type="submit" isHighlighted>
+ {{ __('auth.login') }}
+ </x-forms.button>
+ </form>
+
+ @if ($enabled_oauth_providers->isNotEmpty())
+ <div class="auth-divider"><span>Or continue with</span></div>
+ <div class="grid gap-2 sm:grid-cols-2">
+ @foreach ($enabled_oauth_providers as $provider_setting)
+ <x-forms.button class="w-full justify-center" type="button"
+ onclick="document.location.href='/auth/{{ $provider_setting->provider }}/redirect'">
- {{ __("auth.login.$provider_setting->provider") }}
++ {{ $provider_setting->loginLabel() }}
+ </x-forms.button>
+ @endforeach
+ </div>
+ @endif
</div>
- </section>
- </x-layout-simple>
+
+ <x-slot:footer>
+ @if ($is_registration_enabled)
+ <span>New to Coolify?</span>
+ <a href="/register" class="auth-text-link">{{ __('auth.register_now') }}</a>
+ @else
+ <span>{{ __('auth.registration_disabled') }}</span>
+ @endif
+ </x-slot:footer>
+ </x-auth.shell>
+ </x-layout-simple>
diff --cc resources/views/components/settings/sidebar.blade.php
index 8308fbc443,0e0de551fd..dbe381e050
--- a/resources/views/components/settings/sidebar.blade.php
+++ b/resources/views/components/settings/sidebar.blade.php
@@@ -1,12 -1,39 +1,57 @@@
- <div class="sub-menu-wrapper">
- <a class="sub-menu-item {{ $activeMenu === 'general' ? 'menu-item-active' : '' }}" {{ wireNavigate() }}
- href="{{ route('settings.index') }}"><span class="menu-item-label">General</span></a>
- <a class="sub-menu-item {{ $activeMenu === 'advanced' ? 'menu-item-active' : '' }}" {{ wireNavigate() }}
- href="{{ route('settings.advanced') }}"><span class="menu-item-label">Advanced</span></a>
- <a class="sub-menu-item {{ $activeMenu === 'backup' ? 'menu-item-active' : '' }}" {{ wireNavigate() }}
- href="{{ route('settings.backup') }}"><span class="menu-item-label">Instance Backup</span></a>
- <a class="sub-menu-item {{ $activeMenu === 'email' ? 'menu-item-active' : '' }}" {{ wireNavigate() }}
- href="{{ route('settings.email') }}"><span class="menu-item-label">Transactional Email</span></a>
- <a class="sub-menu-item {{ $activeMenu === 'updates' ? 'menu-item-active' : '' }}" {{ wireNavigate() }}
- href="{{ route('settings.updates') }}"><span class="menu-item-label">Updates</span></a>
- </div>
+ @php
+ $settingsMenuItems = [
+ [
+ 'label' => 'General',
+ 'route' => 'settings.index',
+ 'active' => $activeMenu === 'general',
+ 'icon' => 'settings',
+ ],
+ [
+ 'label' => 'Advanced',
+ 'route' => 'settings.advanced',
+ 'active' => $activeMenu === 'advanced',
+ 'icon' => 'grid',
+ ],
++ [
++ 'label' => 'Authentication',
++ 'route' => 'settings.oauth',
++ 'active' => $activeMenu === 'oauth',
++ 'icon' => 'keys',
++ ],
++ [
++ 'label' => 'Transactional Email',
++ 'route' => 'settings.email',
++ 'active' => $activeMenu === 'email',
++ 'icon' => 'notifications',
++ ],
++ [
++ 'label' => 'Instance Backup',
++ 'route' => 'settings.backup',
++ 'active' => $activeMenu === 'backup',
++ 'icon' => 'database',
++ ],
+ [
+ 'label' => 'Updates',
+ 'route' => 'settings.updates',
+ 'active' => $activeMenu === 'updates',
+ 'icon' => 'refresh3',
+ ],
+ ];
+ @endphp
+
+ <aside class="application-settings-navigation min-w-0 xl:self-start">
+ <nav aria-label="Configuration sections"
+ class="grid grid-cols-2 gap-0.5 border-y border-neutral-200 py-3 sm:grid-cols-3 xl:grid-cols-1 xl:border-y-0 xl:py-0 dark:border-white/[0.06]">
+ <div class="nav-section hidden xl:block">Configuration</div>
+ @foreach ($settingsMenuItems as $menuItem)
+ <a @class([
+ 'menu-item',
+ 'menu-item-active' => $menuItem['active'],
+ ])
+ {{ wireNavigate() }} href="{{ route($menuItem['route']) }}">
+ <x-reicon :name="$menuItem['icon']" class="menu-item-icon" />
+ <span class="menu-item-label">{{ $menuItem['label'] }}</span>
+ </a>
+ @endforeach
+ </nav>
+ </aside>
diff --cc resources/views/livewire/profile/index.blade.php
index 3bad0bfe86,ef54d3e215..33f1b9a98e
--- a/resources/views/livewire/profile/index.blade.php
+++ b/resources/views/livewire/profile/index.blade.php
@@@ -1,166 -1,299 +1,307 @@@
- <div>
- <x-slot:title>
- Profile | Coolify
- </x-slot>
- <x-profile.navbar />
- <form wire:submit='submit' class="flex flex-col">
- <div class="flex items-center gap-2">
- <h2>General</h2>
- <x-forms.button type="submit" label="Save">Save</x-forms.button>
- </div>
- <div class="flex flex-col gap-2 lg:flex-row items-end">
- <x-forms.input id="name" label="Name" required />
- <x-forms.input id="email" label="Email" readonly />
- @if ($uses_sso)
- <x-forms.button type="button" disabled>Change Email</x-forms.button>
- @elseif (!$show_email_change && !$show_verification)
- <x-forms.button wire:click="showEmailChangeForm" type="button">Change Email</x-forms.button>
- @else
- <x-forms.button wire:click="showEmailChangeForm" type="button" disabled>Change Email</x-forms.button>
- @endif
- </div>
- @if ($uses_sso)
- <div class="pt-2 text-sm dark:text-white">
- Signed in with SSO
- @if ($sso_provider_label)
- <span class="text-helper">({{ $sso_provider_label }})</span>
- @endif
- <span class="text-helper">Email is managed by your SSO provider.</span>
- </div>
- @endif
- </form>
+ <div x-data="{
+ emailModalOpen: @js($show_verification),
+ openEmailModal() {
+ this.emailModalOpen = true;
+ this.$nextTick(() => this.$refs.newEmailInput?.focus());
+ },
+ }"
+ @close-email-change-modal.window="emailModalOpen = false">
+ <x-slot:title>Profile | Coolify</x-slot>
+ <div class="mt-8 flex w-full max-w-none flex-col gap-6 lg:mt-3">
+ <section class="application-settings-section" x-data="{
+ preview: null,
+ processing: false,
+ uploadError: null,
+ async prepareAvatar(event) {
+ const file = event.target.files?.[0];
+ if (!file) return;
+ this.processing = true;
+ this.uploadError = null;
- <div class="flex flex-col pt-4">
- @if (! $uses_sso && $show_email_change)
- <form wire:submit='requestEmailChange'>
- <div class="flex gap-2 items-end">
- <x-forms.input id="new_email" label="New Email Address" required type="email" />
- <x-forms.button type="submit">Send Verification Code</x-forms.button>
- <x-forms.button wire:click="$set('show_email_change', false)" type="button"
- isError>Cancel</x-forms.button>
+ try {
+ const dataUrl = await new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.onload = () => resolve(reader.result);
+ reader.onerror = reject;
+ reader.readAsDataURL(file);
+ });
+ const image = await new Promise((resolve, reject) => {
+ const element = new Image();
+ element.onload = () => resolve(element);
+ element.onerror = reject;
+ element.src = dataUrl;
+ });
+ const cropSize = Math.min(image.naturalWidth, image.naturalHeight);
+ const canvas = document.createElement('canvas');
+ canvas.width = 256;
+ canvas.height = 256;
+ const context = canvas.getContext('2d');
+ context.fillStyle = '#ffffff';
+ context.fillRect(0, 0, 256, 256);
+ context.drawImage(
+ image,
+ (image.naturalWidth - cropSize) / 2,
+ (image.naturalHeight - cropSize) / 2,
+ cropSize,
+ cropSize,
+ 0,
+ 0,
+ 256,
+ 256,
+ );
+ const blob = await new Promise((resolve, reject) => {
+ canvas.toBlob(value => value ? resolve(value) : reject(new Error('JPEG compression failed')), 'image/jpeg', 0.8);
+ });
+ const previewUrl = URL.createObjectURL(blob);
+ const compressed = new File([blob], 'avatar.jpg', { type: 'image/jpeg' });
+ this.$wire.upload('avatar', compressed, async () => {
+ try {
+ const uploaded = await this.$wire.uploadAvatar();
+ if (uploaded) {
+ if (this.preview) URL.revokeObjectURL(this.preview);
+ this.preview = previewUrl;
+ } else {
+ URL.revokeObjectURL(previewUrl);
+ }
+ } catch (error) {
+ URL.revokeObjectURL(previewUrl);
+ this.uploadError = 'The image could not be uploaded.';
+ } finally {
+ this.processing = false;
+ }
+ }, () => {
+ URL.revokeObjectURL(previewUrl);
+ this.processing = false;
+ this.uploadError = 'The image could not be uploaded.';
+ });
+ } catch (error) {
+ this.processing = false;
+ this.uploadError = 'The image could not be processed in this browser.';
+ }
+ },
+ }">
+ <div class="application-settings-section-header">
+ <div>
+ <h2>Profile picture</h2>
+ <p>Upload a JPG, PNG, or WebP image.</p>
</div>
- <div class="text-xs font-bold dark:text-warning pt-2">A verification code will be sent to your
- new email
- address.</div>
- </form>
- @endif
+ </div>
+ <div class="application-settings-section-body flex flex-col gap-4 sm:flex-row sm:items-center">
+ <div class="flex size-20 shrink-0 items-center justify-center overflow-hidden rounded-full bg-neutral-200 text-2xl font-semibold text-neutral-700 dark:bg-white/[0.1] dark:text-fg">
+ <img x-cloak x-show="preview" :src="preview" alt="Profile picture preview"
+ class="h-full w-full object-cover">
+ @if (auth()->user()->avatar_path)
+ <img src="{{ route('profile.avatar', ['v' => auth()->user()->updated_at->timestamp]) }}"
+ x-show="!preview" alt="{{ auth()->user()->name }}" class="h-full w-full object-cover">
+ @else
+ <span x-show="!preview">
+ {{ strtoupper(mb_substr(auth()->user()->name ?: auth()->user()->email, 0, 1)) }}
+ </span>
+ @endif
+ </div>
+ <div class="flex min-w-0 flex-1 flex-col gap-3">
+ <div class="flex flex-wrap items-center gap-2">
+ <input x-ref="avatarInput" type="file" x-on:change="prepareAvatar($event)"
+ accept="image/jpeg,image/png,image/webp" class="hidden">
+ <x-forms.button type="button" x-on:click="$refs.avatarInput.click()"
+ x-bind:disabled="processing">
+ <span x-text="processing ? 'Uploading…' : 'Browse…'"></span>
+ </x-forms.button>
+ @if (auth()->user()->avatar_path)
+ <x-forms.button type="button" wire:click="removeAvatar" x-bind:disabled="processing"
+ isError>Remove</x-forms.button>
+ @endif
+ </div>
+ <p x-cloak x-show="uploadError" x-text="uploadError" class="text-xs text-red-500"></p>
+ @error('avatar')
+ <p class="text-xs text-red-500">{{ $message }}</p>
+ @enderror
+ </div>
+ </div>
+ </section>
- @if (! $uses_sso && $show_verification)
- <form wire:submit='verifyEmailChange'>
- <div class="flex gap-2 items-end">
- <x-forms.input id="email_verification_code" label="Verification Code (6 digits)" required
- maxlength="6" />
- <x-forms.button type="submit">Verify & Update Email</x-forms.button>
- <x-forms.button wire:click="resendVerificationCode" type="button" isWarning>Resend
- Code</x-forms.button>
- <x-forms.button wire:click="cancelEmailChange" type="button" isError>Cancel</x-forms.button>
+ <form wire:submit="submit">
+ <x-unsaved-bar action="submit" />
+ <section class="application-settings-section">
+ <div class="application-settings-section-header">
+ <div>
+ <h2>Profile details</h2>
+ <p>Your display name and verified sign-in address.</p>
+ </div>
</div>
- <div class="text-xs font-bold dark:text-warning pt-2">
- Verification code sent to {{ $new_email ?? auth()->user()->pending_email }}.
- The code is valid for {{ config('constants.email_change.verification_code_expiry_minutes', 10) }}
- minutes.
+ <div class="application-settings-section-body grid gap-4 sm:grid-cols-2">
+ <x-forms.input id="name" label="Name" required />
+ <div class="flex items-end gap-2">
+ <x-forms.input id="email" label="Email" readonly />
+ <x-forms.button @click="openEmailModal()" type="button"
- x-bind:disabled="emailModalOpen">
++ :disabled="$uses_sso" x-bind:disabled="emailModalOpen || @js($uses_sso)">
+ Change
+ </x-forms.button>
+ </div>
</div>
- </section>
- </form>
++ </section>
++ </form>
+
++ @if ($uses_sso)
++ <x-callout type="info" title="Email managed by SSO">
++ Signed in with SSO @if ($sso_provider_label) ({{ $sso_provider_label }}) @endif. Email is managed by your SSO provider.
++ </x-callout>
++ @endif
- </form>
- @endif
- </div>
- <form wire:submit='resetPassword' class="flex flex-col pt-4">
- <div class="flex items-center gap-2 pb-2">
- <h2>Change Password</h2>
- <x-forms.button type="submit" label="Save">Save</x-forms.button>
- </div>
- <div class="text-xs font-bold dark:text-warning pb-2">Resetting the password will logout all sessions.</div>
- <div class="flex flex-col gap-2">
- <x-forms.input id="current_password" label="Current Password" required type="password" />
- <div class="flex gap-2">
- <x-forms.input id="new_password" label="New Password" required type="password" />
- <x-forms.input id="new_password_confirmation" label="New Password Again" required type="password" />
- </div>
- </div>
- </form>
- <h2 class="py-4">Two-factor Authentication</h2>
- @if (session('status') == 'two-factor-authentication-enabled')
- <div class="mb-4 font-medium">
- Please finish configuring two factor authentication below. Read the QR code or enter the secret key
- manually.
- </div>
- <div class="flex flex-col gap-4">
- <form action="/user/confirmed-two-factor-authentication" method="POST" class="flex items-end gap-2">
- @csrf
- <x-forms.input type="text" inputmode="numeric" pattern="[0-9]*" id="code"
- label="One time (OTP) code" required />
- <x-forms.button type="submit">Validate 2FA</x-forms.button>
- </form>
- <div class="flex flex-col items-start">
- <div
- class="flex items-center justify-center w-80 h-80 bg-white p-4 border-4 border-gray-300 rounded-lg shadow-lg">
- {!! request()->user()->twoFactorQrCodeSvg() !!}
- <template x-teleport="body">
++ @if (! $uses_sso)
++ <template x-teleport="body">
+ <div x-show="emailModalOpen" x-cloak
+ class="fixed inset-0 z-99 flex h-screen w-screen items-center justify-center p-4">
+ <div class="absolute inset-0 h-full w-full bg-black/55 backdrop-blur-[3px]"></div>
+ <div x-show="emailModalOpen" x-trap.inert.noscroll="emailModalOpen"
+ class="application-settings-form application-settings-section relative w-full max-w-xl overflow-hidden"
+ style="box-shadow: 0 0 0 1px var(--coollabs-hairline), var(--shadow-modal)">
+ <header>
+ <div>
+ <h3>{{ $show_verification ? 'Verify new email' : 'Change email' }}</h3>
+ <p class="mt-1 text-xs text-neutral-500 dark:text-fg-dim">
+ @if ($show_verification)
+ Code sent to {{ $new_email ?: auth()->user()->pending_email }}.
+ @else
+ A six-digit verification code will be sent to the new address.
+ @endif
+ </p>
+ </div>
+ <button type="button"
+ @click="@if ($show_verification) $wire.cancelEmailChange().then(() => emailModalOpen = false) @else emailModalOpen = false @endif"
+ class="icon-button shrink-0" aria-label="Close">
+ <x-reicon name="x" class="size-4" />
+ </button>
+ </header>
+
+ @if ($show_verification)
+ <form wire:submit="verifyEmailChange" class="application-settings-section-body space-y-4">
+ <x-forms.input id="email_verification_code" label="Verification code" required
+ inputmode="numeric" maxlength="6" />
+ <p class="text-xs text-neutral-500 dark:text-fg-dim">
+ The code expires after
+ {{ config('constants.email_change.verification_code_expiry_minutes', 10) }} minutes.
+ </p>
+ <div class="flex justify-end gap-2">
+ <x-forms.button wire:click="resendVerificationCode" type="button">Resend code</x-forms.button>
+ <x-forms.button type="submit" isHighlighted>Verify email</x-forms.button>
+ </div>
+ </form>
+ @else
+ <form wire:submit="requestEmailChange" class="application-settings-section-body space-y-4">
+ <x-forms.input id="new_email" label="New email address" required type="email"
+ x-ref="newEmailInput" />
+ <div class="flex justify-end">
+ <x-forms.button type="submit" isHighlighted>Send code</x-forms.button>
+ </div>
+ </form>
+ @endif
</div>
- <div x-data="{
- showCode: false,
- }" class="py-4 w-full">
- <div class="flex flex-col gap-2 pb-2" x-show="showCode">
- <x-forms.copy-button text="{{ decrypt(request()->user()->two_factor_secret) }}" />
- <x-forms.copy-button text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
+ </div>
- </template>
++ </template>
++ @endif
+
+ <form wire:submit="resetPassword">
+ <section class="application-settings-section">
+ <div class="application-settings-section-header">
+ <div>
+ <h2>Password</h2>
+ <p>Changing your password signs out every active session.</p>
</div>
- <x-forms.button x-on:click="showCode = !showCode" class="mt-2">
- <span x-text="showCode ? 'Hide Secret Key and OTP URL' : 'Show Secret Key and OTP URL'"></span>
- </x-forms.button>
+ <x-forms.button type="submit">Change password</x-forms.button>
</div>
- </div>
- </div>
- @elseif(session('status') == 'two-factor-authentication-confirmed')
- <div class="mb-4 ">
- Two factor authentication confirmed and enabled successfully.
- </div>
- <div>
- <div class="pb-6 ">Here are the recovery codes for your account. Please store them in a secure
- location.
- </div>
- <div class="dark:text-white">
- @foreach (request()->user()->recoveryCodes() as $code)
- <div>{{ $code }}</div>
- @endforeach
- </div>
- </div>
- @else
- @if (request()->user()->two_factor_confirmed_at)
- <div class="pb-4 "> Two factor authentication is <span class="text-helper">enabled</span>.</div>
- <div class="flex gap-2">
- <form action="/user/two-factor-authentication" method="POST">
- @csrf
- @method ('DELETE')
- <x-forms.button type="submit">Disable</x-forms.button>
- </form>
- <form action="/user/two-factor-recovery-codes" method="POST">
- @csrf
- <x-forms.button type="submit">Regenerate Recovery Codes</x-forms.button>
- </form>
- </div>
- @if (session('status') == 'recovery-codes-generated')
+ <div class="application-settings-section-body grid gap-4 sm:grid-cols-2">
+ <x-forms.input class="sm:col-span-2" id="current_password" label="Current password"
+ required type="password" />
+ <x-forms.input id="new_password" label="New password" required type="password" />
+ <x-forms.input id="new_password_confirmation" label="Confirm new password" required
+ type="password" />
+ </div>
+ </section>
+ </form>
+
+ <section class="application-settings-section">
+ <div class="application-settings-section-header">
<div>
- <div class="py-6 ">Here are the recovery codes for your account. Please store them in a
- secure
- location.
+ <h2>Two-factor authentication</h2>
+ <p>Add a time-based one-time password to protect your account.</p>
+ </div>
+ @if (! request()->user()->two_factor_confirmed_at
+ && session('status') !== 'two-factor-authentication-enabled')
+ <form action="/user/two-factor-authentication" method="POST">
+ @csrf
+ <x-forms.button type="submit">Configure 2FA</x-forms.button>
+ </form>
+ @endif
+ </div>
+ <div class="application-settings-section-body">
+ @if (session('status') === 'two-factor-authentication-enabled')
+ <div class="grid gap-6 lg:grid-cols-[320px_minmax(0,1fr)]">
+ <div
+ class="flex aspect-square items-center justify-center rounded-[10px] border border-neutral-200 bg-white p-5 dark:border-white/[0.07]">
+ {!! request()->user()->twoFactorQrCodeSvg() !!}
+ </div>
+ <div class="space-y-4">
+ <div>
+ <h3 class="text-sm font-semibold text-black dark:text-fg">Finish setup</h3>
+ <p class="mt-1 text-sm text-neutral-500 dark:text-fg-dim">
+ Scan the QR code, then enter the current code from your authenticator.
+ </p>
+ </div>
+ <form action="/user/confirmed-two-factor-authentication" method="POST"
+ class="flex items-end gap-2">
+ @csrf
+ <x-forms.input type="text" inputmode="numeric" pattern="[0-9]*" id="code"
+ label="One-time code" required />
+ <x-forms.button type="submit">Validate 2FA</x-forms.button>
+ </form>
+ <div x-data="{ showCode: false }">
+ <div x-cloak x-show="showCode" class="space-y-2 pb-3">
+ <x-forms.copy-button
+ text="{{ decrypt(request()->user()->two_factor_secret) }}" />
+ <x-forms.copy-button text="{{ request()->user()->twoFactorQrCodeUrl() }}" />
+ </div>
+ <x-forms.button type="button" x-on:click="showCode = !showCode">
+ <span x-text="showCode ? 'Hide manual setup' : 'Show manual setup'"></span>
+ </x-forms.button>
+ </div>
+ </div>
</div>
- <div class="dark:text-white">
- @foreach (request()->user()->recoveryCodes() as $code)
- <div>{{ $code }}</div>
- @endforeach
+ @elseif (request()->user()->two_factor_confirmed_at)
+ <div class="flex flex-col gap-4">
+ <div class="flex flex-wrap items-center justify-end gap-2">
+ <form action="/user/two-factor-recovery-codes" method="POST">
+ @csrf
+ <x-forms.button type="submit">Regenerate recovery codes</x-forms.button>
+ </form>
+ <form action="/user/two-factor-authentication" method="POST">
+ @csrf
+ @method('DELETE')
+ <x-forms.button type="submit" isError>Disable 2FA</x-forms.button>
+ </form>
+ </div>
+ @if (session('status') === 'two-factor-authentication-confirmed'
+ || session('status') === 'recovery-codes-generated')
+ <div
+ class="grid gap-2 rounded-lg border border-neutral-200 bg-neutral-50 p-4 font-mono text-xs text-neutral-700 sm:grid-cols-2 dark:border-white/[0.07] dark:bg-white/[0.025] dark:text-fg-dim">
+ @foreach (request()->user()->recoveryCodes() as $code)
+ <div>{{ $code }}</div>
+ @endforeach
+ </div>
+ @endif
</div>
- </div>
- @endif
- @else
- <form action="/user/two-factor-authentication" method="POST">
- @csrf
- <x-forms.button type="submit">Configure</x-forms.button>
- </form>
+ @else
+ <x-empty size="sm" title="Two-factor authentication is off"
+ description="Configure an authenticator app to add another sign-in check."
+ icon-name="keys" />
+ @endif
+ </div>
+ </section>
+
+ @if (session()->has('errors'))
+ <x-callout type="danger" title="Profile update failed">
+ Something went wrong. Please review the fields and try again.
+ </x-callout>
@endif
- @endif
- @if (session()->has('errors'))
- <div class="text-error">
- Something went wrong. Please try again.
- </div>
- @endif
+ </div>
</div>
diff --cc resources/views/livewire/settings/advanced.blade.php
index 113f12f4a4,d15a1b87ab..d05ac5ac98
--- a/resources/views/livewire/settings/advanced.blade.php
+++ b/resources/views/livewire/settings/advanced.blade.php
@@@ -1,144 -1,152 +1,159 @@@
<div>
<x-slot:title>
Advanced Settings | Coolify
- </x-slot>
- <x-settings.navbar />
- <div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }"
- class="flex flex-col h-full gap-8 sm:flex-row">
- <x-settings.sidebar activeMenu="advanced" />
- <form wire:submit='submit' class="flex flex-col w-full">
- <div class="flex items-center gap-2">
- <h2>Advanced</h2>
- <x-forms.button type="submit">
- Save
- </x-forms.button>
+ </x-slot>
+
+ <x-settings.layout>
+ <form wire:submit="submit" class="application-settings-form flex min-w-0 flex-col gap-6">
+ {{-- Scope dirty tracking to fields that need an explicit Save. Instant-save
+ listboxes (API, MCP, telemetry, …) update the snapshot on the server
+ immediately; without wire:target they briefly flash this bar. --}}
+ <x-unsaved-bar action="submit"
+ targets="custom_dns_servers,allowed_ips,webhook_allowed_internal_hosts,webhook_allow_localhost,domain_connect_private_key" />
+
+ <x-application.settings-section id="access-section" title="Access">
+ <div class="grid gap-4 lg:grid-cols-2">
- <x-forms.listbox id="is_registration_enabled" label="Registration"
++ <x-forms.listbox id="is_registration_enabled" label="Registration"
+ helper="Allow users to create their own account. When disabled, only administrators can create accounts."
+ onChange="instantSave" :options="[
+ ['value' => true, 'label' => 'Anyone can register'],
+ ['value' => false, 'label' => 'Registration disabled'],
- ]" />
++ ]" />
++ <x-forms.listbox canGate="update" :canResource="$settings"
++ id="disable_registration_when_oauth_enabled" label="Password registration with OAuth"
++ helper="Hide password registration whenever at least one OAuth provider is enabled."
++ onChange="instantSave" :options="[
++ ['value' => false, 'label' => 'Allow password registration'],
++ ['value' => true, 'label' => 'Disable when OAuth is enabled'],
++ ]" />
+ <x-forms.listbox id="disable_two_step_confirmation" label="Destructive action confirmation"
+ helper="Choose whether destructive actions require password and text confirmation."
+ onChange="instantSave" :options="[
+ ['value' => false, 'label' => 'Require two-step confirmation'],
+ ['value' => true, 'label' => 'Skip two-step confirmation'],
+ ]" />
</div>
- <div class="pb-4">Advanced settings for your Coolify instance.</div>
+ </x-application.settings-section>
- <div class="flex flex-col gap-1">
- @if ($is_registration_enabled)
- <div class="md:w-96" wire:key="registration-enabled">
- <x-forms.checkbox instantSave id="is_registration_enabled"
- helper="Allow users to self-register. If disabled, only administrators can create accounts."
- label="Registration Allowed" />
- </div>
- @else
- <div class="flex items-center justify-between gap-2 md:w-96"
- wire:key="registration-disabled">
- <label class="flex items-center gap-2">
- Registration Allowed
- <x-helper
- helper="Allow users to self-register. If disabled, only administrators can create accounts.">
- </x-helper>
- </label>
- <x-modal-confirmation title="Enable Registration?" buttonTitle="Enable" isErrorButton
- submitAction="toggleRegistration" :actions="[
- 'Enables registration for everyone',
- ]"
- warningMessage="Enabling registration allows anyone to create an account on this instance. Make sure you understand the implications before proceeding."
- confirmationText="ENABLE REGISTRATION"
- confirmationLabel="Please type the confirmation text to enable registration."
- shortConfirmationLabel="Confirmation text" />
- </div>
- @endif
- <div class="md:w-96">
- <x-forms.checkbox instantSave canGate="update" :canResource="$settings"
- id="disable_registration_when_oauth_enabled"
- helper="When enabled, the normal registration page is hidden if at least one OAuth provider is enabled. OAuth providers can still create users if their provider-specific registration option allows it."
- label="Disable Registration When OAuth Is Enabled" />
- </div>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="do_not_track"
- helper="Opt out of anonymous usage tracking. When enabled, this instance will not report to coolify.io's installation count and will not send error reports to help improve Coolify."
- label="Do Not Track" />
- </div>
- <h4 class="pt-4">DNS Settings</h4>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="is_dns_validation_enabled"
- helper="Verify that custom domains are correctly configured in DNS before deployment. Prevents deployment failures from DNS misconfigurations."
- label="DNS Validation" />
+ <x-application.settings-section id="dns-section" title="DNS validation">
+ <div class="grid gap-4 lg:grid-cols-2">
+ <x-forms.listbox id="is_dns_validation_enabled" label="DNS validation"
+ helper="Validate custom domains before deployment." onChange="instantSave" :options="[
+ ['value' => true, 'label' => 'Enabled'],
+ ['value' => false, 'label' => 'Disabled'],
+ ]" />
+ <x-forms.input id="custom_dns_servers" label="Custom DNS servers"
+ helper="Comma-separated resolvers. Leave empty to use system defaults."
+ placeholder="1.1.1.1, 8.8.8.8" />
+ </div>
+ </x-application.settings-section>
+
+ @if (isCloud())
+ <x-application.settings-section id="domain-connect-section" title="Domain Connect"
+ helper="Optional RSA private key used to sign Cloudflare Domain Connect apply URLs on Coolify Cloud. Leave blank to keep the existing key.">
+ <div class="grid gap-4">
+ <x-forms.input id="domain_connect_private_key" type="password" allowToPeak
+ label="Domain Connect private key (PEM)"
+ helper="Paste a PEM private key to set or rotate. Public key must be published at domainconnect.coolify.io. Env DOMAIN_CONNECT_PRIVATE_KEY is used as a fallback when this is empty."
+ placeholder="-----BEGIN PRIVATE KEY-----" />
+ @if (filled(data_get($settings, 'domain_connect_private_key')))
+ <div class="flex flex-wrap items-center gap-2">
+ <x-status-badge status="Key configured" type="success" />
+ <x-forms.button type="button" wire:click="clearDomainConnectPrivateKey" isError>
+ Remove key
+ </x-forms.button>
+ </div>
+ @elseif (filled(config('services.domain_connect.private_key')))
+ <x-status-badge status="Using DOMAIN_CONNECT_PRIVATE_KEY from environment" type="neutral" />
+ @else
+ <x-callout type="info" title="Not configured">
+ Automated Cloudflare DNS (Domain Connect) stays hidden until a private key is set.
+ </x-callout>
+ @endif
</div>
+ </x-application.settings-section>
+ @endif
- <x-forms.input id="custom_dns_servers" label="Custom DNS Servers"
- helper="Custom DNS servers for domain validation. Comma-separated list (e.g., 1.1.1.1,8.8.8.8). Leave empty to use system defaults."
- placeholder="1.1.1.1,8.8.8.8" />
- <h4 class="pt-4">API Settings</h4>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="is_api_enabled" label="API Access"
- helper="If enabled, authenticated requests to Coolify's REST API will be allowed. Configure API tokens in Security > API Tokens." />
+ <x-application.settings-section id="api-section" title="API and MCP">
+ <div class="grid gap-4 lg:grid-cols-2">
+ <x-forms.listbox id="is_api_enabled" label="API access"
+ helper="Allow authenticated requests to the Coolify REST API." onChange="instantSave"
+ :options="[
+ ['value' => true, 'label' => 'Enabled'],
+ ['value' => false, 'label' => 'Disabled'],
+ ]" />
+ <x-forms.listbox id="is_mcp_server_enabled" label="MCP server"
+ helper="Expose the authenticated Streamable HTTP endpoint at /mcp." onChange="instantSave"
+ :options="[
+ ['value' => true, 'label' => 'Enabled'],
+ ['value' => false, 'label' => 'Disabled'],
+ ]" />
+ <div class="lg:col-span-2">
+ <x-forms.input id="allowed_ips" label="Allowed API IPs"
+ helper="Comma-separated IPs or CIDR ranges. Empty or 0.0.0.0 allows all sources."
+ placeholder="192.168.1.100, 10.0.0.0/8" />
</div>
- <x-forms.input id="allowed_ips" label="Allowed IPs for API Access"
- helper="Allowed IP addresses or subnets for API access.<br>Supports single IPs (192.168.1.100) and CIDR notation (192.168.1.0/24).<br>Use comma to separate multiple entries.<br>Use 0.0.0.0 or leave empty to allow from anywhere."
- placeholder="192.168.1.100,10.0.0.0/8,203.0.113.0/24" />
- @if (empty($allowed_ips) || in_array('0.0.0.0', array_map('trim', explode(',', $allowed_ips ?? ''))))
- <x-callout type="warning" title="Warning" class="mt-2">
- Using 0.0.0.0 (or empty) allows API access from anywhere. This is not recommended for production
- environments!
- </x-callout>
- @endif
- <h4 class="pt-4">Webhook/S3 Endpoint Controls</h4>
+ </div>
+ @if ($is_api_enabled && (empty($allowed_ips) || in_array('0.0.0.0', array_map('trim', explode(',', $allowed_ips ?? '')))))
+ <x-callout type="warning" title="API access is open to every source" class="mt-4">
+ Restrict the allowlist before using API access on a public production instance.
+ </x-callout>
+ @endif
+ @if ($is_mcp_server_enabled)
+ <x-callout type="info" title="MCP endpoint" class="mt-4">
+ <code>{{ url('/mcp') }}</code> uses Sanctum bearer tokens from Security → API Tokens.
+ </x-callout>
+ @endif
+ </x-application.settings-section>
+
+ <x-application.settings-section id="endpoint-section" title="Outbound endpoints">
+ <div class="flex flex-col gap-4">
<x-forms.textarea id="webhook_allowed_internal_hosts" rows="4"
- label="Allowed Internal Webhook/S3 Targets"
- helper="Optional instance-level allowlist for webhook and S3 endpoint destinations. Supports exact hostnames, IPs, and CIDR ranges separated by commas or new lines."
- placeholder="hooks.company.local, 10.50.0.0/16, 192.168.10.20" />
- <div class="md:w-96">
- <x-forms.checkbox id="webhook_allow_localhost" label="Allow Localhost Webhook/S3 Targets"
- helper="Allows localhost/loopback targets only when they are also listed above. Use only for local development or trusted single-instance setups." />
- </div>
- <h4 class="pt-4">MCP Server</h4>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="is_mcp_server_enabled" label="Enable MCP Server Instance-wide"
- helper="Exposes a Streamable HTTP Model Context Protocol endpoint at /mcp for AI clients (Claude Desktop, Cursor, etc.). Authenticates via Sanctum API tokens (Security > API Tokens). Requires API Access to be enabled." />
- </div>
- @if ($is_mcp_server_enabled)
- <x-callout type="info" title="MCP Endpoint" class="mt-2">
- Endpoint: <code>{{ url('/mcp') }}</code><br>
- Authenticate with <code>Authorization: Bearer &lt;token&gt;</code> using a token created in Security &raquo; API Tokens.
- </x-callout>
- @endif
- <h4 class="pt-4">UI Settings</h4>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="is_wire_navigate_enabled" label="SPA Navigation"
- helper="Enable single-page application (SPA) style navigation with prefetching on hover. When enabled, page transitions are smoother without full page reloads and pages are prefetched when hovering over links. Disable if you experience navigation issues." />
- </div>
- <h4 class="pt-4">Confirmation Settings</h4>
- <div class="md:w-96">
- <x-forms.checkbox instantSave id="is_sponsorship_popup_enabled" label="Show Sponsorship Popup"
- helper="Show monthly sponsorship reminders to support Coolify development. Disable to hide these messages permanently." />
+ label="Allowed internal targets"
+ helper="Hostnames, IPs, or CIDR ranges separated by commas or new lines."
+ placeholder="hooks.company.local, 10.50.0.0/16" />
+ <div class="max-w-md">
+ <x-forms.listbox id="webhook_allow_localhost" label="Localhost targets"
+ helper="Loopback targets must also be present in the allowlist." :options="[
+ ['value' => true, 'label' => 'Allowed'],
+ ['value' => false, 'label' => 'Blocked'],
+ ]" />
</div>
</div>
- <div class="flex flex-col gap-1">
- @if ($disable_two_step_confirmation)
- <div class="pb-4 md:w-96" wire:key="two-step-confirmation-enabled">
- <x-forms.checkbox instantSave id="disable_two_step_confirmation"
- label="Disable Two Step Confirmation"
- helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers." />
- </div>
- @else
- <div class="pb-4 flex items-center justify-between gap-2 md:w-96"
- wire:key="two-step-confirmation-disabled">
- <label class="flex items-center gap-2">
- Disable Two Step Confirmation
- <x-helper
- helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers.">
- </x-helper>
- </label>
- <x-modal-confirmation title="Disable Two Step Confirmation?" buttonTitle="Disable" isErrorButton
- submitAction="toggleTwoStepConfirmation" :actions="[
- 'Two Step confirmation will be disabled globally.',
- 'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
- 'The risk of accidental actions will increase.',
- ]"
- confirmationText="DISABLE TWO STEP CONFIRMATION"
- confirmationLabel="Please type the confirmation text to disable two step confirmation."
- shortConfirmationLabel="Confirmation text" />
- </div>
- <x-callout type="danger" title="Warning!" class="mb-4">
- Disabling two step confirmation reduces security (as anyone can easily delete anything) and
- increases the risk of accidental actions. This is not recommended for production servers.
- </x-callout>
- @endif
+ </x-application.settings-section>
+
+ <x-application.settings-section id="interface-section" title="Interface and telemetry">
+ <div class="grid gap-4 lg:grid-cols-2">
+ <x-forms.listbox id="is_wire_navigate_enabled" label="Navigation"
+ helper="Prefetch pages and navigate without full reloads." onChange="instantSave" :options="[
+ ['value' => true, 'label' => 'SPA navigation'],
+ ['value' => false, 'label' => 'Full page navigation'],
+ ]" />
+ <x-forms.listbox id="do_not_track" label="Anonymous telemetry"
+ helper="Control installation counting and error reports." onChange="instantSave" :options="[
+ ['value' => false, 'label' => 'Enabled'],
+ ['value' => true, 'label' => 'Disabled'],
+ ]" />
+ <x-forms.listbox id="is_sponsorship_popup_enabled" label="Sponsorship reminders"
+ helper="Show the monthly project sponsorship reminder." onChange="instantSave" :options="[
+ ['value' => true, 'label' => 'Enabled'],
+ ['value' => false, 'label' => 'Disabled'],
+ ]" />
+ </div>
+ </x-application.settings-section>
+
+ <x-application.settings-section id="avatar-storage-section" title="Image storage"
+ helper="Choose where compressed profile pictures and project icons are stored. Use S3 for multi-instance or cloud deployments so every application replica can access the same files.">
+ <div class="max-w-md">
+ <x-forms.listbox id="avatar_storage" label="Storage destination" onChange="instantSave"
+ :options="$avatar_storage_options" />
</div>
- </form>
- </div>
+ @if (count($avatar_storage_options) === 1)
+ <x-callout type="info" title="No usable S3 storage configured" class="mt-4">
+ Add and test an S3-compatible storage under Storages before selecting it here.
+ </x-callout>
+ @endif
+ </x-application.settings-section>
+ </form>
+ </x-settings.layout>
</div>