Files
MajorWiki/03-opensource/alternatives/searxng.md
MajorLinux 6da77c2db7 wiki: remove Obsidian-style hashtag tags from 12 articles
These #hashtag tag lines render as plain text on MkDocs. All articles
already have tags in YAML frontmatter, so the inline tags were redundant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 11:03:28 -04:00

2.2 KiB

SearXNG — Private Self-Hosted Search

Problem

Every search query sent to Google, Bing, or DuckDuckGo is logged, profiled, and used to build an advertising model of you. Even "private" search engines are still third-party services with their own data retention policies.

Solution

SearXNG is a self-hosted metasearch engine. It queries multiple search engines simultaneously on your behalf — without sending any identifying information — and aggregates the results. The search engines see a request from your server, not from you.

Your queries stay on your infrastructure.


Deployment (Docker)

services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    restart: unless-stopped
    ports:
      - "8090:8080"
    volumes:
      - ./searxng:/etc/searxng
    environment:
      - SEARXNG_BASE_URL=https://search.yourdomain.com/

SearXNG requires a settings.yml in the mounted config directory. Generate one from the default:

docker run --rm searxng/searxng cat /etc/searxng/settings.yml > ./searxng/settings.yml

Key settings to configure in settings.yml:

server:
  secret_key: "generate-a-random-string-here"
  bind_address: "0.0.0.0"

search:
  safe_search: 0
  default_lang: "en"

engines:
  # Enable/disable specific engines here

Caddy reverse proxy

search.yourdomain.com {
    reverse_proxy localhost:8090
}

Using SearXNG as an AI Search Backend

SearXNG integrates directly with Open WebUI as a web search provider, giving your local AI access to current web results without any third-party API keys:

Open WebUI → Settings → Web Search:

  • Enable web search
  • Set provider to searxng
  • Set URL to http://searxng:8080 (internal Docker network) or your Tailscale/local address

This is how MajorTwin gets current web context — queries go through SearXNG, not Google.


Why Not DuckDuckGo?

DDG is better than Google for privacy, but it's still a centralized third-party service. SearXNG:

  • Runs on your own hardware
  • Has no account, no cookies, no session tracking
  • Lets you choose which upstream engines to use and weight
  • Can be kept entirely off the public internet (Tailscale-only)