Configuration

Small surface area, explicit settings.

SearXNG needs four things for this setup: JSON output, a loopback bind, Redis, and a generated secret key. Everything else is tuning. OpenClaw needs one matching plugin/provider block.

  • Main file/etc/searxng/settings.yml
  • Agent file~/.openclaw/openclaw.json
  • Restartsystemctl restart searxng
FilePurposeLocation
settings.ymlSearXNG configuration/etc/searxng/settings.yml
openclaw.jsonOpenClaw plugin/provider configuration~/.openclaw/openclaw.json
searxng.servicesystemd unit/etc/systemd/system/searxng.service
settings.yml.templateAnnotated referenceconfigs/

SearXNG

The settings OpenClaw actually depends on.

Start with use_default_settings.

A partial settings file must inherit SearXNG's defaults. Without this key, SearXNG treats the user file as the complete configuration instead of merging it. keep_only limits the merged engine catalogue to the 7 engines this setup enables.

use_default_settings:
  engines:
    keep_only:
      - google
      - duckduckgo
      - brave
      - bing
      - wikipedia
      - github
      - youtube
search:
  formats:
    - html
    - json            # required by the plugin

server:
  limiter: false      # acceptable only while loopback-bound
  bind_address: "127.0.0.1"
  port: 8080

redis:
  url: "redis://localhost:6379/0"
JSON is not optional.

If the API returns HTML, check search.formats first. This is the most common integration failure.

Why each one matters

  • formats: json — the agent reads structured results, not scraped HTML.
  • bind 127.0.0.1 — no remote client can query the instance.
  • limiter: false — no local rate limit for a single loopback user. Enable it before exposing the service.
  • Redis URL — the local cache and temporary result storage.
  • secret_key — generated per install; never reuse a sample value.

Engines

7 enabled. 70+ available.

More engines usually means slower queries and a higher chance that an upstream engine rate-limits your server. Start with the defaults, then add only what you need.

google duckduckgo brave bing wikipedia github youtube
engines:
  - name: google
    engine: google
    shortcut: g
    disabled: false
  - name: duckduckgo
    engine: duckduckgo
    shortcut: d
    disabled: false
  - name: brave
    engine: brave
    shortcut: b
    disabled: false
  - name: bing
    engine: bing
    shortcut: i
    disabled: false
  - name: wikipedia
    engine: wikipedia
    shortcut: w
    disabled: false
  - name: github
    engine: github
    shortcut: gh
    disabled: false
  - name: youtube
    engine: youtube
    shortcut: yt
    disabled: false

The annotated template adds news engines:

  - name: google news
    engine: google_news
    shortcut: gn
    disabled: false
  - name: duckduckgo news
    engine: duckduckgo_news
    shortcut: dn
    disabled: false

Timeouts

Change one value at a time.

There is no benchmark in this repository that justifies a specific pool size. Measure with your own queries and engine set.

Default

Balanced starting point

outgoing:
  request_timeout: 10.0
  max_request_timeout: 30.0
  pool_connections: 100
  pool_maxsize: 50
  enable_http2: true

Small host

512 MB–1 GB RAM

outgoing:
  request_timeout: 10.0
  max_request_timeout: 20.0
  pool_connections: 50
  pool_maxsize: 25

max_request_timeout belongs under outgoing, not server. A misplaced key is ignored or rejected depending on the SearXNG version.

OpenClaw

Match the config to your release.

Two integration shapes exist. Use the one your installed OpenClaw version documents, not both unless you have verified that they coexist.

Tested with 2026.2.23

searxng-search plugin

This is what configure-openclaw.sh writes.

{
  "plugins": {
    "entries": {
      "searxng-search": {
        "enabled": true,
        "config": {
          "baseUrl": "http://localhost:8080",
          "timeoutMs": 60000,
          "defaultCount": 100,
          "enableMultiPage": true
        }
      }
    }
  }
}
OptionDefaultMeaning
baseUrlhttp://localhost:8080SearXNG base URL
timeoutMs60000Request timeout in ms
defaultCount100Results requested per search
enableMultiPagetrueAllow multi-page retrieval

