·8 min read·Updated Nov 29, 2026

SearXNG on a VPS: Private Search Setup and Honest Limits

Self-host SearXNG on a VPS: Docker setup, rate limiter, private vs public instance, engine blocking on datacenter IPs and what your searches still reveal.

SearXNG is an open-source metasearch engine. It sends your query to engines like Google, Bing, DuckDuckGo and Wikipedia, then merges the results. It doesn't build an advertising profile of you, and it removes tracking redirects from result links. A small VPS can run it easily: 1 GB of RAM is enough for one person or a small group. Getting it running is the easy part. This guide covers the setup and the two harder questions: who your searches are still visible to, and why some engines start failing on a datacenter IP.

What a self-hosted SearXNG instance actually changes

When you search from your browser, the search engine sees your home IP, your browser fingerprint, your cookies and often your logged-in account. With SearXNG on a VPS:

  • Upstream engines see the VPS IP, not your home or mobile IP.
  • No cookies or account are sent upstream. SearXNG keeps your preferences in a cookie on your own browser and doesn't pass it to the engines.
  • Result links go straight to the destination instead of through tracking redirects.
  • Your VPS provider sees encrypted connections to the search engines' hostnames, but not the query text, because those requests use HTTPS.

It does not make your searches anonymous. That distinction matters, so it gets its own section below.

Private instance or public instance?

Decide this before you install, because it changes your configuration and your risk.

Private instance (only you or a small group). This is the right choice for most people. You can lock it behind WireGuard or HTTP authentication, so it stays quiet and has no abuse surface. The downside is that every query reaching Google comes from one IP that represents essentially one person. That IP isn't linked to your name, but the engine can treat it as a single, consistent search history.

Public instance (listed for anyone). Your own queries mix with strangers' queries, which helps against profiling. But public instances attract bots and scrapers, and they hit engine rate limits much faster. You also become the operator of a service other people use, which brings abuse reports and more logging decisions. Unless you specifically want to run a community service, stay private.

Requirements and sizing

  • A KVM VPS running a current Debian or Ubuntu LTS release
  • Docker Engine with the compose plugin
  • A domain or subdomain if you want HTTPS from browsers outside a VPN

SearXNG itself is a Python application. It usually uses a few hundred megabytes of RAM with a small number of workers, and the Valkey (Redis-compatible) cache needed for the rate limiter adds very little. Disk use is tiny. Bandwidth depends mainly on whether you enable the image proxy. With the image proxy on, every thumbnail in image results passes through your server. That's better for privacy, because the image hosts never see your browser, but it can turn a few megabytes a day into gigabytes if several people use it heavily.

A 1 vCPU / 2 GB plan handles a personal instance comfortably. Move to a larger plan only if you're planning a public instance or running other services on the same server.

Step-by-step setup with Docker

The SearXNG project publishes an official container image (searxng/searxng). The layout below keeps configuration in a local directory and binds the web port to localhost only.

1. Create the directory and a secret key

mkdir -p /opt/searxng/searxng && cd /opt/searxng
openssl rand -hex 32

Keep the output. It becomes server.secret_key, which SearXNG uses to sign things like image-proxy URLs. Don't reuse the example value from the documentation.

2. Write a compose file

services:
  searxng:
    image: docker.io/searxng/searxng:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      - ./searxng:/etc/searxng
    environment:
      - SEARXNG_BASE_URL=https://search.example.com/
    depends_on:
      - valkey

  valkey:
    image: docker.io/valkey/valkey:8-alpine
    restart: unless-stopped
    command: valkey-server --save "" --appendonly no --loglevel warning

Two details matter here:

  • 127.0.0.1:8080:8080 keeps the port off the public interface. If you write just 8080:8080, Docker publishes the port to the internet and ignores your host firewall's INPUT rules. That's a well-known trap, explained in why Docker bypasses your VPS firewall.
  • Valkey runs with persistence disabled. It only holds rate-limiter state, so nothing needs to survive a restart, and nothing about your request patterns is written to disk.

3. Configure settings.yml

Start the stack once (docker compose up -d) so the container creates a default searxng/settings.yml. Then edit the key values:

use_default_settings: true

server:
  secret_key: "PASTE_YOUR_GENERATED_KEY"
  limiter: true
  public_instance: false
  image_proxy: true
  method: "POST"

valkey:
  url: valkey://valkey:6379/0

search:
  formats:
    - html

