Skip to content

feat(search): sovereign SearXNG stack — no public instance dependency - #48

Merged
mdheller merged 1 commit into
mainfrom
feat/sovereign-search-extension-bundling
Aug 4, 2026
Merged

feat(search): sovereign SearXNG stack — no public instance dependency#48
mdheller merged 1 commit into
mainfrom
feat/sovereign-search-extension-bundling

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown

Summary

noes (Noetica + web search + citations) was shipping with a hard dependency on https://searx.be, a public instance. This PR makes the stack fully sovereign.

Four-level URL resolution in turtle-web-search

1. SEARXNG_URL env var
2. ~/.local/state/sourceos/searxng-url (written by setup script)
3. localhost probe: :8888 (Docker) → :8080 (Homebrew)
4. https://searx.be fallback

No public instance needed when a local SearXNG is running.

scripts/sourceos-searxng-setup.sh

One-shot setup:

./scripts/sourceos-searxng-setup.sh
  • Docker path: docker run searxng/searxng:latest on 127.0.0.1:8888 (skips if container exists)
  • Homebrew fallback: brew install searxng on :8080
  • Probes instance, writes URL to state file, prints export SEARXNG_URL=...

com.sourceos.searxng.plist

launchd agent: docker start sourceos-searxng at login. Install with:

turtle-install-launchd --with-searxng

(Off by default — requires Docker setup first.)

Mesh dashboard Search badge

http://localhost:7788 now shows a Search status tile next to Noetica: green when a local SearXNG responds, red otherwise. Uses the same 4-level probe with 1s timeout.

Test plan

  • ./scripts/sourceos-searxng-setup.sh — Docker path: container starts, URL written to state file
  • ws "wezterm latest" — hits local instance (verify via SEARXNG_URL=http://localhost:8888 ws "test")
  • noes "k8s 1.33 release" — answer with [1][2] citations from local results
  • Mesh dashboard Search badge shows up
  • Stop local SearXNG → badge shows down, ws falls back to searx.be
  • turtle-install-launchd --with-searxng --status — shows searxng agent

sourceos-searxng-setup.sh (new):
- Docker path: pulls searxng/searxng:latest → localhost:8888, skips if exists
- Homebrew fallback: brew install searxng → localhost:8080
- Probes instance after setup; writes URL to ~/.local/state/sourceos/searxng-url

com.sourceos.searxng.plist (new):
- launchd agent: docker start sourceos-searxng at login
- Activated via turtle-install-launchd --with-searxng

turtle-web-search:
- _searxng_url(): env var → state file → localhost probe (8888→8080) → searx.be
- No public instance required when local SearXNG is running

turtle-install-launchd:
- --with-searxng flag appends com.sourceos.searxng to install list (off by default)
- Updated usage string

turtle-mesh-serve:
- _searxng_alive(): same 4-level probe, 1s timeout
- gather_state() includes searxng_ok bool
- Dashboard status bar: Search badge (green=up / red=down) next to Noetica
@mdheller
mdheller merged commit 4920cad into main Aug 4, 2026
14 checks passed
@mdheller
mdheller deleted the feat/sovereign-search-extension-bundling branch August 4, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant