SearXNG Installation Guide

This guide covers multiple installation methods for setting up your own SearXNG instance.

Installation Methods

The easiest and most reliable method is using Docker or Podman containers.

Prerequisites:

  • Docker or Podman installed
  • Basic knowledge of container management

Steps:

# Pull the official SearXNG image
docker pull searxng/searxng

# Run with basic configuration
docker run -d --name searxng -p 8080:8080 searxng/searxng

2. Installation Script

An automated installation script is available that handles most configuration automatically, including uWSGI setup.

Steps:

# Download the installation script
curl -O https://raw.githubusercontent.com/searxng/searxng/master/utils/searxng.sh

# Make it executable and run
chmod +x searxng.sh
sudo ./searxng.sh

3. Step-by-Step Manual Installation

For advanced users who want full control over the installation process.

Prerequisites:

  • Python 3.8 or higher
  • uWSGI
  • Git
  • Build tools (gcc, make, etc.)
  • Web server (NGINX or Apache)

Installation Steps:

  1. Install Required Packages:

    # Ubuntu/Debian
    sudo apt install python3 python3-pip python3-venv python3-dev build-essential git uwsgi uwsgi-plugin-python3
    
    # CentOS/RHEL
    sudo yum install python3 python3-pip python3-devel gcc git uwsgi uwsgi-plugin-python3
    
  2. Create Dedicated User:

    sudo useradd -r -s /bin/false searxng
    
  3. Clone Repository:

    sudo -u searxng git clone https://github.com/searxng/searxng.git /opt/searxng
    cd /opt/searxng
    
  4. Configure Settings:

    # Copy default settings
    sudo cp /opt/searxng/searxng/settings.yml /etc/searxng/settings.yml
    
    # Edit configuration as needed
    sudo nano /etc/searxng/settings.yml
    
  5. Set Up Web Server:

    NGINX Configuration Example:

    server {
        listen 80;
        server_name your-domain.com;
        
        location / {
            include uwsgi_params;
            uwsgi_pass unix:/run/uwsgi/app/searxng/socket;
        }
    }
    

Post-Installation

After installation, access your SearXNG instance at http://your-server:port and verify it's working correctly. You can customize the appearance, engines, and behavior through the settings.yml configuration file.

Troubleshooting

  • Permission Issues: Ensure the searxng user has proper permissions on all files
  • Port Conflicts: Verify the chosen port is not already in use
  • Engine Configuration: Some search engines may require API keys or specific configuration
  • SSL Setup: For production use, configure SSL certificates using Let's Encrypt or your preferred CA