[PR #279] feat(open-terminal): add serveOnLocalNetwork option #240

Open
opened 2026-10-18 14:07:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/desktop/pull/279
Author: @joaoquintas
Created: 10/10/2026
Status: 🔄 Open

Base: main ← Head: feat/open-terminal-serve-on-local-network


📝 Commits (1)

  • 5e53642 feat(open-terminal): add serveOnLocalNetwork option to bind on all interfaces

📊 Changes

4 files changed (+32 additions, -6 deletions)

View changed files

📝 src/main/utils/index.ts (+3 -1)
📝 src/main/utils/open-terminal.ts (+10 -3)
📝 src/renderer/src/lib/components/Main/Settings/OpenTerminal.svelte (+16 -2)
📝 src/renderer/src/lib/i18n/locales/en-US/translation.json (+3 -0)

📄 Description

Description

Adds a "Serve on local network" switch to Settings → Terminal (openTerminal.serveOnLocalNetwork,
default false), mirroring the existing localServer.serveOnLocalNetwork option.

  • When enabled, Open Terminal is launched with --host 0.0.0.0; otherwise 127.0.0.1 (unchanged default).
  • The bind address is separated from the connect address: portInUse() and the advertised URL stay on
    127.0.0.1, so the app's own client is unaffected and no 0.0.0.0 URL is exposed.
  • Fixes the Port field displaying 8000 when unset; the effective default is 39284.
  • Adds en-US strings; other locales fall back to English.

Use case: the Desktop app connected to a remote Open WebUI server. Admin-level terminal connections are
proxied by the server backend, which cannot reach a loopback-bound terminal
(Connect call failed ('127.0.0.1', 39284)).

Testing (macOS, Apple Silicon, Node 22): npm run typecheck passes (0 errors). lsof shows *:39284
with the switch on and 127.0.0.1:39284 with it off. A remote Open WebUI 0.11.4 server executes terminal
tool calls over VPN through an admin-level connection. Prettier was not applied because the touched files
do not conform on main; the added lines follow the existing style to keep the diff minimal.

Security note: when enabled, the terminal is reachable on every interface and protected only by its
API key. Users should restrict source addresses with a host firewall.

Closes #196


Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/desktop/pull/279 **Author:** [@joaoquintas](https://github.com/joaoquintas) **Created:** 10/10/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/open-terminal-serve-on-local-network` --- ### 📝 Commits (1) - [`5e53642`](https://github.com/open-webui/desktop/commit/5e536422401c219c3e817a10d3906ffe72a07113) feat(open-terminal): add serveOnLocalNetwork option to bind on all interfaces ### 📊 Changes **4 files changed** (+32 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/main/utils/index.ts` (+3 -1) 📝 `src/main/utils/open-terminal.ts` (+10 -3) 📝 `src/renderer/src/lib/components/Main/Settings/OpenTerminal.svelte` (+16 -2) 📝 `src/renderer/src/lib/i18n/locales/en-US/translation.json` (+3 -0) </details> ### 📄 Description ## Description Adds a "Serve on local network" switch to Settings → Terminal (`openTerminal.serveOnLocalNetwork`, default `false`), mirroring the existing `localServer.serveOnLocalNetwork` option. - When enabled, Open Terminal is launched with `--host 0.0.0.0`; otherwise `127.0.0.1` (unchanged default). - The bind address is separated from the connect address: `portInUse()` and the advertised URL stay on `127.0.0.1`, so the app's own client is unaffected and no `0.0.0.0` URL is exposed. - Fixes the Port field displaying `8000` when unset; the effective default is `39284`. - Adds en-US strings; other locales fall back to English. **Use case:** the Desktop app connected to a remote Open WebUI server. Admin-level terminal connections are proxied by the server backend, which cannot reach a loopback-bound terminal (`Connect call failed ('127.0.0.1', 39284)`). **Testing (macOS, Apple Silicon, Node 22):** `npm run typecheck` passes (0 errors). `lsof` shows `*:39284` with the switch on and `127.0.0.1:39284` with it off. A remote Open WebUI 0.11.4 server executes terminal tool calls over VPN through an admin-level connection. Prettier was not applied because the touched files do not conform on `main`; the added lines follow the existing style to keep the diff minimal. **Security note:** when enabled, the terminal is reachable on every interface and protected only by its API key. Users should restrict source addresses with a host firewall. ## Related Issues Closes #196 --- ## Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/desktop/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/desktop#240
No description provided.