These keys are plugin-specific. Unknown keys show up in openclaw doctor.

2026.6.9+

Built-in searxng provider

OpenClaw documents this shape for its built-in self-hosted provider.

{
  "tools": {
    "web": {
      "search": {
        "provider": "searxng",
        "maxResults": 10,
        "timeoutSeconds": 60
      }
    }
  },
  "plugins": {
    "entries": {
      "searxng": {
        "config": {
          "webSearch": {
            "baseUrl": "http://127.0.0.1:8080",
            "language": "en"
          }
        }
      }
    }
  }
}
  • Install with openclaw plugins install @openclaw/searxng-plugin if it is not bundled.
  • baseUrl lives under plugins.entries.searxng.config.webSearch.
  • A per-call count accepts 1–10 results.
  • http:// URLs must target loopback or a private host.
  • JSON must be enabled in SearXNG.

OpenClaw SearXNG documentation

Agent context

Keep large result sets out of the context window.

If searches crowd the model's context, lower the result count first, then keep compaction enabled. These are OpenClaw agent settings, not SearXNG settings; confirm key names against your release.

{
  "agents": {
    "defaults": {
      "compaction": {
        "reserveTokensFloor": 80000,
        "memoryFlush": {
          "enabled": true,
          "softThresholdTokens": 15000
        }
      },
      "contextPruning": {
        "mode": "cache-ttl",
        "ttl": "6h",
        "keepLastAssistants": 5
      }
    }
  }
}

Result volume

Reduce before compacting.

For the searxng-search plugin, set defaultCount to a smaller value. For the built-in provider, set tools.web.search.maxResults and keep per-call count small.

Multi-page retrieval is a SearXNG API feature. The plugin may expose it; the built-in provider does not expose a multi-page option.

Context overflow fix

Redis and firewall

Keep both services on loopback.

Redis password (optional)

sudo nano /etc/redis/redis.conf
bind 127.0.0.1
requirepass <generate-a-strong-password>
redis:
  url: "redis://:<generate-a-strong-password>@localhost:6379/0"
sudo systemctl restart redis-server
sudo systemctl restart searxng

Firewall

No inbound rule is required for a loopback-only install. If you deliberately expose SearXNG on a LAN, restrict it to one subnet and understand that there is no authentication:

sudo ufw allow from 192.168.1.0/24 to any port 8080 proto tcp

Do not expose port 6379 or port 8080 directly to the internet.

No TLS or auth is included.

If you change the bind address, add a reverse proxy with TLS and authentication, and enable the SearXNG limiter.

Verification

Check the configuration before debugging the agent.

# YAML syntax
python3 -c "import yaml; yaml.safe_load(open('/etc/searxng/settings.yml'))"

# Redis
redis-cli ping

# SearXNG
sudo systemctl restart searxng
sudo systemctl is-active searxng

# JSON API, page 2, categories
curl -s "http://127.0.0.1:8080/search?q=test&format=json" | jq '.results | length'
curl -s "http://127.0.0.1:8080/search?q=python&format=json&pageno=2" | jq '.results | length'
curl -s "http://127.0.0.1:8080/search?q=code&categories=it&format=json" | jq '.results | length'

# OpenClaw
openclaw doctor 2>&1 | grep -i searxng

Configuration checklist

  • search.formats includes json
  • server.secret_key is a random value
  • server.bind_address is 127.0.0.1
  • server.limiter is off only while loopback-bound
  • redis.url points at the local instance
  • Only needed engines are enabled
  • max_request_timeout is under outgoing
  • OpenClaw uses one matching plugin/provider shape
  • openclaw doctor reports no invalid keys
  • The JSON API, page 2, and a category query return results