Skip to content

feat(settings): run local VocaGateway from Advanced (podman-first) - #774

Draft
jatinkrmalik wants to merge 12 commits into
mainfrom
jatin/gateway-embed-settings
Draft

feat(settings): run local VocaGateway from Advanced (podman-first)#774
jatinkrmalik wants to merge 12 commits into
mainfrom
jatin/gateway-embed-settings

Conversation

@jatinkrmalik

Copy link
Copy Markdown
Member

Summary

Vocalinux can optionally start a local VocaGateway from Settings, next to Remote Server. This is for people who want phone pairing and a self-hosted transcription endpoint on the same Linux box. It is not on-device recognition: audio still goes to the gateway container.

The default engine stays whisper.cpp. Nothing here flips that.

What you get

Settings shows a Local VocaGateway card with Run/Stop, status (Stopped / Starting / Live / Pairable / Ready / Error), a LAN opt-in for Phone, pairing UI that refuses loopback QR URLs, and Use this Gateway to fill the existing remote_api fields (OpenAI path /v1/audio/transcriptions plus bearer token).

Runtime detection prefers podman, then docker. If neither works, Run stays disabled with an install hint. Flatpak fails closed because the sandbox cannot see the host socket. The AppImage does not bundle a container engine.

Compose uses project name vocagateway and pins upstream tag v0.1.0. The v0.1.0 release has no published image assets, so the first start builds vocagateway:v0.1.0 from that tag. Stop runs compose down without wiping volumes. The tray only offers Stop local Gateway when this session started it. No login auto-start in v1.

Safety notes

LAN publish defaults off (127.0.0.1). Turning it on sets VOCAGATEWAY_PUBLISH_HOST=0.0.0.0 and you still need a firewall rule on trusted networks only. Tokens live under ~/.config/vocalinux/gateway_embed/ mode 600 and are not logged. QR/SVG downloads are size-capped. GTK updates are marshalled with idle_add.

Docs: docs/GATEWAY_EMBED.md (also linked from HTTP_REMOTE and the README docs list).

Test plan

  • pytest tests/test_gateway_embed.py (mocked; no real containers)
  • With podman installed: Run gateway, confirm Live then Ready after picking a model in the WebUI
  • Confirm loopback never appears in the pairing QR path; enable LAN and re-check
  • Use this Gateway fills remote_api URL/key/endpoint and can dictate
  • Stop from Settings and from tray; volume still present after down
  • Flatpak build (if available): Run disabled with sandbox hint

Add an optional Local VocaGateway panel next to Remote Server so Linux users
can start the pinned v0.1.0 compose project with podman (docker fallback),
watch Live/Pairable/Ready status, pair a phone without loopback QR URLs, and
preset remote_api to the gateway transcriptions endpoint. Stop preserves
volumes; Flatpak fails closed; tray offers Stop only when this session manages
the gateway. Default on-device engine stays whisper.cpp.
@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for voca-linux canceled.

Name Link
🔨 Latest commit 79d3bba
🔍 Latest deploy log https://app.netlify.com/projects/voca-linux/deploys/6a9a7d118a5f2300088c8983

@github-actions github-actions Bot added documentation Improvements or additions to documentation app Core Python application (src, packaging) tests Test suite changes labels Sep 4, 2026
VocaGateway v0.1.0 exposes default service gateway plus native/cuda/vulkan
profiles, not cpu. Start and stop the default service without --profile, keep
the latest image pin rejection, and prefer save_config for the remote_api preset.
v0.1.0 has no cpu profile entry, but Compose still starts the unprofiled
gateway service when --profile cpu is set, and keeps cuda/vulkan/native off.
That matches the frozen desktop embed contract and stays forward-compatible.
Keep podman/docker probing off the GTK thread, reject link-local and
loopback public URLs for phone QR, sanitize compose .env image overrides,
and cap bootstrap token reads so a hostile file cannot blow memory.
When Allow LAN flips while compose is already managed, rewrite publish
host and PUBLIC_URL and recreate the gateway before Pairable comes back.
Also reject default docker/podman bridge addresses for phone QR.
Cover 172.17.0.2 / link-local not becoming Pairable, and the mid-run
LAN toggle path that must wait for compose republish before advertising
a phone URL.
Align Pairable/QR host checks with vocagateway desktop-embed policy so
127.1 / localhost.* never become phone-reachable display URLs.
Gateway poll callbacks were left registered after Settings closed, so
idle_add could touch destroyed GTK widgets while compose stayed up.
_bridge_iface_ips shells out to host ip; without host_env the AST
gate fails and AppImage bundles can hand the wrong GLib to ip.
The explicit setuptools packages list omitted the new package, so the
bundle booted from source trees but died with ModuleNotFoundError on
every distro boot test.
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Sep 4, 2026
@jatinkrmalik jatinkrmalik mentioned this pull request Sep 5, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Core Python application (src, packaging) dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants