Setting up searx with gunicorn and supervisor

What is searx?

searx is a privacy-respecting, hackable metasearch engine

I have been using my own instance of searx at mostly because I can. :)

For some reason, my instance seems to go down at some random time, and I assumed it was uwsgi. :P And also because I wanted to try gunicorn and supervisor.

Most of the setup steps are already documented on the wiki at, but I’ll recount the steps here anyways.

Install packages (extra package: supervisor):

    sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev supervisor

Install searx:

    cd /usr/localsudo 
    git clone
    sudo useradd searx -d /usr/local/searx
    sudo chown searx:searx -R /usr/local/searx

Install dependencies in a virtualenv (extra package: gunicorn):

    sudo -u searx -icd /usr/local/searx
    virtualenv searx-ve. 
    pip install -r requirements.txt
    pip install gunicorn
    python install

Configure secretkey:

    sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml

Make a configuration file:

    sudo touch /etc/supervisor/conf.d/searx.conf

Edit the above conf to include:

    command=/usr/local/searx/searx-ve/bin/gunicorn searx.webapp:app

Then start the supervisor service:

    sudo service supervisor start
Maverick Kaung
Maverick Kaung
IT Security Enthusiast

Ye Myat “Maverick” Kaung is a highly motivated individual with a passion for security and open source software. Also an aspiring hacker and software engineer.