# SearXNG

> Privacy-respecting metasearch engine.

- Category: Home Lab & Self-Hosting
- Difficulty: beginner
- Components: searxng
- Tags: searxng, search, privacy, metasearch
- Source: https://docker.recipes/homelab/searxng

## Overview

SearXNG is an open-source, privacy-focused metasearch engine that aggregates results from over 70 search engines including Google, Bing, DuckDuckGo, Wikipedia, and specialized sources without tracking users or storing personal data. Originally forked from the Searx project, SearXNG provides enhanced performance, additional features, and more active development while maintaining the core philosophy of private search. The application runs as a lightweight Python web service that proxies search requests through multiple engines and presents unified results without revealing user information to the underlying search providers. This containerized deployment simplifies the installation process by handling all Python dependencies and configuration requirements within an isolated environment. SearXNG serves users who prioritize digital privacy, system administrators setting up organizational search infrastructure, and anyone seeking an alternative to commercial search engines that collect user data. The Docker implementation makes it accessible for homelab enthusiasts and small organizations without requiring extensive Python or web server configuration knowledge.

## Features

- Aggregates search results from 70+ engines including Google, Bing, Wikipedia, Reddit, GitHub, and academic databases
- Zero user tracking with no cookies, session storage, or IP address logging
- Built-in search result filtering and ranking algorithms to remove duplicates and improve relevance
- Customizable engine selection with per-category preferences for web, images, videos, news, and scientific content
- OpenSearch XML support for easy browser integration as default search provider
- Multi-language interface with support for 60+ languages and regional search preferences
- JSON and RSS result output formats for programmatic access and integration
- Real-time search suggestions and autocomplete functionality without external API calls

## Use cases

- Personal privacy-focused search engine for individuals avoiding data collection by commercial providers
- Corporate search infrastructure for organizations requiring confidential research capabilities
- Educational institution search portal for students and researchers needing academic source aggregation
- Homelab addition for tech enthusiasts building self-hosted service ecosystems
- Development environment search tool for programmers needing code repositories and documentation
- Public library or community center search service for patron privacy protection
- Journalist and investigative research tool for sensitive information gathering

## Prerequisites

- Docker and Docker Compose installed with minimum 512MB available RAM
- Port 8080 available on the host system for web interface access
- Reliable internet connection for accessing upstream search engine APIs
- Basic understanding of YAML configuration for customizing search engine settings
- Web browser with JavaScript enabled for full interface functionality
- Optional: reverse proxy knowledge for HTTPS setup and domain configuration

## docker-compose.yml

```yaml
services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    restart: unless-stopped
    volumes:
      - searxng_config:/etc/searxng
    ports:
      - "8080:8080"

volumes:
  searxng_config:
```

## .env

```bash
# No additional config needed
```

## Usage notes

- Docs: https://docs.searxng.org/
- Access at http://localhost:8080
- Aggregates results from 70+ search engines
- No tracking, no ads, no data collection
- Customize settings.yml to enable/disable engines
- Set as browser default search with opensearch.xml

## Troubleshooting

- Search results showing 'Engine timeout' errors: Increase timeout values in settings.yml or disable slow-responding engines in the engines section
- No results returned for specific search types: Check that relevant engines are enabled in settings.yml and verify internet connectivity to upstream providers
- Interface loading slowly or timing out: Reduce the number of enabled search engines or increase Docker container memory allocation above 512MB
- OpenSearch integration not working in browser: Verify the public_instance configuration in settings.yml matches your actual domain or IP address
- 403 Forbidden errors when searching: Configure proper user-agent strings in settings.yml and ensure rate limiting settings don't conflict with engine requirements
- Container fails to start with permission errors: Check that the searxng_config volume has proper write permissions for the container user

