Searx

Runs at 10.1.1.4, not available publicly.

Setup

The setup is based on the official install documentation and the Python 3 page.

apt install git build-essential libxslt-dev python-dev python-virtualenv python-babel zlib1g-dev libffi-dev libssl-dev uwsgi uwsgi-plugin-python3 nginx

cd /usr/local
git clone https://github.com/asciimoo/searx.git
useradd searx -d /usr/local/searx
chown searx:searx -R /usr/local/searx

cd /usr/local/searx

sudo -H -u searx -i
virtualenv -p python3 venv3
. ./venv3/bin/activate
pip3 install -r requirements.txt
sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
sed -i -e "s/bind_address : \"127.0.0.1\"/bind_address : \"10.1.1.4\"/g" searx/settings.yml
# Test if everything works, then kill Searx.
python searx/webapp.py

# Exit back to regular root shell.

# Change settings according to Searx config from below.
nano /usr/local/searx/searx/settings.yml

# Paste Uwsgi config from below.
nano /etc/uwsgi/apps-available/searx.ini
ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/searx.ini

# Paste Uwsgi config from below.
nano /etc/nginx/sites-available/searx
ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx

service nginx restart && service uwsgi restart

Updates

Subscribe to the releases on GitHub.

TBD, see 1

Configs

Uwsgi config

[uwsgi]
# Who will run the code
uid = searx
gid = searx

# disable logging for privacy
disable-logging = true

# Number of workers (usually CPU count)
workers = 4

# The right granted on the created socket
chmod-socket = 666

# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python3
lazy-apps = true
enable-threads = true

# Module to import
module = searx.webapp

# Support running the module from a webserver subdirectory.
route-run = fixpathinfo:

# Virtualenv and python path
virtualenv = /usr/local/searx/venv3/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

Nginx config

server {
    listen 80;
    server_name 10.1.1.4;
    root /usr/local/searx/searx;

    access_log /dev/null;
    error_log /dev/null;

    location /static {
    }

    location / {
        include uwsgi_params;
        uwsgi_pass unix:/run/uwsgi/app/searx/socket;
    }

    location /searx/static {
        alias /usr/local/searx/searx/static;
    }

    location /searx {
        proxy_pass http://127.0.0.1:8888;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Script-Name /searx;
        proxy_buffering off;
    }
}

Searx config

general:
    instance_name : "searx.altpeter.me"

search:
    autocomplete : "qwant"
    default_lang : "en"

server:
    image_proxy : True

ui:
    theme_args :
        oscar_style : pointhi

outgoing: # communication with search engines
    request_timeout : 5.5

# Enable the following engines:
# duckduckgo, qwant, startpage, duckduckgo_images, unsplash

# Disable the following engines:
# bing, google, bing_images

# Create an API key for Flickr.