Getting Websearch to work with OpenWebUI

#AI #selfhosting #ollama

Do this

Enable JSON format (required)

# Copy default config
docker cp searxng:/etc/searxng/settings.yml \
  /opt/projects/ollama-websearch/docker/searxng/settings.yml

Edit settings.yml — find the search: section and add:

search:
  safe_search: 0
  autocomplete: ""
  formats:
    - html
    - json

server:
  secret_key: "change-this-to-a-random-string"
  limiter: false

Add -json to this part here
**Pasted image 20251226222011.png

Restart with config mounted:

docker stop searxng && docker rm searxng

docker run -d \
  --name searxng \
  --restart always \
  -p 8080:8080 \
  -e BASE_URL=http://localhost:8080 \
  -v /opt/projects/ollama-websearch/docker/searxng/settings.yml:/etc/searxng/settings.yml \
  searxng/searxng:latest

Verify it works:

curl "http://localhost:8080/search?q=ollama&format=json" | python3 -m json.tool | head -20

Electric Meatball's Digital Garden Home
Linux Terminal Cheat Sheet
Terminology📖