[GH-ISSUE #2824] 403 Error with websearch using searxng engine #28555

Closed
opened 2026-04-25 03:09:52 -05:00 by GiteaMirror · 20 comments
Owner

Originally created by @andrewginns on GitHub (Jun 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/2824

Bug Report

Description

Bug Summary:
Using searxng as the engine results in queries failing due to 403 errors

Steps to Reproduce:
Set web search engine to a searxng website e.g. https://searx.hu/search?q=

Expected Behavior:
Queries with web search turned on will result in responses including context from returned results.

Actual Behavior:
Sending the query results in a 403 error for the web search component.

403 Client Error: FORBIDDEN for url: https://search.hbubli.cc/search?q=When+will+it+rain+next+in+London%3F&format=json&pageno=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0

Environment

  • Open WebUI Version: 0.2.4

  • Ollama (if applicable): n/a

  • Operating System: MacOS client browser, docker host

  • Browser (if applicable): n/a

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
console.log

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots (if applicable):
image

Installation Method

Docker compose using ghcr.io/open-webui/open-webui:main

Additional Information

Applicable to all searxng instances.

Found a similar issue mentioned in https://github.com/open-webui/open-webui/issues/2717 but the fix seems applicable only to settings.yml when I only have a config.json in my /app/backend/data folder.

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @andrewginns on GitHub (Jun 4, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/2824 # Bug Report ## Description **Bug Summary:** Using searxng as the engine results in queries failing due to 403 errors **Steps to Reproduce:** Set web search engine to a searxng website e.g. https://searx.hu/search?q=<query> **Expected Behavior:** Queries with web search turned on will result in responses including context from returned results. **Actual Behavior:** Sending the query results in a 403 error for the web search component. ``` 403 Client Error: FORBIDDEN for url: https://search.hbubli.cc/search?q=When+will+it+rain+next+in+London%3F&format=json&pageno=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0 ``` ## Environment - **Open WebUI Version:** 0.2.4 - **Ollama (if applicable):** n/a - **Operating System:** MacOS client browser, docker host - **Browser (if applicable):** n/a ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [console.log](https://github.com/user-attachments/files/15568965/console.log) **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots (if applicable):** <img width="227" alt="image" src="https://github.com/open-webui/open-webui/assets/25386449/4edbcf38-3b31-4f17-8ef7-950437b686ff"> ## Installation Method Docker compose using `ghcr.io/open-webui/open-webui:main` ## Additional Information Applicable to all searxng instances. Found a similar issue mentioned in https://github.com/open-webui/open-webui/issues/2717 but the fix seems applicable only to `settings.yml` when I only have a `config.json` in my `/app/backend/data` folder. ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@cheahjs commented on GitHub (Jun 4, 2024):

Most public instances do not have JSON format enabled, the recommendation is to self host an instance if you want to use it.

<!-- gh-comment-id:2148178238 --> @cheahjs commented on GitHub (Jun 4, 2024): Most public instances do not have JSON format enabled, the recommendation is to self host an instance if you want to use it.
Author
Owner

@mdillondc commented on GitHub (Jun 4, 2024):

Example searxng config to enable JSON:

server:
  ...
ui:
  ...
redis:
  ...
general:
  ...
search:
  ...
  formats:
    - html
    - json
<!-- gh-comment-id:2148195114 --> @mdillondc commented on GitHub (Jun 4, 2024): Example searxng config to enable JSON: ``` server: ... ui: ... redis: ... general: ... search: ... formats: - html - json ```
Author
Owner

@justinh-rahb commented on GitHub (Jun 4, 2024):

Tutorial page is on docs now:
https://docs.openwebui.com/tutorial/web_search/

<!-- gh-comment-id:2148200675 --> @justinh-rahb commented on GitHub (Jun 4, 2024): Tutorial page is on docs now: https://docs.openwebui.com/tutorial/web_search/
Author
Owner

@andrewginns commented on GitHub (Jun 4, 2024):

Most public instances do not have JSON format enabled, the recommendation is to self host an instance if you want to use it.

Ah I see, thanks

Tutorial page is on docs now:
https://docs.openwebui.com/tutorial/web_search/

Will follow this, much appreciated!

<!-- gh-comment-id:2148211886 --> @andrewginns commented on GitHub (Jun 4, 2024): > Most public instances do not have JSON format enabled, the recommendation is to self host an instance if you want to use it. Ah I see, thanks > Tutorial page is on docs now: https://docs.openwebui.com/tutorial/web_search/ Will follow this, much appreciated!
Author
Owner

@sail1369 commented on GitHub (Jun 10, 2024):

I tried the fixes and followed the guide, at first with no luck, as i used the "3. Alternative: Docker Run", from the guide,
to make it work,
Step 1:
i went into the container and edited the settings file (/etc/searxng/settings.yml), for good measure i also did it in (/usr/local/searxng/searx/settings.yml) in both these files i added :
formats:
- html
- json #this line

Step 2:
set the websearch url as only the base url: http://localhost:8080/

hoping maybe this will help some people,
seems to work in my case, but no idea why

<!-- gh-comment-id:2157854682 --> @sail1369 commented on GitHub (Jun 10, 2024): I tried the fixes and followed the guide, at first with no luck, as i used the "3. Alternative: Docker Run", from the guide, to make it work, Step 1: i went into the container and edited the settings file (/etc/searxng/settings.yml), for good measure i also did it in (/usr/local/searxng/searx/settings.yml) in both these files i added : formats: - html - json #this line Step 2: set the websearch url as only the base url: http://localhost:8080/ hoping maybe this will help some people, seems to work in my case, but no idea why
Author
Owner

@rootcli commented on GitHub (Jul 12, 2024):

I've added all the settings that worked for me in discussions
Hope it helps

<!-- gh-comment-id:2225356957 --> @rootcli commented on GitHub (Jul 12, 2024): I've added all the settings that worked for me in [discussions](https://github.com/open-webui/open-webui/discussions/3827#discussion-6926731) Hope it helps
Author
Owner

@iplayfast commented on GitHub (Jul 29, 2024):

Not working for me. I even tried using public addresses eg https://searxng.site/ and got "too many requests" error. But I can access them through the browser. Looks to me like open-webui has problems.

<!-- gh-comment-id:2256891638 --> @iplayfast commented on GitHub (Jul 29, 2024): Not working for me. I even tried using public addresses eg https://searxng.site/ and got "too many requests" error. But I can access them through the browser. Looks to me like open-webui has problems.
Author
Owner

@justinh-rahb commented on GitHub (Jul 30, 2024):

Not working for me. I even tried using public addresses eg https://searxng.site/ and got "too many requests" error. But I can access them through the browser. Looks to me like open-webui has problems.

It doesn't if you follow the docs:
https://docs.openwebui.com/tutorial/web_search#searxng-docker

Specifically the settings.yml file must have json output format enabled:

search:
  safe_search: 0
  autocomplete: ""
  default_lang: ""
  formats:
    - html
    - json

Most public instances of SearXNG only have html format enabled, or restrict access to API usage.

<!-- gh-comment-id:2257267234 --> @justinh-rahb commented on GitHub (Jul 30, 2024): > Not working for me. I even tried using public addresses eg https://searxng.site/ and got "too many requests" error. But I can access them through the browser. Looks to me like open-webui has problems. It doesn't if you follow the docs: https://docs.openwebui.com/tutorial/web_search#searxng-docker Specifically the `settings.yml` file must have `json` output format enabled: ```yaml search: safe_search: 0 autocomplete: "" default_lang: "" formats: - html - json ``` Most public instances of SearXNG only have `html` format enabled, or restrict access to API usage.
Author
Owner

@fahadshery commented on GitHub (Aug 16, 2024):

formats:
- html
- json


Most public instances of SearXNG only have `html` format enabled, or restrict access to API usage.

This fixed it for me. Thank you!
just had to add - json under formats in the settings.yml file

<!-- gh-comment-id:2293101993 --> @fahadshery commented on GitHub (Aug 16, 2024): > formats: > - html > - json > ``` > > Most public instances of SearXNG only have `html` format enabled, or restrict access to API usage. This fixed it for me. Thank you! just had to add `- json` under formats in the `settings.yml` file
Author
Owner

@grimaldiss commented on GitHub (Aug 26, 2024):

where do i find settings.yml?

<!-- gh-comment-id:2310820166 --> @grimaldiss commented on GitHub (Aug 26, 2024): where do i find settings.yml?
Author
Owner

@rootcli commented on GitHub (Aug 27, 2024):

where do i find settings.yml?

https://github.com/open-webui/open-webui/issues/2824#issuecomment-2225356957
👆🏻

<!-- gh-comment-id:2311540545 --> @rootcli commented on GitHub (Aug 27, 2024): > where do i find settings.yml? https://github.com/open-webui/open-webui/issues/2824#issuecomment-2225356957 👆🏻
Author
Owner

@interzone2 commented on GitHub (Oct 7, 2024):

I've followed all instructions above but still get forbidden.

Relevant settings.yml :

formats:
   - html
   - json

server:
 # Is overwritten by ${SEARXNG_PORT} and ${SEARXNG_BIND_ADDRESS}
 port: 8080
 bind_address: "0.0.0.0"
 # public URL of the instance, to ensure correct inbound links. Is overwritten
 # by ${SEARXNG_URL}.
 base_url: http://138.68.159.187/search  # "http://example.com/location"
 # rate limit the number of request on the instance, block some bots.
 # Is overwritten by ${SEARXNG_LIMITER}
 limiter: true
 # enable features designed only for public instances.
 # Is overwritten by ${SEARXNG_PUBLIC_INSTANCE}
 public_instance: true

 # If your instance owns a /etc/searxng/settings.yml file, then set the following
 # values there.

 secret_key: "ccb1fe5de699f7a1589a1b11376da0ee9053006565bbb17fc2fbd2c01f5a0d72"  # Is overwritten by ${SEARXNG_SECRET}
 # Proxy image results through SearXNG. Is overwritten by ${SEARXNG_IMAGE_PROXY}
 image_proxy: false
 # 1.0 and 1.1 are supported
 http_protocol_version: "1.0"
 # POST queries are more secure as they don't show up in history but may cause
 # problems when using Firefox containers
 method: "GET"
 default_http_headers:
   X-Content-Type-Options: nosniff
   X-Download-Options: noopen
   X-Robots-Tag: noindex, nofollow
   Referrer-Policy: no-referrer

redis:
 # URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}.
 # https://docs.searxng.org/admin/settings/settings_redis.html#settings-redis
 url: redis://redis:6379/0

http://xxx.xx.xx.xx/search - is live

deno app attempting to communicate with searxng:

import { Readability } from "jsr:@paoramen/cheer-reader";

import ollama from "npm:ollama";
import * as cheerio from "npm:cheerio@1.0.0";

const searchUrl = Deno.env.get("SEARCH_URL");
const query = Deno.args.join(" ");



console.log(`Query: ${query}`);
const urls = await getNewsUrls(query);
const alltexts = await getCleanedText(urls);
await answerQuery(query, alltexts);

async function getNewsUrls(query: string) {
  try {
    const searchResults = await fetch(`${searchUrl}?q=${query}&format=json`);
    if (!searchResults.ok) {
      console.error('Error fetching search results:', searchResults.statusText);
      return [];
    }
    const contentType = searchResults.headers.get("content-type");
    if (contentType && contentType.includes("application/json")) {
      const searchResultsJson: { results: Array<{ url: string }> } = await searchResults.json();
      return searchResultsJson.results.map((result) => result.url).slice(0, 1);
    } else {
      console.error("Unexpected response type, expected JSON");
      console.error(await searchResults.text()); // Log the HTML response for debugging
      return [];
    }
  } catch (error) {
    console.error('Error during fetch:', error);
    return [];
  }
}


async function getCleanedText(urls: string[]) {
	const texts = [];
	for await (const url of urls) {
		const getUrl = await fetch(url);
		console.log(`Fetching ${url}`);
		const html = await getUrl.text();
		const text = htmlToText(html);
		texts.push(`Source: ${url}\n${text}\n\n`);
	}
	return texts;
}

function htmlToText(html: string) {
	const $ = cheerio.load(html);

  // Thanks to the comment on the YouTube video from @eliaspereirah for suggesting 
  // using Mozilla Readability. I used a variant that made it easier to use with 
  // cheerio. Definitely simplifies things
		const text = new Readability($).parse();

  // What I had before

	// $("script, source, style, head, img, svg, a, form, link, iframe").remove();
	// $("*").removeClass();
	// $("*").each((_, el) => {
	// 	if (el.type === "tag" || el.type === "script" || el.type === "style") {
	// 		for (const attr of Object.keys(el.attribs || {})) {
	// 			if (attr.startsWith("data-")) {
	// 				$(el).removeAttr(attr);
	// 			}
	// 		}
	// 	}
	// });
	// const text = $("body").text().replace(/\s+/g, " ");

	return text.textContent;
}

async function answerQuery(query: string, texts: string[]) {
	const result = await ollama.generate({
		model: "llama3.2:1b",
		prompt: `${query}. Summarize the information and provide an answer. Use only the information in the following articles to answer the question: ${texts.join("\n\n")}`,
		stream: true,
		options: {
			num_ctx: 16000,
		},
	});
	for await (const chunk of result) {
		if (chunk.done !== true) {
			await Deno.stdout.write(new TextEncoder().encode(chunk.response));
		}
	}
}

Search command: SEARCH_URL="http://xxx.xx.xx.xx/search" deno run --allow-net --allow-env --watch main.ts "breaking news"

Reply:

Watcher Process started.
SEARCH_URL: http://xxx.xx.xx.xx/search
Query: breaking news
Error fetching search results: Forbidden
However, I need the articles you're referring to. Please share the summaries or links to the articles, and I'll be happy to help summarize the information for your question.

No luck as yet! 
<!-- gh-comment-id:2395864756 --> @interzone2 commented on GitHub (Oct 7, 2024): I've followed all instructions above but still get forbidden. Relevant settings.yml : ``` formats: - html - json server: # Is overwritten by ${SEARXNG_PORT} and ${SEARXNG_BIND_ADDRESS} port: 8080 bind_address: "0.0.0.0" # public URL of the instance, to ensure correct inbound links. Is overwritten # by ${SEARXNG_URL}. base_url: http://138.68.159.187/search # "http://example.com/location" # rate limit the number of request on the instance, block some bots. # Is overwritten by ${SEARXNG_LIMITER} limiter: true # enable features designed only for public instances. # Is overwritten by ${SEARXNG_PUBLIC_INSTANCE} public_instance: true # If your instance owns a /etc/searxng/settings.yml file, then set the following # values there. secret_key: "ccb1fe5de699f7a1589a1b11376da0ee9053006565bbb17fc2fbd2c01f5a0d72" # Is overwritten by ${SEARXNG_SECRET} # Proxy image results through SearXNG. Is overwritten by ${SEARXNG_IMAGE_PROXY} image_proxy: false # 1.0 and 1.1 are supported http_protocol_version: "1.0" # POST queries are more secure as they don't show up in history but may cause # problems when using Firefox containers method: "GET" default_http_headers: X-Content-Type-Options: nosniff X-Download-Options: noopen X-Robots-Tag: noindex, nofollow Referrer-Policy: no-referrer redis: # URL to connect redis database. Is overwritten by ${SEARXNG_REDIS_URL}. # https://docs.searxng.org/admin/settings/settings_redis.html#settings-redis url: redis://redis:6379/0 ``` http://xxx.xx.xx.xx/search - is live deno app attempting to communicate with searxng: ``` import { Readability } from "jsr:@paoramen/cheer-reader"; import ollama from "npm:ollama"; import * as cheerio from "npm:cheerio@1.0.0"; const searchUrl = Deno.env.get("SEARCH_URL"); const query = Deno.args.join(" "); console.log(`Query: ${query}`); const urls = await getNewsUrls(query); const alltexts = await getCleanedText(urls); await answerQuery(query, alltexts); async function getNewsUrls(query: string) { try { const searchResults = await fetch(`${searchUrl}?q=${query}&format=json`); if (!searchResults.ok) { console.error('Error fetching search results:', searchResults.statusText); return []; } const contentType = searchResults.headers.get("content-type"); if (contentType && contentType.includes("application/json")) { const searchResultsJson: { results: Array<{ url: string }> } = await searchResults.json(); return searchResultsJson.results.map((result) => result.url).slice(0, 1); } else { console.error("Unexpected response type, expected JSON"); console.error(await searchResults.text()); // Log the HTML response for debugging return []; } } catch (error) { console.error('Error during fetch:', error); return []; } } async function getCleanedText(urls: string[]) { const texts = []; for await (const url of urls) { const getUrl = await fetch(url); console.log(`Fetching ${url}`); const html = await getUrl.text(); const text = htmlToText(html); texts.push(`Source: ${url}\n${text}\n\n`); } return texts; } function htmlToText(html: string) { const $ = cheerio.load(html); // Thanks to the comment on the YouTube video from @eliaspereirah for suggesting // using Mozilla Readability. I used a variant that made it easier to use with // cheerio. Definitely simplifies things const text = new Readability($).parse(); // What I had before // $("script, source, style, head, img, svg, a, form, link, iframe").remove(); // $("*").removeClass(); // $("*").each((_, el) => { // if (el.type === "tag" || el.type === "script" || el.type === "style") { // for (const attr of Object.keys(el.attribs || {})) { // if (attr.startsWith("data-")) { // $(el).removeAttr(attr); // } // } // } // }); // const text = $("body").text().replace(/\s+/g, " "); return text.textContent; } async function answerQuery(query: string, texts: string[]) { const result = await ollama.generate({ model: "llama3.2:1b", prompt: `${query}. Summarize the information and provide an answer. Use only the information in the following articles to answer the question: ${texts.join("\n\n")}`, stream: true, options: { num_ctx: 16000, }, }); for await (const chunk of result) { if (chunk.done !== true) { await Deno.stdout.write(new TextEncoder().encode(chunk.response)); } } } ``` Search command: `SEARCH_URL="http://xxx.xx.xx.xx/search" deno run --allow-net --allow-env --watch main.ts "breaking news"` Reply: ``` Watcher Process started. SEARCH_URL: http://xxx.xx.xx.xx/search Query: breaking news Error fetching search results: Forbidden However, I need the articles you're referring to. Please share the summaries or links to the articles, and I'll be happy to help summarize the information for your question. No luck as yet! ```
Author
Owner

@aayusharyan commented on GitHub (Nov 20, 2024):

Tutorial page is on docs now: https://docs.openwebui.com/tutorial/web_search/

This page is no longer there on the website. Instead following this URL - https://docs.openwebui.com/features/web_search
However, same issue.

<!-- gh-comment-id:2488221790 --> @aayusharyan commented on GitHub (Nov 20, 2024): > Tutorial page is on docs now: https://docs.openwebui.com/tutorial/web_search/ This page is no longer there on the website. Instead following this URL - https://docs.openwebui.com/features/web_search However, same issue.
Author
Owner

@magentaFire commented on GitHub (Dec 6, 2024):

I tried the fixes and followed the guide, at first with no luck, as i used the "3. Alternative: Docker Run", from the guide, to make it work, Step 1: i went into the container and edited the settings file (/etc/searxng/settings.yml), for good measure i also did it in (/usr/local/searxng/searx/settings.yml) in both these files i added : formats: - html - json #this line

Step 2: set the websearch url as only the base url: http://localhost:8080/

hoping maybe this will help some people, seems to work in my case, but no idea why

This worked for me with some variants:

  • I have my instances of searxng, ollama and open webui on WSL ubuntu 24.04
  • My WSL instance is configured for mirrored networking (https://learn.microsoft.com/en-us/windows/wsl/networking)
    I'd highlight that I needed to edit settings.yml files as above by entering in the docker container:
docker exec -it searxng sh
vi /etc/searxng/settings.yml 
// add -json line under "formats:"
// change bind_address: "0.0.0.0"  because I'm exposing my IP to my LAN through mirrored networking

Finally I added websearch url as only the base url: http://wsl-ip:3001/
and that works!!

BUT..... Also I don't know why 🫤

<!-- gh-comment-id:2522251317 --> @magentaFire commented on GitHub (Dec 6, 2024): > I tried the fixes and followed the guide, at first with no luck, as i used the "3. Alternative: Docker Run", from the guide, to make it work, Step 1: i went into the container and edited the settings file (/etc/searxng/settings.yml), for good measure i also did it in (/usr/local/searxng/searx/settings.yml) in both these files i added : formats: - html - json #this line > > Step 2: set the websearch url as only the base url: http://localhost:8080/ > > hoping maybe this will help some people, seems to work in my case, but no idea why This worked for me with some variants: * I have my instances of searxng, ollama and open webui on WSL ubuntu 24.04 * My WSL instance is configured for mirrored networking (https://learn.microsoft.com/en-us/windows/wsl/networking) I'd highlight that I needed to edit settings.yml files as above by entering in the docker container: ``` docker exec -it searxng sh vi /etc/searxng/settings.yml // add -json line under "formats:" // change bind_address: "0.0.0.0" because I'm exposing my IP to my LAN through mirrored networking ``` Finally I added websearch url as only the base url: http://wsl-ip:3001/ and that works!! BUT..... Also I don't know why 🫤
Author
Owner

@Atomique commented on GitHub (Dec 6, 2024):

I had the same problem, but already set anything suggested here. Problem was that I set the Base URL "correct". I set it to SEARXNG_BASE_URL=https://sub.domain.tld but this wasnt working with my open webui connecting to it. Its a bit weird. I changed to SEARXNG_BASE_URL=http://0.0.0.0:3001 in the container environment and also have set the following in my settings.yml:

# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
use_default_settings: true
server:
  # base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml
  secret_key: "<REDACTED>"  # change this!
  limiter: false  # can be disabled for a private instance
  image_proxy: true
  port: 8080
  bind_address: "0.0.0.0"

ui:
  static_use_hash: true

redis:
  url: redis://redis:6379/0

search:
  safe_search: 0
  autocomplete: ""
  default_lang: ""
  formats:
    - html
    - json
<!-- gh-comment-id:2523710499 --> @Atomique commented on GitHub (Dec 6, 2024): I had the same problem, but already set anything suggested here. Problem was that I set the Base URL "correct". I set it to SEARXNG_BASE_URL=https://sub.domain.tld but this wasnt working with my open webui connecting to it. Its a bit weird. I changed to SEARXNG_BASE_URL=http://0.0.0.0:3001 in the container environment and also have set the following in my settings.yml: ```yml # see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings use_default_settings: true server: # base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml secret_key: "<REDACTED>" # change this! limiter: false # can be disabled for a private instance image_proxy: true port: 8080 bind_address: "0.0.0.0" ui: static_use_hash: true redis: url: redis://redis:6379/0 search: safe_search: 0 autocomplete: "" default_lang: "" formats: - html - json ```
Author
Owner

@jaltgen commented on GitHub (Jan 18, 2025):

This will also depend on how you are hosting the rest of your containers @Atomique. If you set the Base URL to your FQDN this may lead to the local connection via the Docker network not working. I am not a dev on either project and have not reviewed the code to make sure, but generally speaking, if you only want to use searxng as a tool for Open Web UI, you may not need to give it a FQDN or expose a port, just make sure both containers are on a shared Docker network. Then, you can use the container name of searxng as the hostname in your query:

http://searxng:8080/

This ofc does not use TLS, however, searxng is not exposed outside of the specific Docker network. Given layered security, this to me is reasonably safe. To expose searxng you may then use a reverse proxy such as Traefik or Caddy, without the need to let searxng know its FQDN, as this will be handled by the proxy.

<!-- gh-comment-id:2600276066 --> @jaltgen commented on GitHub (Jan 18, 2025): This will also depend on how you are hosting the rest of your containers @Atomique. If you set the Base URL to your FQDN this *may* lead to the local connection via the Docker network not working. I am not a dev on either project and have not reviewed the code to make sure, but generally speaking, if you *only* want to use searxng as a tool for Open Web UI, you may not need to give it a FQDN *or* expose a port, just make sure both containers are on a shared Docker network. Then, you can use the container name of searxng as the hostname in your query: http://searxng:8080/ This ofc does not use TLS, however, searxng is not exposed outside of the specific Docker network. Given layered security, this to me is reasonably safe. To expose searxng you may then use a reverse proxy such as Traefik or Caddy, without the need to let searxng know its FQDN, as this will be handled by the proxy.
Author
Owner

@tjwebb commented on GitHub (Sep 2, 2025):

Tutorial page is on docs now:
https://docs.openwebui.com/tutorial/web_search/

This link is dead.

<!-- gh-comment-id:3246404708 --> @tjwebb commented on GitHub (Sep 2, 2025): > Tutorial page is on docs now: https://docs.openwebui.com/tutorial/web_search/ This link is dead.
Author
Owner

@rgaricano commented on GitHub (Sep 2, 2025):

https://docs.openwebui.com/category/-web-search

<!-- gh-comment-id:3246496162 --> @rgaricano commented on GitHub (Sep 2, 2025): https://docs.openwebui.com/category/-web-search
Author
Owner

@SteveCaruso commented on GitHub (Apr 6, 2026):

https://docs.openwebui.com/category/-web-search

Dead again :-) Whack-a-mole link rot edition.

<!-- gh-comment-id:4193335964 --> @SteveCaruso commented on GitHub (Apr 6, 2026): > https://docs.openwebui.com/category/-web-search Dead again :-) Whack-a-mole link rot edition.
Author
Owner

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

@SteveCaruso the docs website fortunately has a good-enough search https://docs.openwebui.com/features/chat-conversations/web-search/providers/searxng

https://docs.openwebui.com/category/web-search

<!-- gh-comment-id:4193386944 --> @Classic298 commented on GitHub (Apr 6, 2026): @SteveCaruso the docs website fortunately has a good-enough search https://docs.openwebui.com/features/chat-conversations/web-search/providers/searxng https://docs.openwebui.com/category/web-search
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#28555