[GH-ISSUE #1180] issue: Web search configuration broken in pip/venv install: wrong DB key, wrong env var names in docs #155

Closed
opened 2026-10-18 14:09:28 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @arassel on GitHub (Apr 12, 2026).
Original GitHub issue: https://github.com/open-webui/docs/issues/1180

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

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:

  • ENABLE_RAG_WEB_SEARCH
  • RAG_WEB_SEARCH_ENGINE

The actual variable names in config.py are:

  • ENABLE_WEB_SEARCH (line 3029)
  • WEB_SEARCH_ENGINE (line 3035)
  • SEARXNG_QUERY_URL (line 3130)

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

  1. Fresh pip install of open-webui 0.8.12
  2. Enable web search in Admin Panel → Settings → Models → Model Capabilities
  3. Save
  4. curl http://127.0.0.1:8080/api/config | python3 -m json.tool | grep web_search
    → enable_web_search absent from response
  5. sqlite3 webui.db "SELECT json_extract(data, '$.ENABLE_WEB_SEARCH') FROM config LIMIT 1;"
    → empty result despite setting appearing enabled in UI

Steps to reproduce Bug 2

  1. Follow official SearXNG setup guide at
    https://docs.openwebui.com/features/chat-conversations/web-search/providers/searxng/
  2. Set ENABLE_RAG_WEB_SEARCH=true and RAG_WEB_SEARCH_ENGINE=searxng as documented
  3. Attempt web search
  4. Error: "No search engine API key found in environment variables"
  5. grep config.py for ENABLE_RAG_WEB_SEARCH → not found

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.

Originally created by @arassel on GitHub (Apr 12, 2026). Original GitHub issue: https://github.com/open-webui/docs/issues/1180 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### 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: - ENABLE_RAG_WEB_SEARCH - RAG_WEB_SEARCH_ENGINE The actual variable names in config.py are: - ENABLE_WEB_SEARCH (line 3029) - WEB_SEARCH_ENGINE (line 3035) - SEARXNG_QUERY_URL (line 3130) 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=<query>" ### Steps to Reproduce ## Steps to reproduce Bug 1 1. Fresh pip install of open-webui 0.8.12 2. Enable web search in Admin Panel → Settings → Models → Model Capabilities 3. Save 4. curl http://127.0.0.1:8080/api/config | python3 -m json.tool | grep web_search → enable_web_search absent from response 5. sqlite3 webui.db "SELECT json_extract(data, '$.ENABLE_WEB_SEARCH') FROM config LIMIT 1;" → empty result despite setting appearing enabled in UI ## Steps to reproduce Bug 2 1. Follow official SearXNG setup guide at https://docs.openwebui.com/features/chat-conversations/web-search/providers/searxng/ 2. Set ENABLE_RAG_WEB_SEARCH=true and RAG_WEB_SEARCH_ENGINE=searxng as documented 3. Attempt web search 4. Error: "No search engine API key found in environment variables" 5. grep config.py for ENABLE_RAG_WEB_SEARCH → not found ### 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.
bsakaguchi 2026-10-18 14:09:28 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@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

<!-- gh-comment-id:4232825179 --> @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
Author
Owner

@arassel commented on GitHub (Apr 13, 2026):

ok about bug2... but what about bug1?

<!-- gh-comment-id:4235747802 --> @arassel commented on GitHub (Apr 13, 2026): ok about bug2... but what about bug1?
Author
Owner

@Classic298 commented on GitHub (Apr 13, 2026):

cannot reproduce 1

<!-- gh-comment-id:4235866249 --> @Classic298 commented on GitHub (Apr 13, 2026): cannot reproduce 1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/docs#155
No description provided.