What it is
SearXNG is a free, self-hostable metasearch engine that aggregates results from 70+ sources (Google, Bing, DuckDuckGo, Wikipedia, and more) without storing your queries or sharing any identifying data with those upstream engines. It gives you Google-quality results while acting as a privacy buffer, so the search providers only ever see your server's IP, never yours.
Why host it offshore
A self-hosted search engine is only as private as the box it runs on — an offshore, no-KYC VPS means no identity is ever tied to the instance and no local jurisdiction can compel your search logs. Paying in crypto and hosting in a privacy-tier location (NL/CH/RO/IS/MD/LU) keeps the whole chain, from signup to query, free of identity and outside surveillance-heavy jurisdictions.
A working reference setup
Copy this onto a fresh KernelVPS instance. Replace the placeholders, then bring it up.
# 1. Create the config dir and a settings.yml (SearXNG generates one on first boot).
# 2. Generate a real secret: openssl rand -hex 32
# 3. docker compose up -d
#
# docker-compose.yml
services:
searxng:
image: docker.io/searxng/searxng:latest
container_name: searxng
restart: unless-stopped
ports:
- "127.0.0.1:8080:8080" # bind to loopback; put a TLS proxy in front
volumes:
- ./searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://search.example.com/
- SEARXNG_SECRET=REPLACE_WITH_openssl_rand_hex_32
- UWSGI_WORKERS=4
- UWSGI_THREADS=4
depends_on:
- valkey
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
logging:
driver: json-file
options:
max-size: "1m"
max-file: "1"
valkey:
image: docker.io/valkey/valkey:8-alpine
container_name: searxng-valkey
restart: unless-stopped
command: valkey-server --save 30 1 --loglevel warning
volumes:
- valkey-data:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
volumes:
valkey-data:
# After first boot, edit ./searxng/settings.yml:
# server.secret_key: <same 32-byte hex>
# server.limiter: true
# valkey.url: redis://searxng-valkey:6379/0
# then: docker compose restart searxng
Ports to open
| Port | Protocol | Purpose |
|---|---|---|
| 8080 | TCP | SearXNG uwsgi HTTP — keep bound to 127.0.0.1, never expose directly |
| 443 | TCP | HTTPS via your reverse proxy (Caddy/nginx) with a Let's Encrypt cert |
| 6379 | TCP | Valkey/Redis for the rate limiter — internal Docker network only, never published |
Which plan you need
VPS Nano/Small (1 vCPU, 1-2 GB RAM)
Plenty for a private single-user instance; SearXNG idles near zero and only spikes briefly per query.
VPS Pro (2-4 vCPU, 4-8 GB RAM)
Raise UWSGI_WORKERS to match cores; upstream engine fan-out is the main CPU cost, not storage.
VPS Max or Dedicated (8+ vCPU, 16+ GB RAM)
Public instances attract scraper bots; unmetered bandwidth and DDoS protection matter more than raw CPU here.
Best locations: SearXNG is a privacy tool, so pick a privacy-tier location: Switzerland (CH) and Iceland (IS) have strong data-protection law and no mandatory logging; Netherlands (NL) and Luxembourg (LU) give excellent EU peering and low latency for European users; Romania (RO) and Moldova (MD) sit outside 14-Eyes reach for the most jurisdiction-resistant setup. Choose the one closest to you for snappier search, or the most jurisdiction-neutral one if that is your priority.
Hardening checklist
- Never publish port 8080 to 0.0.0.0 — keep it on 127.0.0.1 and terminate TLS at a reverse proxy (Caddy or nginx) with a Let's Encrypt cert using an offshore/no-identity email.
- Set a unique server.secret_key (openssl rand -hex 32) and enable server.limiter: true with Valkey wired in — this is what stops bots from turning your instance into an open scraping relay.
- Keep the instance private: set a non-obvious hostname, and either put it behind HTTP basic-auth / a VPN, or leave it off public instance lists so it is not indexed and hammered by bots.
- Disable engines and features you do not use in settings.yml, and turn off image proxy or metrics endpoints if unneeded to shrink the attack surface.
- Cap container logs (max-size shown above) and drop all Linux capabilities except the few required — SearXNG holds no user data, so the goal is a minimal, log-light, non-persistent footprint that leaves nothing to seize.