mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-17 08:21:12 -05:00
[GH-ISSUE #11559] feat: base_path support #135999
Reference in New Issue
Block a user
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 @marius-gherghief on GitHub (Mar 11, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11559
Check Existing Issues
Problem Description
If you need to be able to host the open_webui UI & backend at https://example.com/my_ai_portal, I want to publish this way a short script that will add this enhancement.
Mainly the script finds and replaces all the code that chnages the relative path from '/' to 'my_ai_portal', or any path you desire. After running this script from the base of the repository, you just need to rebuild the UI and that is all.
Desired Solution you'd like
The attached script is executed as follows:
node ./prepare_openwebui.js ./open-webui/ --dry-run --path my_ai_portalnode ./prepare_openwebui.js ./open-webui/ --path my_ai_portalNote that the current dir for the script execution is the parent dir of the cloned repository.
prepare_openwebui.js:
Alternatives Considered
No response
Additional Context
No response
@marius-gherghief commented on GitHub (Mar 11, 2025):
The above script was tested on version 0.5.20
@tjbck commented on GitHub (Mar 11, 2025):
Please check for previous discussions, TL;DR we currently do not have the capacity to handle unnecessary additional complexity.
@marius-gherghief commented on GitHub (Mar 11, 2025):
I think this can help you or any community member that needs it. I know it was discussed, but this script if sully functional and serves mainly the case when the app is published under a reverse proxy sub path.
At the same time, this can help any contributing developer to identify every place a new env var needs to be implemented.
@chenkang1 commented on GitHub (Mar 13, 2025):
can cthat script can run in docker container??
@marius-gherghief commented on GitHub (Mar 13, 2025):
no it can;t as it runs on top of the svelte scripts that will be used to recompile the webui.
What you can do is just clone the repo and change the standard Dockerfile to include before the build step, the script execution.