A search page is an easy service to add to a homelab; deciding who can reach it deserves just as much attention as choosing its engines. SearXNG lets you run that page and its configuration yourself, while other search providers still supply the results. Start with access restricted to your household, get the official container stack working, then decide whether its control over engines and local logs earns a place in your regular maintenance.

What Exactly Is SearXNG?

SearXNG is a fork of the original SearX project, designed to be a self-hosted metasearch engine. Instead of building its own index, it sends queries to configured upstream engines and aggregates their results. Those engines normally see the SearXNG server’s network address rather than the browser client’s address, and they do not receive the browser’s cookies for their sites. They still receive the query text and can observe the server, so a uniquely identifying query can still identify its subject. If you share an instance, its operator controls the deployment and may log traffic; access controls do not remove the need to trust that operator.

Running the open-source software in your homelab lets you choose engines, adjust the interface, set rate limits and configure search plugins. Those choices make it useful for a particular household or workflow, provided you are willing to maintain the service behind them.

Why Self-Host a Search Engine?

A public instance can be convenient. Your own deployment gives you more direct control over three parts of the setup:

  • Control of the instance: You choose the software, enabled engines, logging policy, and access controls. Upstream search engines still receive queries from the SearXNG server, and software or host compromise remains possible.
  • Control of the client hop: A local instance removes the internet hop between your browser and SearXNG, but SearXNG must still contact upstream engines, so total search latency remains internet-dependent.
  • Customization: Choose the configured engines and categories you want to query, including supported academic sources. Check each provider’s behavior and privacy policy rather than assuming an engine selection excludes every commercial site or makes every query anonymous.

That control comes with an always-on host, updates and occasional repairs when an upstream engine blocks the instance. If you are comparing SearXNG with a paid search subscription, put the subscription price beside the host costs and your own maintenance hours per month. Record those hours during a trial rather than borrowing somebody else's estimate. A small engine set makes a sensible first comparison: you can judge the results you actually use and see which part of the setup needs attention.

What You’ll Need Before Starting

  • Hardware: An always-on x86-64 or ARM64 host. Resource use depends heavily on enabled engines, traffic, bot protection, and image proxying; monitor the container rather than relying on a universal minimum.
  • Operating System: A Linux host supported by the Docker installation method you choose, with an architecture compatible with the stack’s images. Check Docker’s requirements for that host rather than assuming every Linux environment is interchangeable.
  • Docker and Docker Compose: The installation method used below. Follow Docker’s official installation instructions for your distribution.
  • A hostname for HTTPS: Choose the name and certificate arrangement your reverse proxy will use. The local container check comes first; do not expose it publicly merely to try a search.
  • Basic terminal comfort: You will edit configuration files and run Compose commands. Use Docker's instructions for your host, and have a working backup of the deployment before experimenting with upgrades.

Step-by-Step Installation with Docker

Use the Compose template maintained by SearXNG rather than writing a stack from an old blog post. The current official container guide[1] creates a core service plus Valkey:

mkdir -p searxng/core-config
cd searxng
curl -fsSL \
  -O https://raw.githubusercontent.com/searxng/searxng/master/container/docker-compose.yml \
  -O https://raw.githubusercontent.com/searxng/searxng/master/container/.env.example
cp -i .env.example .env

Before starting the stack, edit .env and set SEARXNG_HOST=127.0.0.1 when the reverse proxy will run directly on the same host. The current Compose template[2] otherwise publishes its default port, 8080, on all host interfaces. A proxy in another container or on another machine needs its own reachable, restricted connection; loopback in that proxy is not automatically the SearXNG host.

Create core-config/settings.yml for your local overrides. Generate a secret with openssl rand -hex 32, replace the placeholder below with its output, and use your own final HTTPS hostname for base_url. Keep the placeholder URL only as an example while planning the proxy:

use_default_settings: true
server:
  secret_key: "replace-with-a-random-secret"
  base_url: https://search.example.com/
  limiter: true

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

Start with docker compose up -d, then check http://127.0.0.1:8080 from the SearXNG host. Use docker compose ps to check the service state and the logs below to investigate a failure before moving on to the proxy. When you later change the mounted settings, restart the core service to load them:

docker compose restart core
docker compose logs -f core

The shipped settings already contain the supported engine definitions. Enable or disable engines by overriding those existing definitions in core-config/settings.yml, using the documentation for the same version as the image you run. Pin SEARXNG_VERSION in .env if you need reproducible upgrades rather than tracking latest.

Putting It Behind a Reverse Proxy with HTTPS

Once local search works, connect a maintained reverse proxy and give it a valid certificate for the hostname in server.base_url. Keep the container port reachable only through the intended host or internal network. For a household service, put the access restriction in place before making the hostname available outside that network.

The limiter also needs to know which client made a request. Follow its proxy-header guidance[3]: pass X-Forwarded-For and X-Real-IP correctly, and configure botdetection.trusted_proxies for the proxy addresses SearXNG actually sees. Trust only the relevant proxies. Forwarding a header alone does not establish which sender is allowed to supply it.

