Is there an accepted or most appropriate way to set environment variables before launching open-webui? I finally tracked down where the env variables are being set, all the way in the package itself /venv/lib/python3.11/site-packages/open-webui/env.py.
It's fairly common that CLI programs have you specify port and addresses as environmental variables. However I struggle to understand why I have such a hard time configuring packages such as these in an environment. Even if we ignore the pysqlite3 thing - which I really find it inappropriate people are editing their main.py which makes updating a monkey patch - I still find it really difficult given the documentation. backend/config.py doesn't exist (presumably documentation from a different version?).
The back end code is modularly loading the config, which is totally understandable. But when the expectation is to alter package versions, I really hesitate to pursue the tool further.
As I work through my experience, I can track things that would make the setup easier for all users. I think for one, because there is a separation of ENV variables that START the program (address, OLLAMA_HOST, etc) and variables that control the UI itself, there should be a config.json that can be accessed before serving the first time. Implicit behavior depending on if it is first run or not seems to do more harm than good - when the expectation is already one where everyone is looking for some sort of config.json.
Is this something I can help with? Or is this stuff "assumed" in certain contexts? If so, I apologize for wasting a post.
Thanks.
Originally created by @ghost on GitHub (Feb 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9259
Hi,
Is there an accepted or most appropriate way to set environment variables before launching open-webui? I finally tracked down where the env variables are being set, all the way in the package itself /venv/lib/python3.11/site-packages/open-webui/env.py.
It's fairly common that CLI programs have you specify port and addresses as environmental variables. However I struggle to understand why I have such a hard time configuring packages such as these in an environment. Even if we ignore the pysqlite3 thing - which I really find it inappropriate people are editing their main.py which makes updating a monkey patch - I still find it really difficult given the documentation. backend/config.py doesn't exist (presumably documentation from a different version?).
The back end code is modularly loading the config, which is totally understandable. But when the expectation is to alter package versions, I really hesitate to pursue the tool further.
As I work through my experience, I can track things that would make the setup easier for all users. I think for one, because there is a separation of ENV variables that START the program (address, OLLAMA_HOST, etc) and variables that control the UI itself, there should be a config.json that can be accessed before serving the first time. Implicit behavior depending on if it is first run or not seems to do more harm than good - when the expectation is already one where everyone is looking for some sort of config.json.
Is this something I can help with? Or is this stuff "assumed" in certain contexts? If so, I apologize for wasting a post.
Thanks.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ghost on GitHub (Feb 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9259
Hi,
Is there an accepted or most appropriate way to set environment variables before launching open-webui? I finally tracked down where the env variables are being set, all the way in the package itself /venv/lib/python3.11/site-packages/open-webui/env.py.
It's fairly common that CLI programs have you specify port and addresses as environmental variables. However I struggle to understand why I have such a hard time configuring packages such as these in an environment. Even if we ignore the pysqlite3 thing - which I really find it inappropriate people are editing their main.py which makes updating a monkey patch - I still find it really difficult given the documentation. backend/config.py doesn't exist (presumably documentation from a different version?).
The back end code is modularly loading the config, which is totally understandable. But when the expectation is to alter package versions, I really hesitate to pursue the tool further.
As I work through my experience, I can track things that would make the setup easier for all users. I think for one, because there is a separation of ENV variables that START the program (address, OLLAMA_HOST, etc) and variables that control the UI itself, there should be a config.json that can be accessed before serving the first time. Implicit behavior depending on if it is first run or not seems to do more harm than good - when the expectation is already one where everyone is looking for some sort of config.json.
Is this something I can help with? Or is this stuff "assumed" in certain contexts? If so, I apologize for wasting a post.
Thanks.