Describe the bug
When OmniVoice Studio is deployed via Docker and accessed from another machine on the LAN, the web UI fails to communicate with the backend.
The frontend makes API and WebSocket requests to http://127.0.0.1:3900 / ws://127.0.0.1:3900/..., which only works when the browser is running on the same machine as the container host. From a LAN client, those requests point back to the client machine itself, causing repeated ERR_CONNECTION_REFUSED errors.
This results in UI failures such as:
Failed to load engines: Failed to fetch
Failed to log files: Failed to fetch
- model/setup/status/system API calls failing
- WebSocket connection failures for events
- no visible model download/setup progress in the UI
Additionally, for LAN access, the backend also needs the browser origin included in OMNIVOICE_ALLOWED_ORIGINS.
To reproduce
Steps to reproduce the behavior:
- Deploy OmniVoice Studio using Docker on one machine
- Expose port
3900 on the LAN
- Access the UI from a different machine using a LAN hostname or IP, e.g.
http://my-docker-host.local:3900
- Open browser DevTools
- See repeated failed requests to:
http://127.0.0.1:3900/model/status
http://127.0.0.1:3900/sysinfo
http://127.0.0.1:3900/setup/status
http://127.0.0.1:3900/system/logs?tail=300
ws://127.0.0.1:3900/ws/events
Expected behavior
When the app is served over Docker and accessed from the LAN, the frontend should communicate with the same host/origin that served the page, or otherwise support a documented/runtime-configurable API base suitable for remote browser access.
A LAN user visiting http://my-docker-host.local:3900 should not have the frontend hardcoded to 127.0.0.1:3900.
Screenshots / Logs
Browser console showed repeated errors like:
GET http://127.0.0.1:3900/model/status net::ERR_CONNECTION_REFUSED
GET http://127.0.0.1:3900/sysinfo net::ERR_CONNECTION_REFUSED
GET http://127.0.0.1:3900/setup/status net::ERR_CONNECTION_REFUSED
GET http://127.0.0.1:3900/system/logs?tail=300 net::ERR_CONNECTION_REFUSED
WebSocket connection to 'ws://127.0.0.1:3900/ws/events' failed
The frontend appears to default to 127.0.0.1 here:
const viteEnv = import.meta.env ?? {};
const _port = viteEnv.VITE_API_PORT || '3900';
export const API = viteEnv.VITE_API_URL || `http://127.0.0.1:${_port}`;
Environment
- OS: Ubuntu Linux
- Install method: Docker
- Version: current
latest container image at time of testing
- GPU: NVIDIA GPU
- RAM: N/A
Additional context
I was able to make it work by building from source and baking the LAN URL into the frontend build using VITE_API_URL, plus setting OMNIVOICE_ALLOWED_ORIGINS for the LAN origin.
Changes required
In a custom Docker build, I added frontend build-time support for VITE_API_URL:
ARG VITE_API_URL=http://127.0.0.1:3900
ENV VITE_API_URL=${VITE_API_URL}
Describe the bug
When OmniVoice Studio is deployed via Docker and accessed from another machine on the LAN, the web UI fails to communicate with the backend.
The frontend makes API and WebSocket requests to
http://127.0.0.1:3900/ws://127.0.0.1:3900/..., which only works when the browser is running on the same machine as the container host. From a LAN client, those requests point back to the client machine itself, causing repeatedERR_CONNECTION_REFUSEDerrors.This results in UI failures such as:
Failed to load engines: Failed to fetchFailed to log files: Failed to fetchAdditionally, for LAN access, the backend also needs the browser origin included in
OMNIVOICE_ALLOWED_ORIGINS.To reproduce
Steps to reproduce the behavior:
3900on the LANhttp://my-docker-host.local:3900http://127.0.0.1:3900/model/statushttp://127.0.0.1:3900/sysinfohttp://127.0.0.1:3900/setup/statushttp://127.0.0.1:3900/system/logs?tail=300ws://127.0.0.1:3900/ws/eventsExpected behavior
When the app is served over Docker and accessed from the LAN, the frontend should communicate with the same host/origin that served the page, or otherwise support a documented/runtime-configurable API base suitable for remote browser access.
A LAN user visiting
http://my-docker-host.local:3900should not have the frontend hardcoded to127.0.0.1:3900.Screenshots / Logs
Browser console showed repeated errors like:
GET http://127.0.0.1:3900/model/status net::ERR_CONNECTION_REFUSEDGET http://127.0.0.1:3900/sysinfo net::ERR_CONNECTION_REFUSEDGET http://127.0.0.1:3900/setup/status net::ERR_CONNECTION_REFUSEDGET http://127.0.0.1:3900/system/logs?tail=300 net::ERR_CONNECTION_REFUSEDWebSocket connection to 'ws://127.0.0.1:3900/ws/events' failedThe frontend appears to default to
127.0.0.1here:Environment
latestcontainer image at time of testingAdditional context
I was able to make it work by building from source and baking the LAN URL into the frontend build using
VITE_API_URL, plus settingOMNIVOICE_ALLOWED_ORIGINSfor the LAN origin.Changes required
In a custom Docker build, I added frontend build-time support for
VITE_API_URL: