mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[GH-ISSUE #33] ISSUE: Admin UI unreachable — "/" returns 401 "Missing Authorization header" because the frontend build is silently excluded from the wheel #11
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Classic298 on GitHub (Jul 10, 2026).
Original GitHub issue: https://github.com/open-webui/terminals/issues/33
Bug description
Visiting the orchestrator root (
http://host:3000/) in a browser to open the admin UI (added in 0.0.4) returns:instead of serving the UI. This happens with the official Docker image (
ghcr.io/open-webui/terminals:0.0.5) and any image/install built withpip install ., wheneverTERMINALS_API_KEYorTERMINALS_OPEN_WEBUI_URLis set.Steps to reproduce
docker run -p 3000:3000 -e TERMINALS_API_KEY=secret -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/open-webui/terminals:0.0.5http://localhost:3000/in a browser.Expected: the admin UI loads (
TERMINALS_ENABLE_UIdefaults totrue).Actual:
401 {"detail":"Missing Authorization header"}.Root cause
The built frontend never makes it into the installed Python package:
terminals/frontend/build/is gitignored (root.gitignorehasbuild/, andterminals/frontend/.gitignorehasbuild).Hatchling honors
.gitignoreduring wheel file selection and excludes VCS-ignored files even when they match anincludepattern. The"terminals/frontend/build/**/*"entry under[tool.hatch.build.targets.wheel].includeinpyproject.tomlis therefore a no-op. Hatchling's documented override for shipping gitignored build outputs is the separateartifactsoption, which is not used.So the wheel built by
pip install .in the Dockerfile ships the frontend source (src/,package.json, …) but notfrontend/build/. Verifiable in a running container:At runtime the
terminalsconsole script imports the package from site-packages, whereFRONTEND_BUILD_DIR.exists()(terminals/main.py) is false, so theGET /UI route is never registered.The browser request falls through to the auth-protected catch-all reverse proxy (
/{path:path}interminals/routers/proxy.py), whoseverify_api_keydependency rejects it with401 Missing Authorization header.Debugging note: the image does contain the built UI at
/app/terminals/frontend/build(the DockerfileCOPY --from=frontendtarget), which is misleading — that copy is dead weight; the app runs from site-packages.Fix (verified)
Declare the build output as hatchling
artifactsinpyproject.toml:Rebuilding the wheel with this change makes
terminals/frontend/build/**appear in the wheel, and the UI is then served on/.Workaround for existing deployments
Until a fixed image is published, make Python prefer the complete source tree already inside the image, e.g. in docker-compose:
or copy the build into site-packages:
Affected versions
0.0.4 (UI introduced) and 0.0.5.
@Classic298 commented on GitHub (Jul 10, 2026):
https://github.com/open-webui/terminals/pull/34