---
title: "Self-host SearXNG: private metasearch and free web search for Open WebUI and LobeHub"
description: "Deploy SearXNG on your own server with Zenavo's template, enable its JSON API, and connect it to Open WebUI and LobeHub over the project private network so your AI models can search the live web with zero per-query fees."
date: 2026-11-13
language: en
url: https://zenavo.app/blog/self-host-searxng
---

# Self-host SearXNG: private metasearch and free web search for Open WebUI and LobeHub

Once you have [Open WebUI](https://zenavo.app/blog/self-host-open-webui) or [LobeHub](https://zenavo.app/blog/self-host-lobehub) running, the next question is almost always the same: **how do I let models look up today's news, current documentation or live web pages?** Commercial search APIs (Tavily, Serper, Brave Search) charge per query, while public SearXNG instances rate-limit automated requests.

[SearXNG](https://docs.searxng.org) is an open-source metasearch engine: instead of maintaining its own index, it queries dozens of engines (Google, Bing, DuckDuckGo, Wikipedia, GitHub and more) in parallel, deduplicates the results, and strips out tracking profiles. Better yet, when you drop SearXNG into the same Zenavo project as Open WebUI or LobeHub, your chat app can query it over the private network with zero per-search fees.

## 1. Two ways to deploy: private backend or personal search engine

First [connect a Linux server](https://docs.zenavo.app/servers/add-a-server) to Zenavo, then pick the setup that matches how you'll use it:

- **Option A: Internal web-search backend for Open WebUI or LobeHub (recommended)**
  Open your existing Open WebUI or LobeHub project in Zenavo, click **Add Service → Templates**, and choose **SearXNG**. SearXNG then runs inside the same project network (`http://searxng.zenavo.internal:8080`) and **doesn't even need a public domain**, so nobody outside your project can hit your search endpoint.
- **Option B: Standalone private search engine for your browser**
  Deploy a new project from the [SearXNG template](https://zenavo.app/deploy?template=searxng), then bind a custom domain (such as `search.example.com`) to port `8080` on the `searxng` service's **Networking** tab. See [Domains & HTTPS](https://docs.zenavo.app/networking/domains).

The template is very lightweight (typically under 200 MB of memory):

| Setting | Value or purpose |
|---|---|
| Image | `searxng/searxng:latest` |
| HTTP port | `8080` |
| Config volume | `/etc/searxng` (generates `settings.yml` and `limiter.toml` on first boot) |
| Cache volume | `/var/cache/searxng` |
| `SEARXNG_SECRET` | Random secret generated when the project is created |

## 2. Enable the JSON format (required for AI tools)

By default, SearXNG only serves HTML pages for browsers and returns `403 Forbidden` when a client requests `?format=json`. Open WebUI and LobeHub both fetch search results via the JSON API.

After the service boots for the first time and populates `/etc/searxng/settings.yml`, open `/etc/searxng/settings.yml` (via the container terminal or config files) and add `json` under `search.formats`:

```yaml
search:
  formats:
    - html
    - json
```

If SearXNG is only called over the Zenavo private network, also verify that `limiter: false` is set under `server:` so internal requests without public proxy headers aren't throttled. Save the file and click **Restart** on the `searxng` service.

## 3. Connect Open WebUI

If you deployed [Open WebUI](https://zenavo.app/blog/self-host-open-webui):

1. Sign in to Open WebUI as an admin and open **Admin Panel → Settings → Web Search**.
2. Toggle **Enable Web Search** on.
3. Set **Web Search Engine** to `searxng`.
4. Set **Searxng Query URL** to:
   - Same Zenavo project (private network): `http://searxng.zenavo.internal:8080/search?q=<query>`
   - Separate project (public domain): `https://search.example.com/search?q=<query>`
5. Click Save. In a new chat, toggle **Web Search** below the prompt box and ask about a recent event to watch it retrieve live pages before answering.

## 4. Connect LobeHub

If you run [LobeHub](https://zenavo.app/blog/self-host-lobehub), add these environment variables on the `lobehub` service's **Variable** tab, then save and restart `lobehub`:

```sh
SEARCH_PROVIDERS=searxng
SEARXNG_URL=http://searxng.zenavo.internal:8080
```

(If SearXNG is in a different project, set `SEARXNG_URL` to your `https://search.example.com` domain.) Once restarted, LobeHub's built-in web search plugin queries your SearXNG instance automatically.

## 5. Backups and upgrades

SearXNG stores no user accounts or chat history — only your customized `/etc/searxng/settings.yml` matters:

1. After editing `settings.yml`, either keep a copy of the file or back up the `/etc/searxng` volume from the **Backup & Restore** tab during a maintenance window.
2. The template uses `searxng/searxng:latest` because upstream search engines frequently tweak their HTML markup and SearXNG ships parser fixes regularly. If you want to lock a specific version, change the tag under **Settings → Source**.

## FAQ

**Open WebUI or LobeHub gets `403 Forbidden` when searching.**
Almost always because `json` hasn't been added under `search.formats` in `/etc/searxng/settings.yml` (step 2), or the `searxng` service wasn't restarted after editing the file. Also prefer the private network URL (`http://searxng.zenavo.internal:8080`) over a public domain protected by bot rules.

**Why does Google occasionally time out or ask for a CAPTCHA?**
Data-center IP addresses can hit upstream rate limits if every query goes to a single search engine. Enable multiple engines (Bing, DuckDuckGo, Brave, Wikipedia) in SearXNG's **Preferences → Engines** or in `settings.yml` so SearXNG spreads queries across sources.

**If I bind a public domain, how do I stop strangers from abusing my JSON API?**
If SearXNG is only for Open WebUI or LobeHub, don't bind a public domain at all — keep it on `.zenavo.internal` [private networking](https://docs.zenavo.app/networking/private). If you also use it in your browser, enable `server.limiter: true` in `settings.yml` or keep the JSON format restricted to internal services.

**Can I run SearXNG alongside a self-hosted model gateway?**
Yes. A popular setup runs **Open WebUI / LobeHub + SearXNG + [Magpie](https://zenavo.app/blog/self-host-magpie) (or [New API](https://zenavo.app/blog/self-host-new-api) / [LiteLLM](https://zenavo.app/blog/self-host-litellm))** inside one Zenavo project so chat UI, live web search and model routing all communicate over the internal network on a single server.

Deploy the [SearXNG template](https://zenavo.app/deploy?template=searxng) — or add it straight into your existing AI project — to give your models private, zero-per-query web search in minutes.
