Open WebUI web search with SearXNG

Teams that want chat answers grounded in current web pages can run SearXNG inside their own network instead of paying per query for a hosted search API. This page covers the setup, what you own and where the connection breaks.

On this page

Adding Open WebUI web search with SearXNG instead of a paid search API

A team that wants models to answer with current web results often reaches first for a hosted search API, but that choice brings per-query fees and sends every search string to a third party. **Self-hosting SearXNG, a metasearch service you run inside your own network, is the alternative this section covers.** SearXNG aggregates results from several upstream search engines and returns them through its own interface and API, so Open WebUI can call your instance for web search instead of a paid provider. The query traffic then stays within infrastructure you control, although the upstream engines SearXNG queries still receive the search terms.

Open WebUI supports this as a web search provider option in its admin settings, and the integration path is documented in the Open WebUI features documentation linked from the sources for this page. Confirm the exact setting names, the required SearXNG output format and any environment variables against that documentation for the release you run, because web search configuration has changed between releases and the names used in older guides may no longer match. Check that your SearXNG instance has the JSON response format enabled, since Open WebUI depends on it, and confirm whether the release in use requires any particular result count or safe search setting.

Before you enable it, decide which users may trigger web search, whether it runs by default or only when a user switches it on, and how the outbound connection from the Open WebUI server to SearXNG and from SearXNG to its upstream engines is allowed through your egress rules. These decisions determine what leaves your network, so record them alongside the configuration. The sections below cover the build steps, the trade-offs against hosted providers such as Brave or Tavily, and the checks to run after rollout.

What a SearXNG search backend needs before you connect it

Web search in Open WebUI depends on several components being in place before any configuration begins. Each card below is a prerequisite that must be confirmed on the Open WebUI server, the SearXNG host, and the network path between them.

A running Open WebUI release

Start from the current release line, v0.12.x, which the project publishes on its GitHub releases page. Confirm the exact version you run, because search settings and admin screens change between releases. Record the version in your change ticket so a later upgrade can be tested against the same baseline. Before you change anything, confirm that the web search settings are visible to an administrator account in your test instance.

Latest release cited
v0.12.3
Open WebUI releases

A SearXNG instance reachable from Open WebUI

Open WebUI calls SearXNG over HTTP, so the Open WebUI server, or the container running it, must be able to reach the SearXNG address and port. Confirm this with a request from the Open WebUI host, not from your workstation. Container networks often differ from the host network, so test from inside the same network namespace Open WebUI uses. Decide whether SearXNG sits on the same private segment or behind a proxy.

Output formats enabled in SearXNG

Open WebUI expects SearXNG to return machine-readable results, which is a setting in the SearXNG configuration rather than a default you can assume. Check the SearXNG documentation for the search output formats the instance must enable and for the exact request parameters your Open WebUI version sends. Confirm this by querying the instance directly and checking that the response is structured, not an HTML page.

Outbound access to upstream engines

SearXNG does not index the web itself. It forwards queries to the upstream search engines you enable, so the SearXNG host needs outbound access to those engines. Firewalls, egress proxies and DNS policies in regulated networks often block this path. List the engines you plan to enable, confirm the egress rules that permit them, and check the SearXNG logs for failed engine requests after deployment.

TLS on internal endpoints

Queries sent to SearXNG can contain user prompts and business context, so the connection between Open WebUI and SearXNG should be encrypted when it crosses a network boundary. Decide whether to terminate TLS at SearXNG, at a reverse proxy, or at a service mesh, and confirm that Open WebUI trusts the certificate chain your internal certificate authority issues. Test the connection with the certificate verification setting left on.

Ownership and rate limit planning

Assign an owner for the SearXNG host who handles patching, configuration changes and upstream engine failures, since no hosted provider will do this for you. Ask your team to confirm how often the upstream engines block or throttle the instance and who responds when results degrade. Settle these responsibilities before users depend on web search in daily work.

How a chat query reaches SearXNG and returns to the model

The diagram starts with a user prompt in Open WebUI, which decides whether a search is needed and sends the query to the SearXNG endpoint. SearXNG, running on a host you control, fans the query out to upstream engines through that host's outbound connection, and the results come back as a list of titles, URLs and snippets. Open WebUI passes that result text into the model context, where the model writes an answer with cited sources. Check the outbound boundary, since the upstream engines are the point where your queries leave your network, and treat result text as untrusted input to the model.

