Quick-wiki: Searx

Quick-wiki: Searx

This is a quick-wiki for quick reference for my occasional Searx installations.

Table of Content

Set as default search engine

https://SEARX-URL/?q=%s

Above is a slight variation from vanilla installation specific, to my changes. For vanilla installation use the following string in place:

https://SEARX-URL/searx?q=%s
https://SEARX-URL/?q=%s

Above is a slight variation from vanilla installation, specific to my changes. For vanilla installation use the following string in place:

https://SEARX-URL/searx?q=%s

Optionally add a custom search keyword (shortcut) too like :s to make search on said search engine by prepending search term with :s.

Update to new release

Check for new releases and changelogs on GitHub (usually 6 months).

Little tweaked version of official documentation customized towards my installation.

sudo -H -u searx -i
cd searx-src
git pull origin master
./manage.sh update_packages
exit
sudo -H systemctl restart uwsgi

Restart

For restarting uWSGI:

sudo -H systemctl restart uwsgi

For restarting searx

sudo -H service uwsgi restart searx

Nginx configuration

Add these and let certbot handle the rest (including https redirections). Taken from documentation.

server {        
        server_name instance_name;

        # changed from default /searx to have search on base
        # filtron configs
        location / {
                proxy_pass         http://127.0.0.1:4004/;

                proxy_set_header   Host             $host;
                proxy_set_header   Connection       $http_connection;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_set_header   X-Scheme         $scheme;
                # commented following proxy_set_header to remove 
                # /searx from getting appended in each search URL
                # proxy_set_header   X-Script-Name    /searx;
        }

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

        # morty configs
        location /morty {
                proxy_pass         http://127.0.0.1:3000/;

                proxy_set_header   Host             $host;
                proxy_set_header   Connection       $http_connection;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_set_header   X-Scheme         $scheme;
        }
}

Settings file

Most things are customized via settings.yml file.

The lookup order for settings.yml is

  1. Path set in SEARX_SETTINGS_PATH environment variable.
  2. /etc/searx/settings.yml
  3. In searx git repo in searx/settings.yml

Main is in /etc/searx/settings.yml and full is in /usr/local/searx/searx-src/searx.

Interface and other changes

To change favicon and logo, make changes in searx/searx/static/themes/[theme-used]/img.

Following are some handy variables to change/customize in settings.yml:

To generate keys:

openssl rand -base64 33

Search engines configuration

To disable a specific engine, add the following in settings.yml:

disabled : True

TODO - find how to disable certain categories on search page.

Features

Glossary