Tutorials

SearXNG: Going Deeper

Chapter 15's private search engine: what SearXNG writes on first start, where the book's engines block goes, how to run only the engines you list, and making it your browser's default.

beginner ⏱ 25 min Be Your Own Cloud · Chapter 15 searxngsearch

Chapter 15 of Be Your Own Cloud explains what a meta-search engine does and why the book keeps it on your own network. This page covers the part that confuses people on day one: the settings file.

Deploy it

mkdir -p /opt/stacks/searxng
cd /opt/stacks/searxng
File /opt/stacks/searxng/docker-compose.yml
services:
  searxng:
    image: searxng/searxng:2026.9.29-4e2c1ea7f
    container_name: searxng
    restart: unless-stopped
    volumes:
      - ./searxng:/etc/searxng
    ports:
      - '8888:8080'
Exactly as printed in Be Your Own Cloud, Chapter 15 , p. 66 · all of Chapter 15's code
docker compose up -d

Open http://192.168.1.50:8888 and search. It works immediately, with SearXNG’s default engines.

What first start creates

On its first start, SearXNG writes a settings file into the ./searxng folder the compose file mounts. On the book’s pinned version it’s short:

use_default_settings: true

server:
  secret_key: "…a random value it generated…"
  image_proxy: true

Three things worth knowing about it:

  • use_default_settings: true means this file only holds your changes. Everything else — all the engines, the defaults — comes from SearXNG itself.
  • secret_key is unique to your instance and generated for you. Leave it alone.
  • image_proxy: true means result thumbnails are fetched through your server too, so the sites hosting those images don’t see your browser either.

The file is owned by the container’s user, so edit it with sudo:

sudo nano /opt/stacks/searxng/searxng/settings.yml

Where the engines block goes

Add the book’s block to the end of that file:

Add to /opt/stacks/searxng/searxng/settings.yml

SearXNG writes this file on first start. Add the engines block to the end of it.

engines:
  - name: google
    disabled: false
  - name: bing
    disabled: false
  - name: duckduckgo
    disabled: false
Exactly as printed in Be Your Own Cloud, Chapter 15 , p. 67 · all of Chapter 15's code

Then docker compose restart. Because of use_default_settings, each entry is matched to the engine of the same name and only the setting you list changes. Set disabled: true on one to switch it off.

What this doesn’t do is limit SearXNG to only those three. Every other default engine stays on. If you want exactly your list and nothing else, change the use_default_settings: true line at the top of the file to:

use_default_settings:
  engines:
    keep_only:
      - google
      - bing
      - duckduckgo

Firefox: visit http://192.168.1.50:8888. SearXNG advertises itself as a search engine, so right-clicking the address bar offers to Add “SearXNG”. Then choose it under Settings → Search → Default Search Engine. If you’d rather add it by hand, the search URL is:

http://192.168.1.50:8888/search?q=%s

Brave: Settings → Search engine → Manage search engines and site search → Add, using the same URL, then Make default.

Away from home, that address works over Tailscale’s subnet route (Chapter 20) — no public subdomain needed, which is what Chapter 15 recommends.

Updating

SearXNG doesn’t do numbered releases; its image tags are a date and a commit. It changes often, and the engines it scrapes change more often still — an engine that stops returning results is usually fixed upstream within days. Update deliberately (Chapter 27): bump the tag, docker compose pull, docker compose up -d. Your settings.yml carries over.

Official documentation

Stuck on a step? Get in touch.