🌍 Environment Variable Configuration
Overview
Open WebUI provides a large range of environment variables that allow you to customize and configure various aspects of the application. This page serves as a comprehensive reference for all available environment variables, providing their types, default values, and descriptions. As new variables are introduced, this page will be updated to reflect the growing configuration options.
This page is up-to-date with Open WebUI release version v0.6.19, but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions.
Important Note on PersistentConfig
Environment Variables
When launching Open WebUI for the first time, all environment variables are treated equally and can be used to configure the application. However, for environment variables marked as PersistentConfig
, their values are persisted and stored internally.
After the initial launch, if you restart the container, PersistentConfig
environment variables will no longer use the external environment variable values. Instead, they will use the internally stored values.
In contrast, regular environment variables will continue to be updated and applied on each subsequent restart.
You can update the values of PersistentConfig
environment variables directly from within Open WebUI, and these changes will be stored internally. This allows you to manage these configuration settings independently of the external environment variables.
Please note that PersistentConfig
environment variables are clearly marked as such in the documentation below, so you can be aware of how they will behave.
To disable PersistentConfig
and have Open WebUI treat all variables equally, you can set ENABLE_PERSISTENT_CONFIG
to False
.
App/Backend
The following environment variables are used by backend/open_webui/config.py
to provide Open WebUI startup
configuration. Please note that some variables may have different default values depending on
whether you're running Open WebUI directly or via Docker. For more information on logging
environment variables, see our logging documentation.
General
WEBUI_URL
- Type:
str
- Default:
http://localhost:3000
- Description: Specifies the URL where your Open WebUI installation is reachable. Needed for search engine support and OAuth/SSO.
- Persistence: This environment variable is a
PersistentConfig
variable.
This variable has to be set before you start using OAuth/SSO for authentication. Since this is a persistent config environment variable, you can only change it through one of the following options:
- Temporarily disabling persistent config using
ENABLE_PERSISTENT_CONFIG
- Changing
WEBUI_URL
in the admin panel > settings and changing "WebUI URL".
Failure to set WEBUI_URL before using OAuth/SSO will result in failure to log in.
ENABLE_SIGNUP
- Type:
bool
- Default:
True
- Description: Toggles user account creation.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_SIGNUP_PASSWORD_CONFIRMATION
- Type:
bool
- Default:
False
- Description: If set to True, a "Confirm Password" field is added to the sign-up page to help users avoid typos when creating their password.
ENABLE_LOGIN_FORM
- Type:
bool
- Default:
True
- Description: Toggles email, password, sign-in and "or" (only when
ENABLE_OAUTH_SIGNUP
is set to True) elements. - Persistence: This environment variable is a
PersistentConfig
variable.
This should only ever be set to False
when ENABLE_OAUTH_SIGNUP
is also being used and set to True
. Failure to do so will result in the inability to login.
DEFAULT_LOCALE
- Type:
str
- Default:
en
- Description: Sets the default locale for the application.
- Persistence: This environment variable is a
PersistentConfig
variable.
DEFAULT_MODELS
- Type:
str
- Default: Empty string (' '), since
None
. - Description: Sets a default Language Model.
- Persistence: This environment variable is a
PersistentConfig
variable.
DEFAULT_USER_ROLE
- Type:
str
- Options:
pending
- New users are pending until their accounts are manually activated by an admin.user
- New users are automatically activated with regular user permissions.admin
- New users are automatically activated with administrator permissions.
- Default:
pending
- Description: Sets the default role assigned to new users.
- Persistence: This environment variable is a
PersistentConfig
variable.
PENDING_USER_OVERLAY_TITLE
- Type:
str
- Default: Empty string (' ')
- Description: Sets a custom title for the pending user overlay.
- Persistence: This environment variable is a
PersistentConfig
variable.
PENDING_USER_OVERLAY_CONTENT
- Type:
str
- Default: Empty string (' ')
- Description: Sets a custom text content for the pending user overlay.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_CHANNELS
- Type:
bool
- Default:
False
- Description: Enables or disables channel support.
- Persistence: This environment variable is a
PersistentConfig
variable.
WEBHOOK_URL
- Type:
str
- Description: Sets a webhook for integration with Discord/Slack/Microsoft Teams.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_ADMIN_EXPORT
- Type:
bool
- Default:
True
- Description: Controls whether admin users can export data.
ENABLE_ADMIN_CHAT_ACCESS
- Type:
bool
- Default:
True
- Description: Enables admin users to access all chats.
ENABLE_USER_WEBHOOKS
- Type:
bool
- Default:
True
- Description: Enables or disables user webhooks.
- Persistence: This environment variable is a
PersistentConfig
variable.
RESPONSE_WATERMARK
- Type:
str
- Default: Empty string (' ')
- Description: Sets a custom text that will be included when you copy a message in the chat. E.g.
"This text is AI generated"
-> will add "This text is AI generated" to every message, when copied. - Persistence: This environment variable is a
PersistentConfig
variable.
THREAD_POOL_SIZE
- Type:
int
- Default:
0
- Description: Sets the thread pool size for FastAPI/AnyIO blocking calls. By default (when set to
0
) FastAPI/AnyIO use40
threads. In case of large instances and many concurrent users, it may be needed to increaseTHREAD_POOL_SIZE
to prevent blocking.
MODELS_CACHE_TTL
- Type:
int
- Default:
1
- Description: Sets the cache time-to-live in seconds for model list responses from OpenAI and Ollama endpoints. This reduces API calls by caching the available models list for the specified duration. Set to empty string to disable caching entirely.
This caches the external model lists retrieved from configured OpenAI-compatible and Ollama API endpoints (not Open WebUI's internal model configurations). Higher values improve performance by reducing redundant API requests to external providers but may delay visibility of newly added or removed models on those endpoints. A value of 0 disables caching and forces fresh API calls each time. In high-traffic scenarios, increasing this value (e.g., to 300 seconds) can significantly reduce load on external API endpoints while still providing reasonably fresh model data.
SHOW_ADMIN_DETAILS
- Type:
bool
- Default:
True
- Description: Toggles whether to show admin user details in the interface.
- Persistence: This environment variable is a
PersistentConfig
variable.
ADMIN_EMAIL
- Type:
str
- Description: Sets the admin email shown by
SHOW_ADMIN_DETAILS
- Persistence: This environment variable is a
PersistentConfig
variable.
ENV
- Type:
str
- Options:
dev
- Enables the FastAPI API documentation on/docs
prod
- Automatically configures several environment variables
- Default:
- Backend Default:
dev
- Docker Default:
prod
- Backend Default:
- Description: Environment setting.
ENABLE_PERSISTENT_CONFIG
- Type:
bool
- Default:
True
- Description: If set to
False
, allPersistentConfig
variables are treated as regular variables.
CUSTOM_NAME
- Type:
str
- Description: Sets
WEBUI_NAME
but polls api.openwebui.com for metadata.
WEBUI_NAME
- Type:
str
- Default:
Open WebUI
- Description: Sets the main WebUI name. Appends
(Open WebUI)
if overridden.
PORT
- Type:
int
- Default:
8080
- Description: Sets the port to run Open WebUI from.
If you're running the application via Python and using the open-webui serve
command, you cannot set the port using the PORT
configuration. Instead, you must specify it directly as a command-line argument using the --port
flag. For example:
open-webui serve --port 9999
This will run the Open WebUI on port 9999
. The PORT
environment variable is disregarded in this mode.
ENABLE_REALTIME_CHAT_SAVE
- Type:
bool
- Default:
False
- Description: When enabled, the system saves each chunk of streamed chat data to the database in real time to ensure maximum data persistency. This feature provides robust data recovery and allows accurate session tracking. However, the tradeoff is increased latency, as saving to the database introduces a delay. Disabling this feature can improve performance and reduce delays, but it risks potential data loss in the event of a system failure or crash. Use based on your application's requirements and acceptable tradeoffs.
BYPASS_MODEL_ACCESS_CONTROL
- Type:
bool
- Default:
False
- Description: Bypasses model access control.
WEBUI_BUILD_HASH
- Type:
str
- Default:
dev-build
- Description: Used for identifying the Git SHA of the build for releases.
WEBUI_BANNERS
- Type:
list
ofdict
- Default:
[]
- Description: List of banners to show to users. The format for banners are:
[{"id": "string", "type": "string [info, success, warning, error]", "title": "string", "content": "string", "dismissible": false, "timestamp": 1000}]
- Persistence: This environment variable is a
PersistentConfig
variable.
When setting this environment variable in a .env
file, make sure to escape the quotes by wrapping the entire value in double quotes and using escaped quotes (\"
) for the inner quotes. Example:
WEBUI_BANNERS="[{\"id\": \"1\", \"type\": \"warning\", \"title\": \"Your messages are stored.\", \"content\": \"Your messages are stored and may be reviewed by human people. LLM's are prone to hallucinations, check sources.\", \"dismissible\": true, \"timestamp\": 1000}]"
USE_CUDA_DOCKER
- Type:
bool
- Default:
False
- Description: Builds the Docker image with NVIDIA CUDA support. Enables GPU acceleration for local Whisper and embeddings.
EXTERNAL_PWA_MANIFEST_URL
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: When defined as a fully qualified URL (e.g., https://path/to/manifest.webmanifest), requests sent to /manifest.json will use the external manifest file. When not defined, the default manifest.json file will be used.
ENABLE_TITLE_GENERATION
- Type:
bool
- Default:
True
- Description: Enables or disables chat title generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
LICENSE_KEY
- Type:
str
- Default:
None
- Description: Specifies the license key to use (for Enterprise users only).
- Persistence: This environment variable is a
PersistentConfig
variable.
SSL_ASSERT_FINGERPRINT
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the SSL assert fingerprint to use.
- Persistence: This environment variable is a
PersistentConfig
variable.
DEFAULT_PROMPT_SUGGESTIONS
- Type:
list
ofdict
- Default:
[]
(which means to use the built-in default prompt suggestions) - Description: List of prompt suggestions. The format for prompt suggestions are:
[{"title": ["Title part 1", "Title part 2"], "content": "prompt"}]
AIOHTTP Client
AIOHTTP_CLIENT_TIMEOUT
- Type:
int
- Default:
300
- Description: Specifies the timeout duration in seconds for the AIOHTTP client. This impacts things such as connections to Ollama and OpenAI endpoints.
This is the maximum amount of time the client will wait for a response before timing out.
If set to an empty string (' '), the timeout will be set to None
, effectively disabling the timeout and
allowing the client to wait indefinitely.
AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST
- Type:
int
- Default:
10
- Description: Sets the timeout in seconds for fetching the model list. This can be useful in cases where network latency requires a longer timeout duration to successfully retrieve the model list.
The AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST is set to 10 seconds by default to help ensure that all necessary connections are available when opening the web UI. This duration allows enough time for retrieving the model list even in cases of higher network latency. You can lower this value if quicker timeouts are preferred, but keep in mind that doing so may lead to some connections being dropped, depending on your network conditions.
AIOHTTP_CLIENT_TIMEOUT_OPENAI_MODEL_LIST
- Type:
int
- Description: Sets the timeout in seconds for fetching the model list. This can be useful in cases where network latency requires a longer timeout duration to successfully retrieve the model list.
Directories
DATA_DIR
- Type:
str
- Default:
./data
- Description: Specifies the base directory for data storage, including uploads, cache, vector database, etc.
FONTS_DIR
- Type:
str
- Description: Specifies the directory for fonts.
FRONTEND_BUILD_DIR
- Type:
str
- Default:
../build
- Description: Specifies the location of the built frontend files.
STATIC_DIR
- Type:
str
- Default:
./static
- Description: Specifies the directory for static files, such as the favicon.
Ollama
ENABLE_OLLAMA_API
- Type:
bool
- Default:
True
- Description: Enables the use of Ollama APIs.
- Persistence: This environment variable is a
PersistentConfig
variable.
OLLAMA_BASE_URL
(OLLAMA_API_BASE_URL
is deprecated)
- Type:
str
- Default:
http://localhost:11434
- Docker Default:
- If
K8S_FLAG
is set:http://ollama-service.open-webui.svc.cluster.local:11434
- If
USE_OLLAMA_DOCKER=True
:http://localhost:11434
- Else
http://host.docker.internal:11434
- If
- Description: Configures the Ollama backend URL.
OLLAMA_BASE_URLS
- Type:
str
- Description: Configures load-balanced Ollama backend hosts, separated by
;
. SeeOLLAMA_BASE_URL
. Takes precedence overOLLAMA_BASE_URL
. - Example:
http://host-one:11434;http://host-two:11434
- Persistence: This environment variable is a
PersistentConfig
variable.
USE_OLLAMA_DOCKER
- Type:
bool
- Default:
False
- Description: Builds the Docker image with a bundled Ollama instance.
K8S_FLAG
- Type:
bool
- Default:
False
- Description: If set, assumes Helm chart deployment and sets
OLLAMA_BASE_URL
tohttp://ollama-service.open-webui.svc.cluster.local:11434
OpenAI
ENABLE_OPENAI_API
- Type:
bool
- Default:
True
- Description: Enables the use of OpenAI APIs.
- Persistence: This environment variable is a
PersistentConfig
variable.
OPENAI_API_BASE_URL
- Type:
str
- Default:
https://api.openai.com/v1
- Description: Configures the OpenAI base API URL.
- Persistence: This environment variable is a
PersistentConfig
variable.
OPENAI_API_BASE_URLS
- Type:
str
- Description: Supports balanced OpenAI base API URLs, semicolon-separated.
- Example:
http://host-one:11434;http://host-two:11434
- Persistence: This environment variable is a
PersistentConfig
variable.
OPENAI_API_KEY
- Type:
str
- Description: Sets the OpenAI API key.
- Example:
sk-124781258123
- Persistence: This environment variable is a
PersistentConfig
variable.
OPENAI_API_KEYS
- Type:
str
- Description: Supports multiple OpenAI API keys, semicolon-separated.
- Example:
sk-124781258123;sk-4389759834759834
- Persistence: This environment variable is a
PersistentConfig
variable.
Tasks
TASK_MODEL
- Type:
str
- Description: The default model to use for tasks such as title and web search query generation when using Ollama models.
- Persistence: This environment variable is a
PersistentConfig
variable.
TASK_MODEL_EXTERNAL
- Type:
str
- Description: The default model to use for tasks such as title and web search query generation when using OpenAI-compatible endpoints.
- Persistence: This environment variable is a
PersistentConfig
variable.
TITLE_GENERATION_PROMPT_TEMPLATE
- Type:
str
- Description: Prompt to use when generating chat titles.
- Default: The value of
DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE
environment variable.
DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE
:
### Task:
Generate a concise, 3-5 word title with an emoji summarizing the chat history.
### Guidelines:
- The title should clearly represent the main theme or subject of the conversation.
- Use emojis that enhance understanding of the topic, but avoid quotation marks or special formatting.
- Write the title in the chat's primary language; default to English if multilingual.
- Prioritize accuracy over excessive creativity; keep it clear and simple.
### Output:
JSON format: { "title": "your concise title here" }
### Examples:
- { "title": "📉 Stock Market Trends" },
- { "title": "🍪 Perfect Chocolate Chip Recipe" },
- { "title": "Evolution of Music Streaming" },
- { "title": "Remote Work Productivity Tips" },
- { "title": "Artificial Intelligence in Healthcare" },
- { "title": "🎮 Video Game Development Insights" }
### Chat History:
<chat_history>
{{MESSAGES:END:2}}
</chat_history>
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_FOLLOW_UP_GENERATION
- Type:
bool
- Default:
True
- Description: Enables or disables follow up generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
FOLLOW_UP_GENERATION_PROMPT_TEMPLATE
- Type:
str
- Description: Prompt to use for generating several relevant follow-up questions.
- Default: The value of
DEFAULT_FOLLOW_UP_GENERATION_PROMPT_TEMPLATE
environment variable.
DEFAULT_FOLLOW_UP_GENERATION_PROMPT_TEMPLATE
:
### Task:
Suggest 3-5 relevant follow-up questions or prompts that the user might naturally ask next in this conversation as a **user**, based on the chat history, to help continue or deepen the discussion.
### Guidelines:
- Write all follow-up questions from the user’s point of view, directed to the assistant.
- Make questions concise, clear, and directly related to the discussed topic(s).
- Only suggest follow-ups that make sense given the chat content and do not repeat what was already covered.
- If the conversation is very short or not specific, suggest more general (but relevant) follow-ups the user might ask.
- Use the conversation's primary language; default to English if multilingual.
- Response must be a JSON array of strings, no extra text or formatting.
### Output:
JSON format: { "follow_ups": ["Question 1?", "Question 2?", "Question 3?"] }
### Chat History:
<chat_history>
{{MESSAGES:END:6}}
</chat_history>"
- Persistence: This environment variable is a
PersistentConfig
variable.
TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
- Type:
str
- Description: Prompt to use when calling tools.
- Default: The value of
DEFAULT_TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
environment variable.
DEFAULT_TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
:
Available Tools: {{TOOLS}}
Your task is to choose and return the correct tool(s) from the list of available tools based on the query. Follow these guidelines:
- Return only the JSON object, without any additional text or explanation.
- If no tools match the query, return an empty array:
{
"tool_calls": []
}
- If one or more tools match the query, construct a JSON response containing a "tool_calls" array with objects that include:
- "name": The tool's name.
- "parameters": A dictionary of required parameters and their corresponding values.
The format for the JSON response is strictly:
{
"tool_calls": [
{"name": "toolName1", "parameters": {"key1": "value1"}},
{"name": "toolName2", "parameters": {"key2": "value2"}}
]
}
- Persistence: This environment variable is a
PersistentConfig
variable.
Code Execution
ENABLE_CODE_EXECUTION
- Type:
bool
- Default:
True
- Description: Enables or disables code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_ENGINE
- Type:
str
- Default:
pyodide
- Description: Specifies the code execution engine to use.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_JUPYTER_URL
- Type:
str
- Default:
None
- Description: Specifies the Jupyter URL to use for code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_JUPYTER_AUTH
- Type:
str
- Default:
None
- Description: Specifies the Jupyter authentication method to use for code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_JUPYTER_AUTH_TOKEN
- Type:
str
- Default:
None
- Description: Specifies the Jupyter authentication token to use for code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_JUPYTER_AUTH_PASSWORD
- Type:
str
- Default:
None
- Description: Specifies the Jupyter authentication password to use for code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_EXECUTION_JUPYTER_TIMEOUT
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the timeout for Jupyter code execution.
- Persistence: This environment variable is a
PersistentConfig
variable.
Code Interpreter
ENABLE_CODE_INTERPRETER
- Type:
bool
- Default:
True
- Description: Enables or disables code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_ENGINE
- Type:
str
- Default:
pyodide
- Description: Specifies the code interpreter engine to use.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_PROMPT_TEMPLATE
- Type:
str
- Default:
None
- Description: Specifies the prompt template to use for code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_JUPYTER_URL
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the Jupyter URL to use for code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_JUPYTER_AUTH
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the Jupyter authentication method to use for code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_JUPYTER_AUTH_TOKEN
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the Jupyter authentication token to use for code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_JUPYTER_AUTH_PASSWORD
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the Jupyter authentication password to use for code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
CODE_INTERPRETER_JUPYTER_TIMEOUT
- Type:
str
- Default: Empty string (' '), since
None
is set as default. - Description: Specifies the timeout for the Jupyter code interpreter.
- Persistence: This environment variable is a
PersistentConfig
variable.
Direct Connections (OpenAPI/MCPO Tool Servers)
ENABLE_DIRECT_CONNECTIONS
- Type:
bool
- Default:
True
- Description: Enables or disables direct connections.
- Persistence: This environment variable is a
PersistentConfig
variable.
Autocomplete
ENABLE_AUTOCOMPLETE_GENERATION
- Type:
bool
- Default:
True
- Description: Enables or disables autocomplete generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
When enabling ENABLE_AUTOCOMPLETE_GENERATION
, ensure that you also configure AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH
and AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE
accordingly.
AUTOCOMPLETE_GENERATION_INPUT_MAX_LENGTH
- Type:
int
- Default:
-1
- Description: Sets the maximum input length for autocomplete generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE
- Type:
str
- Default: The value of the
DEFAULT_AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE
environment variable.
DEFAULT_AUTOCOMPLETE_GENERATION_PROMPT_TEMPLATE
:
### Task:
You are an autocompletion system. Continue the text in `<text>` based on the **completion type** in `<type>` and the given language.
### **Instructions**:
1. Analyze `<text>` for context and meaning.
2. Use `<type>` to guide your output:
- **General**: Provide a natural, concise continuation.
- **Search Query**: Complete as if generating a realistic search query.
3. Start as if you are directly continuing `<text>`. Do **not** repeat, paraphrase, or respond as a model. Simply complete the text.
4. Ensure the continuation:
- Flows naturally from `<text>`.
- Avoids repetition, overexplaining, or unrelated ideas.
5. If unsure, return: `{ "text": "" }`.
### **Output Rules**:
- Respond only in JSON format: `{ "text": "<your_completion>" }`.
### **Examples**:
#### Example 1:
Input:
<type>General</type>
<text>The sun was setting over the horizon, painting the sky</text>
Output:
{ "text": "with vibrant shades of orange and pink." }
#### Example 2:
Input:
<type>Search Query</type>
<text>Top-rated restaurants in</text>
Output:
{ "text": "New York City for Italian cuisine." }
---
### Context:
<chat_history>
{{MESSAGES:END:6}}
</chat_history>
<type>{{TYPE}}</type>
<text>{{PROMPT}}</text>
#### Output:
- Description: Sets the prompt template for autocomplete generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
Evaluation Arena Model
ENABLE_EVALUATION_ARENA_MODELS
- Type:
bool
- Default:
True
- Description: Enables or disables evaluation arena models.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_MESSAGE_RATING
- Type:
bool
- Default:
True
- Description: Enables message rating feature.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_COMMUNITY_SHARING
- Type:
bool
- Default:
True
- Description: Controls whether users are shown the share to community button.
- Persistence: This environment variable is a
PersistentConfig
variable.
Tags Generation
ENABLE_TAGS_GENERATION
- Type:
bool
- Default:
True
- Description: Enables or disables tag generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
TAGS_GENERATION_PROMPT_TEMPLATE
- Type:
str
- Default: The value of
DEFAULT_TAGS_GENERATION_PROMPT_TEMPLATE
environment variable.
DEFAULT_TAGS_GENERATION_PROMPT_TEMPLATE
:
### Task:
Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.
### Guidelines:
- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)
- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation
- If content is too short (less than 3 messages) or too diverse, use only ["General"]
- Use the chat's primary language; default to English if multilingual
- Prioritize accuracy over specificity
### Output:
JSON format: { "tags": ["tag1", "tag2", "tag3"] }
### Chat History:
<chat_history>
{{MESSAGES:END:6}}
</chat_history>
- Description: Sets the prompt template for tag generation.
- Persistence: This environment variable is a
PersistentConfig
variable.
API Key Endpoint Restrictions
ENABLE_API_KEY
- Type:
bool
- Default:
True
- Description: Enables API key authentication.
- Persistence: This environment variable is a
PersistentConfig
variable.
ENABLE_API_KEY_ENDPOINT_RESTRICTIONS
- Type:
bool
- Default:
False
- Description: Enables API key endpoint restrictions for added security and configurability.
- Persistence: This environment variable is a
PersistentConfig
variable.
API_KEY_ALLOWED_ENDPOINTS
- Type:
str
- Description: Specifies a comma-separated list of allowed API endpoints when API key endpoint restrictions are enabled.
- Persistence: This environment variable is a
PersistentConfig
variable.
The value of API_KEY_ALLOWED_ENDPOINTS
should be a comma-separated list of endpoint URLs, such as /api/v1/messages, /api/v1/channels
.
JWT_EXPIRES_IN
- Type:
str
- Default:
-1
- Description: Sets the JWT expiration time in seconds. Valid time units:
s
,m
,h
,d
,w
or-1
for no expiration. - Persistence: This environment variable is a
PersistentConfig
variable.
Setting JWT_EXPIRES_IN
to -1
disables JWT expiration, making issued tokens valid forever. This is extremely dangerous in production and exposes your system to severe security risks if tokens are leaked or compromised.
Always set a reasonable expiration time (e.g., 3600s
, 1h
, etc.) in production to limit the lifespan of authentication tokens. Never use -1
in a production environment.
If you have already deployed with JWT_EXPIRES_IN=-1
, you can rotate or change your WEBUI_SECRET_KEY
to immediately invalidate all existing tokens.
Security Variables
ENABLE_FORWARD_USER_INFO_HEADERS
- type:
bool
- Default:
False
- Description: Forwards user information (name, ID, email, role and chat-id) as X-headers to OpenAI API and Ollama API.
If enabled, the following headers are forwarded:
X-OpenWebUI-User-Name
X-OpenWebUI-User-Id
X-OpenWebUI-User-Email
X-OpenWebUI-User-Role
X-OpenWebUI-Chat-Id
ENABLE_WEB_LOADER_SSL_VERIFICATION
- Type:
bool
- Default:
True
- Description: Bypass SSL Verification for RAG on Websites.
- Persistence: This environment variable is a
PersistentConfig
variable.
WEBUI_SESSION_COOKIE_SAME_SITE
- Type:
str
- Options:
lax
- Sets theSameSite
attribute to lax, allowing session cookies to be sent with requests initiated by third-party websites.strict
- Sets theSameSite
attribute to strict, blocking session cookies from being sent with requests initiated by third-party websites.none
- Sets theSameSite
attribute to none, allowing session cookies to be sent with requests initiated by third-party websites, but only over HTTPS.
- Default:
lax
- Description: Sets the
SameSite
attribute for session cookies.
When ENABLE_OAUTH_SIGNUP
is enabled, setting WEBUI_SESSION_COOKIE_SAME_SITE
to strict
can cause login failures. This is because Open WebUI uses a session cookie to validate the callback from the OAuth provider, which helps prevent CSRF attacks.
However, a strict
session cookie is not sent with the callback request, leading to potential login issues. If you experience this problem, use the default lax
value instead.
WEBUI_SESSION_COOKIE_SECURE
- Type:
bool
- Default:
False
- Description: Sets the
Secure
attribute for session cookies if set toTrue
.
WEBUI_AUTH_COOKIE_SAME_SITE
- Type:
str
- Options:
lax
- Sets theSameSite
attribute to lax, allowing auth cookies to be sent with requests initiated by third-party websites.strict
- Sets theSameSite
attribute to strict, blocking auth cookies from being sent with requests initiated by third-party websites.none
- Sets theSameSite
attribute to none, allowing auth cookies to be sent with requests initiated by third-party websites, but only over HTTPS.
- Default:
lax
- Description: Sets the
SameSite
attribute for auth cookies.
If the value is not set, WEBUI_SESSION_COOKIE_SAME_SITE
will be used as a fallback.
WEBUI_AUTH_COOKIE_SECURE
- Type:
bool
- Default:
False
- Description: Sets the
Secure
attribute for auth cookies if set toTrue
.
If the value is not set, WEBUI_SESSION_COOKIE_SECURE
will be used as a fallback.
WEBUI_AUTH
- Type:
bool
- Default:
True
- Description: This setting enables or disables authentication.
If set to False
, authentication will be disabled for your Open WebUI instance. However, it's
important to note that turning off authentication is only possible for fresh installations without
any existing users. If there are already users registered, you cannot disable authentication
directly. Ensure that no users are present in the database if you intend to turn off WEBUI_AUTH
.
WEBUI_SECRET_KEY
- Type:
str
- Default:
t0p-s3cr3t
- Docker Default: Randomly generated on first start
- Description: Overrides the randomly generated string used for JSON Web Token.
When deploying Open WebUI in a multi-node/worker cluster with a load balancer, you must ensure that the WEBUI_SECRET_KEY value is the same across all instances in order to enable users to continue working if a node is recycled or their session is transferred to a different node. Without it, they will need to sign in again each time the underlying node changes.
ENABLE_VERSION_UPDATE_CHECK
- Type:
bool
- Default:
True
- Description: When enabled, the application makes automatic update checks and notifies you about version updates.
If OFFLINE_MODE
is enabled, this ENABLE_VERSION_UPDATE_CHECK
flag is always set to false
automatically.