How to Use SearXNG: From First Search to Self‑Hosting Mastery
If you’ve ever wanted Google-like results without the tracking, SearXNG is your privacy-first metasearch engine. It aggregates results from dozens of sources—without profiling you—and gives you full control over filters, engines, and even hosting. In this guide, we’ll walk through three paths: using a public instance, customizing your search experience, and deploying your own private SearXNG for maximum control.
To keep this actionable, we’ll take a practical & solution-oriented approach with hands-on steps, settings you can copy, and common pitfalls to avoid.
What Is SearXNG and Why Use It?
SearXNG is an open-source metasearch engine. Instead of crawling the web itself, it queries other search engines and presents results in a unified interface. The twist: it drops tracking, removes ads (on most instances), and gives you fine-grained control over what engines to include, which categories to search (web, images, videos, files, IT, news, science), and how results are presented.
- No tracking or profiling by default
- Configurable engines and categories
- Self-hostable for full control
- API-friendly for developers and automations.
Quick Start: Using a Public SearXNG Instance
You can begin with a public instance (a SearXNG server run by volunteers). Typical flow:
- Open a reliable public instance (search “SearXNG instances list” or community threads to find active, reputable servers). Assess uptime, rate limits, and privacy statements.
- Type your query and choose categories (e.g., Web, Images, News) via the top tabs.
- Use Preferences (gear icon) to set:
- UI theme and infinite scroll
- Use “bangs” and operators:
!g your query forces Google engine (if enabled on that instance)
!ddg, !bing, !yt, !wp etc., depending on instance configuration
- Standard operators like quotes,
site:, filetype:pdf, inurl:, intitle: work on many engines
- Bookmark your favorite instance and export/import Preferences as a JSON blob if supported by the UI.
Pro tip: Public instances can rate-limit anonymous users to protect themselves from abuse. If you see captchas or slowdowns, try another instance or self-host.
Power User Moves in the Interface
- Switch engines on the fly: In Preferences → Engines, toggle specific sources per category.
- Tune results: Hide duplicates, change time range (e.g., past year), sort by relevance or date.
- Privacy toggles: Disable any engine you don’t want queried. Some engines require API keys; if absent, they simply won’t be used.
- Keyboard shortcuts: Many SearXNG themes support
/ to focus the search box and arrow keys to navigate results.
How to Self-Host SearXNG (Docker Way)
Self-hosting gives you reliability, speed, and control over which engines to use. The Docker path is the simplest.
Requirements
- A Linux VPS or a home server (2 vCPU/2 GB RAM is comfortable for light use)
- Docker and Docker Compose installed
- A domain/subdomain and optional reverse proxy (Caddy/Traefik/Nginx) for HTTPS
Steps
- Clone the SearXNG deployment repo (or use a minimal Compose file):
version: "3.8"
services:
searxng:
image: searxng/searxng:latest
container_name: searxng
environment:
- BASE_URL=
- SEARXNG_SECRET_KEY=change_me_to_a_long_random_value
volumes:
- ./searxng:/etc/searxng
ports:
- "8080:8080"
restart: unless-stopped
- Generate a strong
SEARXNG_SECRET_KEY (e.g., openssl rand -hex 32).
- Configure reverse proxy with HTTPS (Caddy example):
search.example.com {
reverse_proxy 127.0.0.1:8080
}
Caddy will auto-provision TLS via Let’s Encrypt.
- Visit ` and confirm it loads.
Core Configuration: settings.yml
After the first run, you’ll have config under your mounted volume (e.g., ./searxng/settings.yml). Key sections:
general: name, debug mode, result count
server: secret key, bind address, rate limits
engines: enable/disable engines, categories, timeouts
ui: theme, infinite scroll, autocomplete
search: safe search defaults, language, locale
Example snippet:
general:
instance_name: "My Private SearXNG"
server:
secret_key: "<same as env or longer>"
image_proxy: true
rate_limit: "60/minute"
search:
safe_search: 1 # 0 off, 1 moderate, 2 strict
autocomplete: "duckduckgo"
ui:
default_theme: "simple"
infinite_scroll: true
engines:
- name: duckduckgo
engine: duckduckgo
categories: .
### Quick Example
- Endpoint: `/search`
- Methods: GET or POST
- Parameters: `q` (query), `categories`, `language`, `format=json`, `time_range`, `safesearch`
```bash
curl "
Response includes organic results, engines used, and timings. Great for building research automations, local dashboards, and custom UIs.
Tuning Engines and Categories
- Prefer fast, privacy-friendly sources (e.g., Wikipedia, Stack Exchange, MDN, DuckDuckGo, Brave if allowed, official APIs for YouTube/Reddit/Mastodon).
- Disable engines with frequent captchas or high latency on your network.
- Use per-category defaults; for example, enable GitHub, Stack Overflow, and PyPI under “IT,” enable arXiv/Crossref under “Science,” and set
time_range to recent for “News.”
Troubleshooting Checklist
- Seeing captchas or empty results? Reduce or rotate engines causing blocks; increase timeouts slightly; enable caching.
- API requests failing? Check reverse proxy headers and CORS; confirm
format=json.
- UI slow? Lower the number of results per page; disable heavy engines; enable Redis cache.
- Docker restart loop? Validate
settings.yml syntax and your environment variables.
Best Practices for Teams and Power Users
- Export and version-control your
settings.yml (without secrets) to track changes.
- Use secrets managers or
.env files for API keys.
- Schedule weekly container refreshes to stay current with engine changes.
- Monitor logs for engine errors or rate-limit hits.
- If you embed SearXNG in apps, back off on retries and randomize delays to avoid bans.
Optional: Connect SearXNG to Other Tools
- Use the JSON API in your research notebooks or chat workflows.
- Route app-based web search through your private instance to maintain privacy.
- Some AI/web UIs can plug into SearXNG for browsing through your own endpoint (configure base URL and API parameters accordingly).
Worth noting: If you’re crafting research workflows or summarizing results at scale, a tool like Sider.AI can streamline the read-and-summarize step across multiple tabs or queries. You can point your browsing to a private SearXNG endpoint, then use Sider.AI to capture insights, draft briefs, or compile citations automatically, which saves time when you’re running many searches in a row. Security and Ethics
- Respect the terms of the engines you enable.
- Don’t expose your instance to public abuse; rate-limit and, if needed, restrict access.
- Inform team members about privacy expectations; logs can be configured to avoid storing IPs or queries.
Your First 15-Minute Setup: A Mini Checklist
- Spin up Docker and create a Compose file
- Start the container and confirm
:8080 works
- Put it behind HTTPS with a proxy
- Edit
settings.yml to enable engines you trust
- Set default categories and SafeSearch
- Test the API with a
curl request
- Bookmark your instance and share it with your team
Key Takeaways
- SearXNG gives you privacy, control, and flexibility without writing a crawler.
- Start on a public instance, then self-host for reliability and customization.
- Tune engines and categories for speed and relevance.
- The JSON API makes SearXNG ideal for research and automation.
- Harden your deployment with HTTPS, rate limits, and minimal logging.
References and Further Reading
- Official Search API overview for parameters and formats.
- Step-by-step self-hosting walkthroughs and community tutorials can be helpful for Docker and Windows setups.
- Integrating SearXNG into app workflows and tools often follows the same API pattern used above.
FAQ
Q1:What is SearXNG and how does it work?
SearXNG is a privacy-focused metasearch engine that queries multiple sources and aggregates the results, without tracking users. You can use a public instance or self-host for full control over engines, filters, and privacy settings.
Q2:How do I self-host SearXNG with Docker?
Create a Docker Compose service using the official image, set a strong secret key, and expose it behind a reverse proxy with HTTPS. Edit settings.yml to enable engines, configure categories, and adjust privacy options.
Q3:Can I use SearXNG for programmatic searches via API?
Yes. Call /search with parameters like q, categories, and format=json to receive JSON results for automations and apps. This is ideal for research pipelines and internal tools.
Q4:How do I choose a safe public SearXNG instance?
Look for active, reputable instances with clear privacy statements, good uptime, and minimal captchas. You can also switch instances or self-host if you encounter rate limits or reliability issues.
Q5:Which search operators work in SearXNG?
Common operators like quotes, site:, filetype:, inurl:, and intitle: generally work and are passed to underlying engines. You can also use bang shortcuts (e.g., !g, !ddg, !yt) if the instance supports them.