Search queries leave the company network only through the SearXNG host.

Connecting Open WebUI to a SearXNG instance step by step

This sequence takes a self-hosted SearXNG instance from a working search endpoint to a verified, citation-backed web search result inside Open WebUI. Each step ends with a check so you know whether to move on or fix the layer below.

  1. Deploy or select the SearXNG instance

    Decide whether SearXNG runs on the same host as Open WebUI, in the same Compose network, or on a separate internal service that your team already operates. Record its internal base URL, the port it listens on, and who owns its configuration and updates. Keep it on a network segment that only Open WebUI and your administrators can reach, because the search instance will make outbound requests on behalf of users. Done when you have a single base URL written down and an owner named for it.

  2. Confirm the JSON output format is enabled

    Open the SearXNG settings file and confirm that the JSON format is listed among the enabled output formats. Open WebUI reads search results from that format, so an instance that only serves HTML will return nothing useful. Restart SearXNG after any change. Check the result by requesting the search endpoint with a query parameter and the JSON format parameter, then confirm the response parses as JSON and contains a results list. If it returns an HTML page or an error, fix the format setting before continuing.

  3. Query the SearXNG endpoint from the Open WebUI container

    Run the same JSON query from inside the Open WebUI container, or from the host that runs it, using the base URL recorded in the first step. Running the request from the container matters because Docker networking, DNS and proxy settings often differ from your workstation. The check passes when the response is HTTP 200, the body is JSON, and the results include titles, URLs and snippets. If the request fails from the container but works on the host, the problem is network reachability or name resolution, not SearXNG itself.

  4. Enter the instance URL in the web search settings

    Sign in to Open WebUI as an administrator and open the admin settings area for web search. Select SearXNG as the engine and enter the query URL that your features documentation describes, using the exact setting names shown there for your release, since names can change between versions. Save the configuration, then confirm the settings persisted by reloading the page. Done when the saved URL matches the one you tested in the previous step, character for character, including the placeholder for the query.

  5. Enable web search for a test account

    Create or pick a non-administrator test account that belongs to the group you plan to use for rollout. Confirm in the admin settings that web search is allowed for that group, and that the test account can see the web search control in a new chat. Keep the test account separate from administrator accounts so you can confirm that permissions apply to regular users. Done when the test user sees the control and an administrator sees the same option enabled in their own chat.

  6. Run a test query and inspect the results

    From the test account, start a new chat, turn on web search for that message, and ask a question with a known current answer that a public source can confirm. Watch whether Open WebUI reports that it searched, then read the retrieved sources. The check passes when the answer references the search results and the sources shown match the pages your own browser finds for the same question. If the model answers without searching, check the group permission and the per-chat toggle. If the search fails, return to the container query and the server logs.

  7. Verify citations and record the working configuration

    Open the citations attached to the answer and select two or three of them to confirm each link opens the page the model cited. Check that the cited statements appear on those pages, since a citation that does not support the claim is a failure you need to investigate before rollout. Finally, save the working base URL, setting names, Open WebUI version and SearXNG version in your change record. Done when the citations resolve, the claims match the sources, and the configuration is documented for the next upgrade or restart.

Which Open WebUI search settings map to which SearXNG parameters

This table maps each Open WebUI web search setting to the SearXNG setting or request parameter it depends on, and shows who controls the value. Use it as a checklist for your instance, and confirm each Open WebUI setting name and default against the documentation for your release. The main takeaway is that several controls live in SearXNG's own configuration, so a change made only in Open WebUI may have no effect.

