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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(terminal): Terminal through Cloudflare tunnel works?! fix(dependencies): update realtime version to 1.0.9 and cloudflared version to 2025.5.0; enhance SSH argument parsing in terminal-server.js
Andras Bacsaif7d6aa850be0
diff --git a/config/constants.php b/config/constants.phpindex 2e54acade9..226b7963b1 100644--- a/config/constants.php+++ b/config/constants.php@@ -4,7 +4,7 @@ return ['coolify' => ['version' => '4.0.0-beta.419','helper_version' => '1.0.8',- 'realtime_version' => '1.0.8',+ 'realtime_version' => '1.0.9','self_hosted' => env('SELF_HOSTED', true),'autoupdate' => env('AUTOUPDATE'),'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),diff --git a/docker/coolify-realtime/Dockerfile b/docker/coolify-realtime/Dockerfileindex 3a53da4906..7a24200d66 100644--- a/docker/coolify-realtime/Dockerfile+++ b/docker/coolify-realtime/Dockerfile@@ -2,7 +2,7 @@# https://github.com/soketi/soketi/releasesARG SOKETI_VERSION=1.6-16-alpine# https://github.com/cloudflare/cloudflared/releases-ARG CLOUDFLARED_VERSION=2025.2.0+ARG CLOUDFLARED_VERSION=2025.5.0FROM quay.io/soketi/soketi:${SOKETI_VERSION}diff --git a/docker/coolify-realtime/terminal-server.js b/docker/coolify-realtime/terminal-server.jsindex 61dd294534..2607d2aecf 100755--- a/docker/coolify-realtime/terminal-server.js+++ b/docker/coolify-realtime/terminal-server.js@@ -265,11 +265,57 @@ function extractTimeout(commandString) {function extractSshArgs(commandString) {const sshCommandMatch = commandString.match(/ssh (.+?) 'bash -se'/);- let sshArgs = sshCommandMatch ? sshCommandMatch[1].split(' ') : [];+ if (!sshCommandMatch) return [];++ const argsString = sshCommandMatch[1];+ let sshArgs = [];++ // Parse shell arguments respecting quotes+ let current = '';+ let inQuotes = false;+ let quoteChar = '';+ let i = 0;++ while (i < argsString.length) {+ const char = argsString[i];+ const nextChar = argsString[i + 1];++ if (!inQuotes && (char === '"' || char === "'")) {+ // Starting a quoted section+ inQuotes = true;+ quoteChar = char;+ current += char;+ } else if (inQuotes && char === quoteChar) {+ // Ending a quoted section+ inQuotes = false;+ current += char;+ quoteChar = '';+ } else if (!inQuotes && char === ' ') {+ // Space outside quotes - end of argument+ if (current.trim()) {+ sshArgs.push(current.trim());+ current = '';+ }+ } else {+ // Regular character+ current += char;+ }+ i++;+ }++ // Add final argument if exists+ if (current.trim()) {+ sshArgs.push(current.trim());+ }++ // Replace RequestTTY=no with RequestTTY=yessshArgs = sshArgs.map(arg => arg === 'RequestTTY=no' ? 'RequestTTY=yes' : arg);- if (!sshArgs.includes('RequestTTY=yes')) {++ // Add RequestTTY=yes if not present+ if (!sshArgs.includes('RequestTTY=yes') && !sshArgs.some(arg => arg.includes('RequestTTY='))) {sshArgs.push('-o', 'RequestTTY=yes');}+return sshArgs;}