The stock SearXNG image ships a native kagi engine; enabling it needs an
API key that must never enter git, and SearXNG does not expand env vars
in settings.yml (the live secret_key literally was '${SEARXNG_SECRET}'
until now — the app tolerated the placeholder string silently).
- settings.yml: kagi engine enabled (weight 2, kg shortcut, paging off so
exactly one API credit per aggregated query, timeout 8.0 vs 5.0 scrapers
so a slow paid query is not a wasted credit); api_key stays ${KAGI_API_KEY}.
- new scripts/searxng-render-settings.py: deploy-time renderer, allowlisted
to KAGI_API_KEY/SEARXNG_SECRET/SEARXNG_BASE_URL, fails the deploy loudly
on an unresolvable placeholder, idempotent on redeploys.
- deploy-remote.sh copy_searxng_config runs the renderer against
/opt/searxng/.env after copying settings.yml into /opt/searxng/config.
- KAGI_API_KEY placeholder added to dankclaw/.env.example (real key staged
into the host-side /opt/searxng/.env, mode 600, out of band).
- bats: engine wiring, renderer substitution, loud-failure, deployer seam.
- docs: SearXNG.md Kagi section + renderer law; Providers.md carve-out on
the no-credentials policy (paid engine acceptable when bounded + ordered).
Verified live on dankclaw: direct API probe via the gluetun netns (200,
data.search[] shape), then an aggregated query returned 29/29 results
tagged kagi, zero unresponsive engines.
133 lines
2.9 KiB
YAML
133 lines
2.9 KiB
YAML
# SearXNG settings — deployed to /opt/searxng/config/settings.yml on Dankclaw.
|
|
# ${VAR} placeholders below are rendered at deploy time by
|
|
# scripts/searxng-render-settings.py from the host-side /opt/searxng/.env
|
|
# (SearXNG does not expand env vars in settings.yml itself).
|
|
|
|
use_default_settings: true
|
|
|
|
server:
|
|
secret_key: "${SEARXNG_SECRET}"
|
|
base_url: "${SEARXNG_BASE_URL}"
|
|
limiter: true
|
|
method: "POST"
|
|
|
|
search:
|
|
default_lang: "en"
|
|
default_locale: "en-US"
|
|
safe_search: 0
|
|
formats:
|
|
- html
|
|
- json
|
|
|
|
valkey:
|
|
url: "valkey://searxng-valkey:6379/0"
|
|
|
|
outgoing:
|
|
request_timeout: 5.0
|
|
max_request_timeout: 15.0
|
|
pool_connections: 100
|
|
pool_maxsize: 20
|
|
enable_http2: true
|
|
keepalive_expiry: 5.0
|
|
retries: 1
|
|
|
|
# Keep default aggregation anonymous and bounded. Disabled engines remain
|
|
# available for explicit selection/on-demand use; inactive engines are removed.
|
|
# Provider-specific overrides below also reduce pagination fan-out.
|
|
engines:
|
|
- name: bing
|
|
disabled: false
|
|
weight: 2
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: bing images
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: bing news
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: bing videos
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: duckduckgo
|
|
disabled: false
|
|
weight: 2
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: duckduckgo images
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: duckduckgo news
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: duckduckgo videos
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: kagi
|
|
engine: kagi
|
|
categories: [general, web]
|
|
shortcut: kg
|
|
api_key: "${KAGI_API_KEY}"
|
|
kagi_categ: search
|
|
disabled: false
|
|
weight: 2
|
|
# Paid API (billed per search): no pagination fan-out, and a wider
|
|
# timeout than the scrapers above so slow queries are not wasted credits.
|
|
paging: false
|
|
timeout: 8.0
|
|
- name: wikipedia
|
|
weight: 1
|
|
timeout: 5.0
|
|
- name: google cse
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: google cse images
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: google news
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: google scholar
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: brave
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: brave.images
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: brave.news
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: brave.videos
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: startpage
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: startpage images
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
- name: startpage news
|
|
disabled: true
|
|
paging: false
|
|
timeout: 5.0
|
|
|
|
plugins:
|
|
searx.plugins.unit_converter.SXNGPlugin:
|
|
active: true
|
|
searx.plugins.calculator.SXNGPlugin:
|
|
active: true
|
|
searx.plugins.self_info.SXNGPlugin:
|
|
active: true
|