Notes on each setting:

  • method: "POST" keeps the query out of the URL. With GET, queries end up in reverse-proxy access logs, browser history sync and Referer headers.
  • limiter: true turns on SearXNG's built-in bot protection, which needs the Valkey connection. Older releases use a redis: key instead of valkey:. Check the settings reference for the version you're running rather than assuming.
  • formats: [html] leaves the JSON API off. An open JSON endpoint is what scrapers look for, and it's a quick way to get your IP rate-limited by every upstream engine.

Apply the changes with docker compose up -d --force-recreate.

4. Put a reverse proxy or a VPN in front

Option A: VPN only. If only you use the instance, the simplest secure setup exposes nothing publicly. Run WireGuard on the VPS, bind SearXNG to the WireGuard address or reach it through localhost forwarding, and set your browser's search engine to the internal address. No domain, no certificate and no public attack surface.

Option B: HTTPS on a domain. With Caddy, a minimal site block looks like this:

search.example.com {
    reverse_proxy 127.0.0.1:8080
    log {
        output discard
    }
}

Add basic_auth if the instance is meant for a closed group. Discarding access logs is a deliberate choice: SearXNG doesn't need them, and with POST requests they would only record IPs and timestamps. For a broader approach to logging on the same server, see VPS log minimization.

Verification

Check these before you rely on the instance:

docker compose ps                       # both containers "running"
curl -sI http://127.0.0.1:8080 | head -1 # expect HTTP/1.1 200
ss -tlnp | grep 8080                     # should show 127.0.0.1 only

From a machine outside the VPN, confirm that port 8080 on the public IP doesn't answer. Then run a test search and open the Preferences → Engines page. It shows which engines are enabled. After some use, the instance statistics page shows which engines are returning errors.

Troubleshooting: engines that stop answering

This is where most new operators get frustrated. Large search engines treat traffic from datacenter IP ranges with suspicion. Google in particular often answers automated-looking requests from hosting providers with CAPTCHA pages. When that happens, SearXNG marks the engine as suspended for a while and leaves its results out.

This happens with VPS providers in every country. It isn't specific to Romania, and SearXNG can't fully fix it. What helps:

  • Spread queries across engines. Enable several general engines (Bing, Brave, DuckDuckGo, Mojeek, Qwant, Startpage) so one suspension doesn't leave you with empty results.
  • Keep the instance private. A single user rarely triggers the limits. A public instance with scraper traffic triggers them constantly.
  • Don't route through Tor by default. SearXNG can send outgoing requests through a SOCKS proxy, and Tor hides the VPS IP from engines. But many engines block Tor exits completely, so results get noticeably worse. It's an option for specific threat models, not a fix for rate limiting.
  • Check the IP before blaming SearXNG. If an engine refuses you from the first query, the IP may already have a poor reputation from a previous tenant. The checks in Romania VPS IP addresses: what to check apply here as well.

Privacy limits you should be honest with yourself about

A self-hosted search engine changes who can link your searches to you. It doesn't stop anyone from seeing them.

  • Engines still see every query. They see them coming from your VPS IP. If you're the only user, that IP is effectively you under a pseudonym.
  • Correlation can bring your identity back. If you also log into a Google account from the same VPS IP, for example through a VPN exit on the same server, the engine can link the pseudonymous query history to your account.
  • You are now the operator who can see everything. On a shared instance, the administrator could log queries. That's you, so treat any group instance as a trust relationship.
  • The path from your browser to the VPS needs protection too. Without TLS or a VPN, anyone between you and the server can read your queries.
  • Clicking a result leaves SearXNG behind. Once you open a site, it sees your real browser and IP unless you're also using a VPN or Tor.

For many people the realistic gain is still worth it: no ad profile, no search history tied to an account, and no tracking redirects. Just don't expect SearXNG to do the job of Tor Browser.

Who this setup suits

A personal SearXNG instance fits people who want everyday search without account-based profiling and who already run, or want to run, a small VPS. It pairs well with a self-hosted WireGuard VPN on the same server. It isn't a good choice if you need search to be anonymous against a capable adversary, or if you don't want to maintain a container and occasionally adjust engine lists.

If you want somewhere to run it, IronBalkans' Iron 1 plan (1 vCPU, 2 GB RAM, 20 GB SSD, €7.99/month) covers a private instance with room to spare. You can sign up without an email address and pay in Monero, Bitcoin or Litecoin. Choose a larger plan only if SearXNG will share the server with heavier services.

Written by IronBalkans. Last reviewed Nov 29, 2026.