SearXNG web search

Module id: searxng · Kind: sidecar · Configured by: SEARXNG_BASE_URL · Plug: searxng (web search)

SearXNG is a self-hosted meta search engine. With this module, when chat needs to look something up on the web, the query goes to your SearXNG instance and from there to the engines it aggregates — no search API key, no per-query bill, and no query log at a cloud provider. Off by default.


What it adds

  • SearXNG as a selectable provider on Operate → AI infrastructure → Web search, with freshness, language and site-filter support.
  • Web search for chat, assistants and Saved Tasks that stays inside your infrastructure.
  • A fallback option: keep Brave (or another cloud provider) active and let SearXNG catch failures, or the other way round.

Without it

Web search uses the provider you selected on the Web search tab — Brave by default, or Tavily, Exa, Firecrawl, Perplexity with their keys. If SearXNG is selected but its URL is empty, the card reports unavailable and the fallback provider answers; chat itself is never broken by a missing search backend.


How to enable

1. Start the sidecar

Developer / evaluation stack:

docker compose --profile searxng up -d

The service has no published host port: only the backend and worker reach it on the Compose network. Its settings file lives at _devextras/searxng/settings.yml and already enables the json output format Synaplan needs.

Production (deploy/compose.yaml has no SearXNG service): run the official image next to the stack or on another host. Two settings matter in its settings.yml:

search:
  formats:
    - html
    - json        # required — Synaplan calls the JSON API
server:
  secret_key: "change-me"   # or SEARXNG_SECRET in the container environment

2. Tell the backend where it is

The dev Compose file injects SEARXNG_BASE_URL=http://searxng:8080. Everywhere else, set it and restart backend + worker:

SEARXNG_BASE_URL=http://searxng:8080       # or https://search.internal.example.com

3. Select it

Operate → AI infrastructure → Web search → choose SearXNG as the active provider (optionally another as fallback) and press Test query — up to five result titles confirm the round-trip. The next chat search uses it; no restart.


Check it works

  • Operate → Feature StatusSearXNG web search shows Available / SearXNG is running. The probe is GET /healthz. SearXNG is not reachable means the URL is set but the instance did not answer; SEARXNG_BASE_URL is unset or disabled means the module is off.
  • Web search → Test query is the real search call; the health pill on the tab only says "URL present".
  • From the host (no published port):
docker compose exec -T backend curl -sS 'http://searxng:8080/search?q=synaplan&format=json' | head -c 300

Configuration reference

Variable Default Meaning
SEARXNG_BASE_URL empty (dev Compose: http://searxng:8080) Base URL of the instance. Empty or disabled = module off.
SEARXNG_SECRET dev placeholder Passed to the bundled container as its secret_key. Set a real value in production.

Which provider is active, and whether users may pick their own (WEB_SEARCH.USER_OVERRIDE_ALLOWED), is stored in BCONFIG and edited on the Web search tab — see AI infrastructure → Web search.


Troubleshooting

  • Test query returns 403 or an empty list. The instance does not serve the JSON format. Add json under search.formats in its settings.yml and restart it.
  • Results are slow or sparse. SearXNG's quality depends on the engines it is allowed to use and on rate limits upstream. Tune engines: in its settings; consider a fallback provider for peak times.
  • Instance is reachable in the browser but not reachable in Feature Status. The backend resolves the URL from inside its container. localhost there is the backend itself — use the service name or host.docker.internal.

Related