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.

Fix SSH command generation and disable mux in validateConnection()

Andras Bacsai7e9a54ce67ff
diff --git a/app/Models/Server.php b/app/Models/Server.php
index dcbb0dde33..432a296e9f 100644
--- a/app/Models/Server.php
+++ b/app/Models/Server.php
@@ -398,6 +398,8 @@ class Server extends BaseModel
}
public function validateConnection()
{
+ config()->set('coolify.mux_enabled', false);
+
$server = Server::find($this->id);
if (!$server) {
return false;
diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php
index a6838f7f32..d57579b5bc 100644
--- a/bootstrap/helpers/remoteProcess.php
+++ b/bootstrap/helpers/remoteProcess.php
@@ -108,7 +108,7 @@ function instant_scp(string $source, string $dest, Server $server, $throwError =
}
return $output;
}
-function generateSshCommand(Server $server, string $command, bool $isMux = true)
+function generateSshCommand(Server $server, string $command)
{
$user = $server->user;
$port = $server->port;
@@ -120,7 +120,7 @@ function generateSshCommand(Server $server, string $command, bool $isMux = true)
$delimiter = 'EOF-COOLIFY-SSH';
$ssh_command = "timeout $timeout ssh ";
- if ($isMux && config('coolify.mux_enabled') === true && config('coolify.is_windows_docker_desktop') === false) {
+ if (config('coolify.mux_enabled') === true && config('coolify.is_windows_docker_desktop') === false) {
$ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/ssh/mux/%h_%p_%r ';
}
if (data_get($server, 'settings.is_cloudflare_tunnel')) {