Open WebUI settingSearXNG parameter or setting it depends onWho controls the valueWhat to confirm in release notes or documentation
Search engine selectionEngines enabled in the SearXNG settings file; the engines request parameter if Open WebUI sends oneInstance operator and Open WebUI adminWhether Open WebUI sends an engines value or uses only the instance's enabled engines
Result countResults returned per page by SearXNG, plus the pageno parameter for later pagesOpen WebUI adminWhether Open WebUI caps results on its side and how many it keeps per query
Language or regionThe language request parameter, with search.default_lang in the SearXNG settings file as fallbackOpen WebUI admin sets the defaultWhether Open WebUI forwards a language value or relies on the SearXNG default
Safe searchThe safesearch request parameter (0, 1 or 2) and search.safe_search in the SearXNG settings fileOpen WebUI admin, if exposed; otherwise instance operatorWhether a Open WebUI control exists, which value it sends and the default level
Request timeoutoutgoing.request_timeout and per-engine timeouts in SearXNG, separate from Open WebUI's own timeoutInstance operatorWhich timeout a slow engine hits first and the exact Open WebUI timeout setting name
Response formatThe json format must be listed under search.formats in the SearXNG settings fileInstance operatorThat JSON output is enabled, because Open WebUI cannot read results without it
On by default or chosen per chatNo SearXNG parameter; governed by the Open WebUI web search enable setting and the per-chat toggleOpen WebUI admin sets the default; users toggle per chatWhether the default applies to new chats and whether users can switch search off per message
Time range and categoriesThe time_range and categories request parametersInstance operator, if Open WebUI forwards themWhether Open WebUI sends these parameters at all; assume they are not exposed until confirmed

How SearXNG compares with hosted search APIs such as Brave and Tavily

SearXNG is a metasearch engine you run yourself. It sends queries to upstream search engines on your behalf and returns aggregated results to Open WebUI. There is no per-query fee to the search service itself, so your main costs are the compute and storage for the instance, the staff time to run it, and the bandwidth and any proxy or egress services you add. Those costs grow more slowly with query volume than a metered API, but they do not disappear.

  • Who pays: Your organization pays for hosting and operations. Costs are mostly fixed and recurring, plus the one-time setup work.
  • Where queries go: Query text leaves your network only as requests to the upstream engines you enable. Your provider does not receive a copy of the query through a contract with a search API vendor.
  • Control over engines and results: You choose which engines, categories and languages are enabled, and you can tune ranking and blocking. Result quality depends on upstream engines that can change or throttle requests without notice.
  • Rate limits and availability: Upstream engines may block or rate-limit a shared server IP. Plan for proxies, caching and fallback engines, and confirm current behavior with the engines you enable.
  • Ongoing work: Someone must apply updates, monitor engine failures, rotate blocked addresses and review enabled engines for licensing and data terms.

Before choosing this option, confirm the upstream engine terms your organization accepts and estimate your own query volume against the hosting and staff time you can commit.

What you take on when search runs inside your network

Running SearXNG yourself replaces a per-query API contract with an operational service that your team owns. You avoid a metered dependency on a search vendor and keep the text of user queries inside your own infrastructure, which matters when prompts contain customer names, case details or internal project codes. In exchange, the SearXNG host becomes part of your production estate. Someone must patch it, monitor it, size it for the number of chat sessions that trigger searches, and decide who is paged when results stop arriving. Ask whether your platform team already runs a similar internal service, because the operating model is the real cost, not the software itself.

The outbound path is where most of the work hides. SearXNG does not index the web; it forwards each query to upstream engines and aggregates what they return. That means the host needs reliable egress to those engines, a decision on which engines are enabled, and an acceptance of their rate limits and terms. Engines change their HTML, throttle IP addresses that send automated traffic, or block data-center ranges, and a previously working setup can degrade without any change on your side. Plan monitoring that alerts on empty or failed result sets, keep a documented way to disable or replace a failing engine, and confirm with your network team which egress routes, proxies or allow-lists the service needs. Check the SearXNG project documentation for the current engine list and configuration options before you commit to a design.

Result quality depends directly on the engines you enable, their language and region settings, and the categories you search. A hosted API with a fixed index may give more consistent answers for some questions, while a federated setup may be better or worse depending on the topics your staff ask about. Do not assume parity with a hosted provider. Before rollout, build a short test set from real questions your teams would ask, including current events, technical documentation and questions in the languages you support, then compare the answers and cited sources the model produces with search on and off. Record which engines produced the useful results, and repeat the test after every engine change or SearXNG upgrade.

Hardening the search path and outbound requests

Web search adds two paths the rest of an Open WebUI deployment does not have: a server-side request from Open WebUI to SearXNG, and SearXNG's own requests out to search engines and the pages they return. The controls below cover who can trigger searches, where the SearXNG endpoint lives, what it may reach, how returned text is handled and how both services are kept current. Confirm each one against the Open WebUI and SearXNG versions you run, because settings and options change between releases.

Restrict web search by group

