open-webui / docs

https://docs.openwebui.com
https://docs.openwebui.com
53 stars 64 forks source link

docs: better env docs #41

Closed scharc closed 1 week ago

scharc commented 3 months ago

Is your feature request related to a problem? Please describe. I am deploying the web ui with docker and it is very frustating to find out, that not everything is saved into the database. So I took a dive into the source to get all the possible env vars.

Describe the solution you'd like Document all possible env vars with all possible options / types

Describe alternatives you've considered Make backend/config.py better readable and point to it from the docs.

Additional context Here is the list of possible env vars with corresponding python code for reading it

GLOBAL_LOG_LEVEL = os.environ.get("GLOBAL_LOG_LEVEL", "").upper()
SRC_LOG_LEVELS[source] = os.environ.get(log_env_var, "").upper()
CUSTOM_NAME = os.environ.get("CUSTOM_NAME", "")
OLLAMA_API_BASE_URL = os.environ.get(
OLLAMA_BASE_URL = os.environ.get("OLLAMA_BASE_URL", "")
OLLAMA_BASE_URLS = os.environ.get("OLLAMA_BASE_URLS", "")
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "")
OPENAI_API_BASE_URL = os.environ.get("OPENAI_API_BASE_URL", "")
OPENAI_API_KEYS = os.environ.get("OPENAI_API_KEYS", "")
OPENAI_API_BASE_URLS = os.environ.get("OPENAI_API_BASE_URLS", "")
ENABLE_SIGNUP = os.environ.get("ENABLE_SIGNUP", "True").lower() == "true"
DEFAULT_MODELS = os.environ.get("DEFAULT_MODELS", None)
USER_PERMISSIONS_CHAT_DELETION = os.environ.get("USER_PERMISSIONS_CHAT_DELETION", "True").lower() == "true"
MODEL_FILTER_ENABLED = os.environ.get("MODEL_FILTER_ENABLED", "False").lower() == "true"
MODEL_FILTER_LIST = os.environ.get("MODEL_FILTER_LIST", "")
WEBHOOK_URL = os.environ.get("WEBHOOK_URL", "")
WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.100")
WEBUI_SECRET_KEY = os.environ.get(
RAG_EMBEDDING_MODEL = os.environ.get("RAG_EMBEDDING_MODEL", "all-MiniLM-L6-v2")
RAG_EMBEDDING_MODEL_DEVICE_TYPE = os.environ.get(
DATA_DIR = str(Path(os.getenv("DATA_DIR", "./data")).resolve())
FRONTEND_BUILD_DIR = str(Path(os.getenv("FRONTEND_BUILD_DIR", "../build")))
DEFAULT_USER_ROLE = os.getenv("DEFAULT_USER_ROLE", "pending")
WHISPER_MODEL = os.getenv("WHISPER_MODEL", "base")
WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models")
AUTOMATIC1111_BASE_URL = os.getenv("AUTOMATIC1111_BASE_URL", "")
COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "")
luboszima commented 3 months ago

+1

justinh-rahb commented 2 months ago

Notes for myself later:

To run ollama-webui in an airgapped network, set the following environment variables to disable automatic updates:

Environment:
  - RAG_EMBEDDING_MODEL_AUTO_UPDATE: False
  - WHISPER_MODEL_AUTO_UPDATE: False

These can be added to the docker run command, compose file, or .env file. This should allow the application to run without connectivity to huggingface.

justinh-rahb commented 1 week ago

Closing due to age and I'm fairly sure we've adequately covered this now.