SearXNG
A privacy-respecting, hackable metasearch engine that aggregates results from various search services without tracking users
Alternative To
- • Serper
- • Algolia
- • Tavily
Difficulty Level
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.
| Component | Details |
|---|---|
| Backend | Python 3.7+ |
| Web Framework | Flask |
| Template Engine | Jinja2 |
| Frontend | HTML5, CSS3, JavaScript |
| Database | None (stateless by default, optional Redis for rate limiting) |
| License | AGPL-3.0 |
| Latest Version | Continuously updated (rolling release) |
| Architecture | Modular, plugin-based system |
Why Use SearXNG
SearXNG offers several advantages over traditional search engines and even other privacy-focused alternatives:
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.
Aggregated Results: By combining results from multiple search engines, SearXNG often provides more comprehensive results than using a single search engine.
Customization: You can enable or disable specific search engines, adjust result rankings, and customize the appearance to suit your preferences.
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.
No Filter Bubble: SearXNG doesn’t personalize results based on past behavior, helping you escape the “filter bubble” effect of many commercial search engines.
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
Docker Installation (Recommended)
The simplest way to run SearXNG is using Docker:
Install Docker on your system if not already installed.
Create a directory for SearXNG configuration:
mkdir -p searxng/data cd searxngRun 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/searxngAccess SearXNG at http://localhost:8080
Manual Installation
For those who prefer a manual installation:
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-devCreate 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"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"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 .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"Run SearXNG:
sudo -H -u searxng -i cd /usr/local/searxng/searxng-src export SEARXNG_SETTINGS_PATH="/etc/searxng/settings.yml" python searx/webapp.pyAccess 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
Locate your
settings.ymlfile:- Docker: In the
datadirectory you mounted - Manual installation:
/etc/searxng/settings.yml
- Docker: In the
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: trueSave 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
- Restart your SearXNG instance to apply the changes.
- Perform various searches to test different engines and features.
- Try searching for images with the proxy enabled to verify privacy protection.
Resources
Official Documentation
- SearXNG Documentation - Comprehensive guide for users, administrators, and developers
- GitHub Repository - Source code and issue tracking
Community Support
- Matrix Channel - Real-time chat with the SearXNG community
- IRC Channel - #searxng on libera.chat
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 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.
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.