diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php index bb01160f4..9503da499 100644 --- a/app/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -156,6 +156,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== $this->servers = Server::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get(); if ($this->servers->count() > 0) { $this->selectedExistingServer = $this->servers->first()->id; + $this->updateServerDetails(); $this->currentState = 'select-existing-server'; return; @@ -175,11 +176,18 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== } $this->selectedExistingPrivateKey = $this->createdServer->privateKey->id; $this->serverPublicKey = $this->createdServer->privateKey->publicKey(); - $this->remoteServerPort = $this->createdServer->port; - $this->remoteServerUser = $this->createdServer->user; + $this->updateServerDetails(); $this->currentState = 'validate-server'; } + private function updateServerDetails() + { + if ($this->createdServer) { + $this->remoteServerPort = $this->createdServer->port; + $this->remoteServerUser = $this->createdServer->user; + } + } + public function getProxyType() { // Set Default Proxy Type @@ -367,23 +375,12 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA== 'remoteServerUser' => 'required|string', ]); - if (!$this->createdServer) { - $this->createdServer = Server::create([ - 'name' => $this->remoteServerName ?? 'New Server', - 'ip' => $this->remoteServerHost, - 'port' => $this->remoteServerPort, - 'user' => $this->remoteServerUser, - 'team_id' => currentTeam()->id, + $this->createdServer->update([ + 'name' => $this->remoteServerName, + 'port' => $this->remoteServerPort, + 'user' => $this->remoteServerUser, 'timezone' => 'UTC', ]); - } else { - $this->createdServer->update([ - 'port' => $this->remoteServerPort, - 'user' => $this->remoteServerUser, - 'timezone' => 'UTC', - ]); - } - $this->validateServer(); } diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index 4b1da05da..c826e7b98 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -64,9 +64,9 @@
Please check the connection details below and correct them if they are incorrect.
Non-root user is experimental:
docs
@@ -147,11 +147,7 @@
Please check the connection details below and correct them if they are incorrect.
+ Non-root user is experimental:
+ docs
+ If the connection details are correct, please ensure:
+ For more help, check this documentation.
+
- Please make sure you have the correct public key in your ~/.ssh/authorized_keys file for
- user or skip the boarding process and add a new private key manually to Coolify and to the
- server.
-
- Check this documentation for further
- help.
- Server is not reachable
+
+
+ ~/.ssh/authorized_keys
file for the specified user