Web search should be enabled for the users and groups that need it, not for every account by default. Use Open WebUI's role-based access control with groups to decide who can turn search on in a chat. Confirm in your version where the web search toggle is governed (global setting, per-user permission or per-model setting) and test with a non-admin account that has no search permission. Record the mapping in the same access review you use for other tools.

Open WebUI features

Keep the SearXNG endpoint internal

Run SearXNG on a private network segment reachable only from the Open WebUI service, not from user devices or the public internet. Where your SearXNG version supports it, require an authentication layer in front of the instance, such as a reverse proxy with credentials or mutual TLS, and confirm that Open WebUI can send those credentials. If the platform cannot authenticate, restrict access with network allow-listing at the host or firewall level and test that an unrelated client is refused.

Limit SearXNG egress to engines in use

SearXNG queries the upstream engines you enable in its configuration. Enable only the engines your users need and block outbound connections from the SearXNG host to everything else, so a compromised or misconfigured instance cannot use your server as a general egress point. Confirm the engine list after each upgrade, because new engines and defaults can appear in release notes, and verify egress with a test from the host.

Treat search results as untrusted input

Page text returned by search is written by third parties and can contain instructions aimed at the model, a pattern usually called prompt injection. Assume returned content may try to change the model's behavior, leak the conversation, or request further actions. Keep search results away from any tool that can act on systems, limit which tools a search-enabled model can call, and test with pages that carry injected instructions before you approve the setup.

Log searches without retaining prompts

Searches are outbound disclosures of what users asked, so they belong in your audit trail, but the full prompt may contain personal or confidential data. Decide which fields to log (user, time, result count, engine) and whether the query text is stored, then set log levels and retention to match your policy. Confirm in Open WebUI and SearXNG which log settings control query text, and check that reverse proxy and container logs do not capture it anyway.

Test and pin updates on both services

Open WebUI and SearXNG should move on a documented update cycle: read the release notes, test search in a staging copy with your configuration, then promote. Pin image versions instead of tracking latest, and keep a rollback path for the previous version. Recheck the endpoint, authentication, engine list and group permissions after each change, since any of them can reset during an upgrade.

Open WebUI releases

Why SearXNG search returns empty results, times out or gets blocked

This table pairs each common SearXNG failure in Open WebUI with its likely cause and a fix you can verify on the host or in the logs. Work down the rows in order, since a network or format problem hides every symptom after it. Most empty or failed searches trace back to one of these six causes.

SymptomLikely causeFix
Open WebUI reports the search engine is unreachableThe SearXNG URL is set to localhost or a host name that resolves only on the host, not inside the Open WebUI containerFrom inside the Open WebUI container, run curl against the SearXNG URL. Use a container network name or host address reachable from that container, and confirm the port is published or shared on the same network.
Searches return an error or no results, and the SearXNG page loads in a browserSearXNG does not have the JSON output format enabled, so it returns HTML that Open WebUI cannot parseRequest the search endpoint with format=json from the host. If the response is HTML, enable the json format in the SearXNG settings file and restart the container.
Some engines return no results or CAPTCHA pages in the SearXNG logsUpstream engines rate-limit or block the SearXNG server's IP addressCheck SearXNG logs for suspended engine messages. Reduce query volume, disable the blocked engines, or route outbound traffic through an approved egress address if your policy allows it.
Searches hang, then fail with a timeout message in Open WebUISlow upstream engines or too few SearXNG workers under concurrent chat useTime a single JSON query from the host. Identify slow engines in the logs, disable or lower their priority, and check CPU and memory on the SearXNG host during a test burst.
Results are off-topic, in the wrong language or drawn from unexpected sourcesEngine selection or language settings in the SearXNG configuration do not match your users' needsCompare the same query in the SearXNG web interface and the JSON output. Set a default language, select engines by category, and review the enabled engine list with the team.
Admins get results but regular users get none or see no search optionOpen WebUI group or permission settings do not grant regular users access to web search, or the feature is toggled only for admin accountsSign in as a standard user and check the user's group permissions and chat feature settings in Open WebUI. Compare the user's role with an admin account and confirm the web search toggle is enabled for that group.

What buyers ask about cost, effort and time for SearXNG search

What drives the cost of adding SearXNG search to Open WebUI?

