mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[GH-ISSUE #17517] issue: it read the env variables from sys not the .env ! #56983
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 @kaac5 on GitHub (Sep 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17517
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.28
Ollama Version (if applicable)
No response
Operating System
windows 10
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
change the env variable configuration ducs or change the code to read env variables from .env
Actual Behavior
check the code in config.py in project
I load the env variables like this CORS_ALLOW_ORIGIN = os.environ.get("CORS_ALLOW_ORIGIN", ""), but os.environ.get("XXX", "") read env from your device sys env not .env file. All the ducs say set the .env file to change env variables
Steps to Reproduce
set .env like set ENV='prod'
see localhost/docs
set sys env ENV=dev or prod
see localhost/docs
Logs & Screenshots
set in .env --- INFO [open_webui.env] ENV:not found
set in sys env ---- INFO [open_webui.env] ENV:prod
log yourself
Additional Information
No response