Search
🔍

SearXNG

A privacy-respecting, hackable metasearch engine that aggregates results from various search services without tracking users

Intermediate open-source self-hosted privacy metasearch python

Alternative To

  • • Serper
  • • Algolia
  • • Tavily

Difficulty Level

Intermediate

Requires some technical experience. Moderate setup complexity.

Overview

SearXNG is a free, privacy-respecting internet metasearch engine that aggregates results from over 70 different search services and databases. Unlike traditional search engines, SearXNG doesn’t track users, create profiles, or share information with third parties. It acts as a proxy between users and search engines, ensuring your search habits remain private while still delivering high-quality results.

Key Features

| Metasearch Capability | Aggregates results from 70+ search engines | | Customizable | Extensive configuration options for search preferences | | Self-Hostable | Can be run locally or on your own server | | Multiple Categories | Web, Images, Videos, News, Maps, Music, Files, Science, and more | | Search Filters | Filter by time, language, region, and safe search level | | Proxy Support | Built-in image proxy for enhanced privacy | | API Access | RESTful API for programmatic access | | Responsive UI | Works on desktop and mobile devices | | Multilingual | Supports 58+ languages and translations |

Technical Details

SearXNG is a fork of the original Searx project with significant improvements in user interface, features, and maintainability. It’s built with Python and uses a modern web framework for its interface.

ComponentDetails
BackendPython 3.7+
Web FrameworkFlask
Template EngineJinja2
FrontendHTML5, CSS3, JavaScript
DatabaseNone (stateless by default, optional Redis for rate limiting)
LicenseAGPL-3.0
Latest VersionContinuously updated (rolling release)
ArchitectureModular, plugin-based system

Why Use SearXNG

SearXNG offers several advantages over traditional search engines and even other privacy-focused alternatives:

  1. True Privacy: Unlike commercial search engines that track your searches to build a profile for targeted advertising, SearXNG doesn’t store any information about you or your searches.

  2. Aggregated Results: By combining results from multiple search engines, SearXNG often provides more comprehensive results than using a single search engine.

  3. Customization: You can enable or disable specific search engines, adjust result rankings, and customize the appearance to suit your preferences.

  4. Self-Hosting: Running your own instance gives you complete control over your search experience and ensures your queries never leave your infrastructure until they reach the search engines.

  5. No Filter Bubble: SearXNG doesn’t personalize results based on past behavior, helping you escape the “filter bubble” effect of many commercial search engines.

  6. Open Source: The codebase is fully open and can be audited, modified, and improved by the community.

System Requirements

SearXNG is relatively lightweight and can run on modest hardware:

  • CPU: 2+ cores recommended for smooth operation
  • RAM: 1GB+ (more if handling high traffic)
  • Storage: 500MB+ for the application and dependencies
  • Network: Stable internet connection
  • Operating System: Linux (recommended), macOS, or Windows with WSL

Installation Guide

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)
  • Git
  • Basic knowledge of command-line interfaces

The simplest way to run SearXNG is using Docker:

  1. Install Docker on your system if not already installed.

  2. Create a directory for SearXNG configuration:

    mkdir -p searxng/data
    cd searxng
    
  3. Run the SearXNG Docker container:

    docker run --name searxng -d -p 8080:8080 \
      -v "${PWD}/data:/etc/searxng" \
      -e "BASE_URL=http://localhost:8080/" \
      -e "INSTANCE_NAME=my-searxng" \
      searxng/searxng
    
  4. Access SearXNG at http://localhost:8080

Manual Installation