If the service is only for your household, a VPN or tailnet is the smaller attack surface. Public exposure means you must maintain the proxy, SearXNG, Valkey, TLS, rate limiting, and access policy. Consult the SearXNG container guide[1] and limiter documentation[3] whenever you update the image because the official templates and settings can change.

Using Your New Private Search Engine

Navigate to your configured HTTPS hostname, such as https://search.example.com. The interface is clean and minimal. Type a query and hit enter. SearXNG queries the enabled engines and blends their results. Its own interface does not inject a commercial ad unit by default, although the upstream engines still determine what results they return.

Power-user features worth knowing:

  • Shortcuts: Prefix a query with an enabled engine’s shortcut, such as !wp linux kernel for Wikipedia where that engine is available. Check your instance’s engine list because names and shortcuts can change.
  • Preferences: Open Preferences from the settings icon. Where the administrator has not locked the options, choose a default language, select engines by category and adjust SafeSearch for engines that support it. The current default theme is simple; its style choices include auto, light, dark and black. Available themes and preferences depend on your installed instance.
  • Search categories: Category tabs narrow results to configured subsets of engines. The available tabs depend on the version and the engines you enable.
  • Browser integration: To make SearXNG your default search engine, add a custom search engine with the URL https://search.yourdomain.com/search?q=%s. Browser steps differ by version; confirm the custom search URL before making it the default.

Customizing SearXNG to Fit Your Needs

Once the basic search and access controls work, adjust the engine set and interface around the searches you actually make.

Tweaking the UI

The current documentation uses the simple theme. To set that default explicitly in core-config/settings.yml:

ui:
  default_theme: simple

For deeper visual changes, use the theme instructions for your installed version. Check how the container serves the selected theme before adding a host user.css; the file has no effect until that serving path is configured.

Engine Finetuning

An upstream engine may throttle or challenge the SearXNG server address. If one fails repeatedly, disable it or choose other supported engines; no single fallback set is guaranteed to work forever. Choose engines according to the data you are willing to send upstream. Switching providers changes who receives the server-side request; it does not make the query inherently anonymous.

Engine names and options change over time. Start from the engine definitions shipped with your installed SearXNG version and override only the fields you need; do not paste an old engine stanza that may no longer exist.

Limiting Abuse

For an internet-facing instance, keep the limiter and its Valkey connection working alongside the proxy configuration. Put the following optional link_token override in core-config/limiter.toml, separate from settings.yml. The limiter documentation[3] places that file at /etc/searxng/limiter.toml inside the container; the official Compose mount connects it to core-config on the host:

[botdetection.ip_limit]
link_token = true

Use the documented sliding-window limiter settings for the version you run and check them alongside the proxy’s client-address handling. For a household instance, authentication or tailnet-only access may be easier to maintain than a publicly reachable, unauthenticated service.

Maintenance and Keeping Things Healthy

SearXNG still needs regular attention, especially when upstream engines change.

  • Updates: Set a recurring time to review upstream changes and your pinned image version. For an upgrade, back up the deployment, review template and environment changes, then follow the official update sequence[1]: docker compose down, docker compose pull, docker compose up -d. If you pinned a version, choose the intended new tag before pulling.
  • Monitoring: Watch logs with docker compose logs -f core. If an engine consistently fails, disable it. Upstream engines change interfaces and defenses, so review errors before assuming the local container is broken.
  • Backups: Save docker-compose.yml, core-config, .env and the reverse-proxy configuration to a protected backup destination outside this deployment. Keep the image tag with that copy. The official stack also uses the named core-data and valkey-data volumes; decide whether to preserve or rebuild that state, and write down the choice so recovery is deliberate. Check that the backup can be restored before relying on it.
  • Performance: Measure your instance with its actual engine set and traffic. If searches are slow or unreliable, inspect per-engine errors and timeouts before raising the global request timeout; a failing engine can be disabled without slowing every query.

Honest Trade-Offs

Expect occasional upstream trouble. An engine may break when a provider changes its page format or presents a CAPTCHA, and an update may repair it without a predictable recovery date. Image and video results depend on those upstream services too; an optional image proxy adds work to your host. You may also miss the location-aware or personalized results of a signed-in commercial account.

Autocomplete deserves the same privacy decision as the engine set. The current default configuration selects DuckDuckGo autocomplete, whose implementation sends the query text to that provider for suggestions. If you do not want that extra request path, disable autocomplete in Preferences or set search.autocomplete to an empty string in the instance configuration. Review the configured providers before relying on the setup’s privacy boundary.

Try the basic stack on a host you can keep updated, restrict access to the people who need it and back up the configuration before experimenting. Then compare the results with your usual search workflow. If the reduced browser metadata and configurable engines are useful enough to justify occasional repairs, you have a service worth keeping; if not, the trial will have shown where the maintenance cost falls.