SearXNG Setup Guide - ajgillis04/GillisDockerDepot GitHub Wiki

SearXNG Setup Guide

Introduction

SearXNG is a private metasearch engine: it sends your query to several search engines and merges the results, with no account or API key. Here it gives OpenWebUI Setup Guide (WSL2 Docker) its web search, so the local model can look things up.

Compose

compose/server2/searxng.yaml:

services:
  searxng:
    container_name: searxng.${HOST_NAME}
    image: searxng/searxng:2026.11.2-cccbc9e15   # pinned; update by hand
    environment:
      TZ: ${TZ}
      SEARXNG_BASE_URL: http://searxng.${HOST_NAME}:8080/
    ports:
      - "127.0.0.1:${SEARXNG_PORT}:8080"   # only Open WebUI uses it
    volumes:
      - ${COMPOSE_DIR}/searxng/settings.yml:/etc/searxng/settings.yml:ro
    restart: always

settings.yml

Open WebUI needs JSON results, which SearXNG disables by default:

use_default_settings: true
server:
  secret_key: "<random string>"     # e.g. openssl rand -hex 32; set via SEARXNG_SECRET
  limiter: false                    # private instance, one client
search:
  formats:
    - html
    - json

Connecting Open WebUI

Admin Panel → Settings → Web Search: engine searxng, query URL http://searxng.<host>:8080/search?q=<query>.

Notes

  • Queries go out from your own IP address. Heavy use can get you temporarily rate-limited by an engine; SearXNG just skips that engine for a while.
  • Test it directly: curl "http://127.0.0.1:<port>/search?q=test&format=json" should return JSON. A 403 means the JSON format isn't enabled.
⚠️ **GitHub.com Fallback** ⚠️