For those who prefer a manual installation:

  1. Install required packages (Ubuntu/Debian example):

    sudo apt-get install -y python3-dev python3-babel python3-venv \
      uwsgi uwsgi-plugin-python3 \
      git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev
    
  2. Create a dedicated user for SearXNG:

    sudo useradd --shell /bin/bash --system \
      --home-dir "/usr/local/searxng" \
      --comment 'Privacy-respecting metasearch engine' \
      searxng
    
    sudo mkdir "/usr/local/searxng"
    sudo chown -R "searxng:searxng" "/usr/local/searxng"
    
  3. Clone the repository and set up a virtual environment:

    sudo -H -u searxng -i
    git clone "https://github.com/searxng/searxng" "/usr/local/searxng/searxng-src"
    python3 -m venv "/usr/local/searxng/searx-pyenv"
    echo ". /usr/local/searxng/searx-pyenv/bin/activate" >> "/usr/local/searxng/.profile"
    
  4. Install SearXNG and its dependencies:

    # Start a new shell to activate the virtual environment
    sudo -H -u searxng -i
    
    # Update pip and install dependencies
    pip install -U pip setuptools wheel pyyaml
    
    # Install SearXNG
    cd "/usr/local/searxng/searxng-src"
    pip install --use-pep517 --no-build-isolation -e .
    
  5. Create a configuration file:

    sudo mkdir -p "/etc/searxng"
    sudo cp "/usr/local/searxng/searxng-src/utils/templates/etc/searxng/settings.yml" \
             "/etc/searxng/settings.yml"
    
    # Generate a random secret key
    sudo sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" \
             "/etc/searxng/settings.yml"
    
  6. Run SearXNG:

    sudo -H -u searxng -i
    cd /usr/local/searxng/searxng-src
    export SEARXNG_SETTINGS_PATH="/etc/searxng/settings.yml"
    python searx/webapp.py
    
  7. Access SearXNG at http://127.0.0.1:8888

For production use, it’s recommended to set up SearXNG with a proper web server like Nginx or Apache and a WSGI server like uWSGI. Refer to the official documentation for detailed instructions.

Practical Exercise: Customizing Your SearXNG Instance

Let’s walk through a practical exercise to customize your SearXNG instance to suit your preferences.

Step 1: Modify Search Engine Settings

  1. Locate your settings.yml file:

    • Docker: In the data directory you mounted
    • Manual installation: /etc/searxng/settings.yml
  2. Edit the file to enable or disable specific search engines:

    search:
      safe_search: 1 # 0: None, 1: Moderate, 2: Strict
      autocomplete: "duckduckgo" # Options: 'duckduckgo', 'google', 'qwant', 'startpage', 'swisscows', 'wikipedia'
    
    engines:
      - name: google
        engine: google
        shortcut: g
        disabled: false
      - name: duckduckgo
        engine: duckduckgo
        shortcut: ddg
        disabled: false
      - name: bing
        engine: bing
        shortcut: b
        disabled: true
    
  3. Save the file and restart SearXNG.

Step 2: Configure Privacy Features

Enhance privacy by enabling the image proxy and request limiter:

server:
  secret_key: "your_secret_key" # Already set during installation
  limiter: true # Enables rate limiting to prevent abuse
  image_proxy: true # Proxies images to prevent tracking

Step 3: Customize the User Interface

Modify the appearance of your SearXNG instance:

ui:
  static_use_hash: true # Enables cache busting
  default_theme: simple # Options: simple, oscar, legacy
  theme_args:
    simple_style: auto # Options: auto, light, dark

Step 4: Test Your Configuration

  1. Restart your SearXNG instance to apply the changes.
  2. Perform various searches to test different engines and features.
  3. Try searching for images with the proxy enabled to verify privacy protection.

Resources

Official Documentation

Community Support

Additional Resources

  • Public Instances - List of public SearXNG instances
  • Weblate - Help translate SearXNG
  • Wiki - Community-maintained wiki with tips and tricks

Suggested Projects

You might also be interested in these similar projects:

🤖

CrewAI

CrewAI is a standalone Python framework for orchestrating role-playing, autonomous AI agents that collaborate intelligently to tackle complex tasks through defined roles, tools, and workflows.

Difficulty: Intermediate
Updated: Mar 23, 2025

PydanticAI is a Python agent framework designed to make it less painful to build production-grade applications with Generative AI, featuring strong type safety and validation.

Difficulty: Intermediate
Updated: Mar 23, 2025

RAG-powered document interaction platform that keeps your data 100% private

Difficulty: Intermediate
Updated: Mar 1, 2025