Skip to content

The Moving Parts

Scope: the pieces a SearXNG instance is made of — one Python web program, one settings file, a crowd of engine definitions, and two optional extras — and what breaks when each piece stops.

The web program

There is, wonderfully, only one program to run. The SearXNG web application (Python, built on Flask) serves the search page, takes your query, fans it out to the engines, merges what comes back, and renders the result in whichever format was asked for — HTML for humans, JSON, CSV, or RSS for machines (chapter 8). It also serves /config, a JSON description of itself: version, categories, and every engine with its enabled flag. The lab used /config as the instance's own testimony (transcript t07).

It is stateless in the way that matters: restart it and nothing is lost, because it stores nothing about you between requests. Your preferences arrive with each request as cookies and leave with the response.

The settings file

settings.yml is the admin's one lever. It names the instance, picks the port and bind address, holds the secret key, decides which formats are served, sets the default language, tunes the outgoing network, and lists every engine with its switches. The stock file runs to thousands of lines, mostly the engine list; examples/settings-extract.yml shows the few lines the lab actually changed. Chapter 7 walks the anatomy.

The engines

An engine in SearXNG is a small adapter: it knows how to ask one outside service — a search engine, a wiki, a package index, a map — and how to read the answer. The stock file defines 261 of them; 81 are enabled by default and 180 sit switched off as a menu of specialists (transcript t07). Each search asks the enabled engines for the query's category in parallel, gives each a few seconds, and merges what returns before the stragglers time out.

Engines are also where the weather comes from. An engine whose upstream starts refusing — a CAPTCHA, a rate limit — is suspended for a spell (the lab watched 180-second suspensions) and listed in the reply's unresponsive_engines, so a thin result page always says who didn't answer.

The upstreams

The part you don't run: Google, Bing, DuckDuckGo, Wikipedia, and the rest. They hold the indexes, they do the answering, and they set the terms — including refusing. SearXNG's whole privacy design lives in how it talks to them (chapter 9); its whole fragility lives there too (chapter 13).

The optional extras

Two pieces exist that a household install can skip and a public one should not:

  • Valkey (a Redis-compatible store) — used by the limiter and some counters. The stock setting is valkey.url: false: not present. The lab ran none.
  • The limiter — rate-limiting and bot detection (server.limiter), off by default, needing Valkey and its own limiter.toml. Off throughout the lab; chapter 10 is about when to switch it on.
  • morty — a separate result-proxy program that can fetch result pages so your browser never talks to the result sites directly. Not run in the lab; mentioned in chapter 9 and labelled documented-only there.

What breaks when each stops

Piece Stops Symptom
Web program everything No page at all; nothing to search with
settings.yml (deleted) Server starts on stock defaults — placeholder secret key, JSON off, wrong port expectations
A few engines those rows Thinner results; the missing names listed as unresponsive
Many engines the page's depth Results still come, from whoever is left
The upstreams' goodwill result quality CAPTCHAs and 429s; see chapter 14
Valkey nothing, if the limiter is off Limiter and suspension counters lose their memory if it was on