From 880a377e54805e3a372701140d19247193991b4b Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Tue, 27 Jan 2026 08:38:14 -0600 Subject: [PATCH] fix(wss): handle cloud version restriction in terminal setup --- apps/dokploy/server/wss/terminal.ts | 7 ++++++- apps/dokploy/server/wss/utils.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/wss/terminal.ts b/apps/dokploy/server/wss/terminal.ts index fa37d492b..00b0e2c2c 100644 --- a/apps/dokploy/server/wss/terminal.ts +++ b/apps/dokploy/server/wss/terminal.ts @@ -97,7 +97,12 @@ export const setupTerminalWebSocketServer = ( const isLocalServer = serverId === "local"; - if (isLocalServer && !IS_CLOUD) { + if (isLocalServer) { + if (IS_CLOUD) { + ws.send("This feature is not available in the cloud version."); + ws.close(); + return; + } const port = Number(url.searchParams.get("port")); const username = url.searchParams.get("username"); diff --git a/apps/dokploy/server/wss/utils.ts b/apps/dokploy/server/wss/utils.ts index 7ec0f9ce8..be2197501 100644 --- a/apps/dokploy/server/wss/utils.ts +++ b/apps/dokploy/server/wss/utils.ts @@ -34,7 +34,7 @@ export const isValidShell = (shell: string): boolean => { export const getShell = () => { if (IS_CLOUD) { - return "CLOUD_VERSION"; + return "NO_AVAILABLE"; } switch (os.platform()) { case "win32":