mirror of
https://github.com/open-webui/docs.git
synced 2026-11-05 01:38:13 +00:00
[GH-ISSUE #1180] issue: Web search configuration broken in pip/venv install: wrong DB key, wrong env var names in docs #155
Labels
No labels
bug
documentation
documentation
duplicate
enhancement
enhancement
good first issue
good first issue
good first issue
help wanted
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/docs#155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @arassel on GitHub (Apr 12, 2026).
Original GitHub issue: https://github.com/open-webui/docs/issues/1180
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
Open WebUI Version: 0.8.12
Ollama Version (if applicable)
Ollama: 0.6.14
Operating System
Ubuntu 24.04 (TUXEDO OS)
Browser (if applicable)
Chromium
Confirmation
README.md.Expected Behavior
Bug 1: ENABLE_WEB_SEARCH not persisted correctly by Admin UI
Bug 2: Environment variable names in documentation do not match source code
Actual Behavior
Bug 1: ENABLE_WEB_SEARCH not persisted correctly by Admin UI
When enabling web search through Admin Panel → Settings → Models → Model Capabilities,
the setting is saved nested inside a sub-object in the database rather than at the
top-level key $.ENABLE_WEB_SEARCH where the code looks for it.
Result: /api/config never returns enable_web_search: true, the web search toggle
never appears in the chat interface, and setting the environment variable
ENABLE_WEB_SEARCH=true is overridden by the broken database value.
Verified by:
sqlite3 webui.db "SELECT json_extract(data, '$.ENABLE_WEB_SEARCH') FROM config LIMIT 1;"
→ returns empty (key missing at top level)
sqlite3 webui.db "SELECT data FROM config LIMIT 1;" | grep web_search
→ shows web_search: true nested inside a sub-object
Workaround: ENABLE_PERSISTENT_CONFIG=false forces environment variables to be used.
Bug 2: Environment variable names in documentation do not match source code
The official documentation, the SearXNG setup guide, and all community resources
consistently reference:
The actual variable names in config.py are:
ENABLE_RAG_WEB_SEARCH and RAG_WEB_SEARCH_ENGINE do not exist in config.py.
Following the official documentation therefore results in complete failure with
the error: "No search engine API key found in environment variables"
Working workaround (gowebui.sh)
export ENABLE_PERSISTENT_CONFIG=false
export ENABLE_WEB_SEARCH=true
export WEB_SEARCH_ENGINE=searxng
export SEARXNG_QUERY_URL="http://127.0.0.1:8888/search?q="
Steps to Reproduce
Steps to reproduce Bug 1
→ enable_web_search absent from response
→ empty result despite setting appearing enabled in UI
Steps to reproduce Bug 2
https://docs.openwebui.com/features/chat-conversations/web-search/providers/searxng/
Logs & Screenshots
BUG1:
fastapi.exceptions.HTTPException: 400: No search engine API key found in environment variables
File "/home/arassel/open-webui-venv/lib/python3.12/site-packages/open_webui/routers/retrieval.py", line 2240, in process_web_search
raise HTTPException(
File "/home/arassel/open-webui-venv/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 1510, in chat_web_search_handler
results = await process_web_search(
BUG2:
$ curl -s http://127.0.0.1:8080/api/config | python3 -m json.tool | grep web_search
"enable_websocket": true,
(enable_web_search absent despite being enabled in Admin UI)
sqlite3 webui.db "SELECT json_extract(data, '.ENABLE_WEB_SEARCH') FROM config LIMIT 1;"(empty — key missing at top level)
$ grep -n "ENABLE_RAG_WEB_SEARCH" /home/arassel/open-webui-venv/lib/python3.12/site-packages/open_webui/config.py
(no output — variable does not exist)
$ grep -n "ENABLE_WEB_SEARCH|WEB_SEARCH_ENGINE|SEARXNG_QUERY" /home/arassel/open-webui-venv/lib/python3.12/site-packages/open_webui/config.py
3029:ENABLE_WEB_SEARCH = PersistentConfig(
3035:WEB_SEARCH_ENGINE = PersistentConfig(
3130:SEARXNG_QUERY_URL = PersistentConfig(
Additional Information
this analysis is the result of 6h trying to get web search SearXNG working with the help of Claude. I asked Claude for a summary to submit, then separated into the mandatory boxes above. Hope this helps!
In order to be able to submit, I had to check the Dockker log box, even though i did not use docker. so your submission form is somewhat buggy too.
@Classic298 commented on GitHub (Apr 12, 2026):
fixed naming in dev, this was changed a while ago and i didnt notice it so never updated it
@arassel commented on GitHub (Apr 13, 2026):
ok about bug2... but what about bug1?
@Classic298 commented on GitHub (Apr 13, 2026):
cannot reproduce 1