The cost has three parts: the internal effort to deploy and run a SearXNG instance, the team time for testing and security review, and ongoing maintenance. Hosted search APIs such as Brave or Tavily charge per query, so their cost grows with usage. A self-hosted instance has no per-query fee, but you pay in people and infrastructure instead. Deployment work is largely one-time: hosting, configuration, enabling search in Open WebUI and checking results. Maintenance recurs: keeping SearXNG and Open WebUI updated, reviewing which engines are enabled, and watching outbound traffic. Ask any quote to separate these lines, state who pays for each, and say which items recur after handover.

How long does a SearXNG search setup take?

The duration depends on your environment and approval steps more than on the software itself. The main variables are where SearXNG will run, whether a network path from Open WebUI to the instance needs firewall changes, how outbound requests to search engines are approved by your security team, and how many test cases your owners want to sign off. Before planning dates, confirm the hosting target, the change process for new services, and who must approve outbound traffic. We do not quote a fixed duration without those facts, because each of them can add or remove weeks in a regulated environment.

What does our team need to provide for the work?

Plan to provide four things. First, network access: Open WebUI must reach the SearXNG instance, and the instance must reach the upstream search engines it is configured to use. Second, a hosting target such as a virtual machine, container platform or Kubernetes cluster that you control. Third, a named owner for search settings, including enabled engines, result limits and any safe-search policy. Fourth, access to test accounts with the roles your users hold, so results can be checked for each group. Your security team should also be ready to review the outbound request path and logging before go-live.

Can our internal team set up SearXNG search without outside help?

A capable platform team with container, reverse proxy and Open WebUI administration experience can usually do the technical setup alone. The harder parts are often operational: defining which search engines are allowed, handling outbound traffic approvals, testing answers for quality, and documenting the configuration so it survives staff changes. Check whether your team has time for a security review of outbound requests and for ongoing updates to both SearXNG and Open WebUI. If those tasks are covered, an internal build is a reasonable choice. If not, a partner can take on the build and handover in a defined scope.

How does DeployOpen scope a SearXNG engagement?

Most DeployOpen engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts. For this integration, the written scope typically covers the hosting target, the SearXNG configuration and engine list, the Open WebUI connection, the test cases for each user group, the security review of outbound requests and logging, and the handover documentation. Anything outside that list, such as additional tool integrations or a change to the hosting platform, is handled as a written change. Ask for the scope document to state exactly what is excluded before you sign.

What should we check before comparing SearXNG with a hosted search API?

Compare total ownership rather than the monthly invoice from a hosted provider. Hosted APIs bring predictable integration effort and a vendor-managed index, but their per-query fees scale with use, and you must review their data terms for queries sent to them. A self-hosted SearXNG keeps query routing under your control and removes per-query fees, but it adds hosting, updates and an outbound security review. Ask each provider for current pricing in writing, confirm the data handling terms your compliance team requires, and estimate usage from your own logs. Those inputs decide which option costs less for your organization.

How DeployOpen scopes and delivers the SearXNG search integration

DeployOpen plans, builds, tests and documents the SearXNG search integration for Open WebUI inside infrastructure you control. Work starts from a written scope that names the search engines, network paths and users involved, so your security and platform teams can review every outbound request before it goes live.

How we scope

  • Confirm which Open WebUI deployment and user groups will use web search and how many users are expected.
  • Map the outbound network path from Open WebUI to SearXNG and to the upstream engines it queries.
  • Agree in writing which SearXNG hosting, access controls, logging and retrieval limits are in scope.

How we build

  • Deploy SearXNG on infrastructure you control and connect it to Open WebUI through its configured search settings.
  • Restrict which engines are enabled and test that query text and results behave as the approved scope describes.
  • Verify that Open WebUI reaches SearXNG only through the agreed route and that failures degrade cleanly for users.

How we hand over

  • Deliver configuration records, network rules, runbooks and a test record your teams can review and reuse.
  • Walk through the outbound data flow so compliance and security reviewers can see what leaves your environment.
  • Document the upgrade steps for both Open WebUI and SearXNG, including what to recheck after each change.

How we support

  • Offer ongoing support, upgrades and continuous testing for the search integration as a retainer.
  • Retest the integration after Open WebUI or SearXNG upgrades and after changes to engine or network settings.
  • Confirm the support terms, response expectations and exclusions in the written scope before work begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.