TL;DR
SearXNG is a privacy-respecting metasearch engine — your queries hit it instead of Google/Bing/DDG, and it federates the searches without tracking you. Sizing: minimal (~200 MB RAM). Best for: a first self-hosted project on the cheapest available VPS.
- Best providers: AlexHost ($4/mo), HostHatch ($2/mo annual prepay), BuyVM ($2/mo).
- Install: Docker; 5 minutes to running.
Why self-host search
Private search alternatives (DuckDuckGo, Brave Search, Kagi, Startpage) are all third-party services. They’re better than Google but they still see your queries. Self-hosting SearXNG means:
- Your queries stay on your server.
- Aggregates results from many engines — better signal than any single source.
- No tracking, no profiling, no ads.
- Custom engine selection: include / exclude any of 100+ supported sources.
Step-by-step
1. Provision
Cheapest available VPS works. AlexHost Moldova ($4/mo), HostHatch Iceland ($2/mo annual), or BuyVM Slice 1024 ($2/mo) all suffice.
2. Install via Docker Compose
services:
searxng:
image: searxng/searxng:latest
restart: always
ports:
- 127.0.0.1:8080:8080
volumes:
- ./searxng:/etc/searxng
environment:
- SEARXNG_BASE_URL=https://search.yourdomain.com/
caddy:
image: caddy:latest
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy_data:/data
Caddyfile:
search.yourdomain.com {
reverse_proxy localhost:8080
}
3. Configure
Edit searxng/settings.yml:
server:
secret_key: "GENERATE-A-RANDOM-STRING"
bind_address: "0.0.0.0"
port: 8080
search:
safe_search: 0
autocomplete: ""
ui:
static_use_hash: true
Restart: docker compose restart.
4. Use as your default search
- Browser: Settings → Search engines → Add → URL
https://search.yourdomain.com/?q=%s. Set as default. - Firefox: also supports OpenSearch — SearXNG advertises it; you can install via the address bar’s “Add” button.
- Mobile: Firefox Mobile / Brave Mobile both support custom search engines.
Hardening
- Disable engines you don’t trust: in
settings.yml, setdisabled: trueon any engine. - Bot prevention: enable the
limiterto prevent your instance from being used as a free Google proxy by others. - Redis cache: optional; speeds up suggestions and result caching.
- Onion service: serve via Tor onion alongside clearnet for max privacy.
Cost
| Component | Cost |
|---|---|
| BuyVM Slice 1024 | $2 / month |
| Domain (Njalla .com) | $1.25 / month |
| Total | ~$3 / month |
For comparison, Kagi (commercial private search) is $10/month for 300 searches. Self-hosted SearXNG is unlimited.