Bloggings

Home

SearxNG on my laptop

05-11-2023

To keep my searches private, I've installed SearxNG on the T430.

Here's how I did it: My OS is Arch linux.

$ cd ~/Downloads 
$ git clone https://github.com/searxng/searxng.git searxng 
$ cd searxng sudo -H ./utils/searxng.sh install all 

I use Nginx as a web server on my laptop, so I added the following in /etc/nginx/sites-available/localhost

location /searxng {
  uwsgi_pass unix:///usr/local/searxng/run/socket;
  include uwsgi_params;
  uwsgi_param    HTTP_HOST             $host;
  uwsgi_param    HTTP_CONNECTION       $http_connection;

  # see flaskfix.py
  uwsgi_param    HTTP_X_SCHEME         $scheme;
  uwsgi_param    HTTP_X_SCRIPT_NAME    /searxng;
  # see limiter.py 
  uwsgi_param    HTTP_X_REAL_IP      $remote_addr;
  uwsgi_param    HTTP_X_FORWARDED_FOR  $proxy_add_x_forwarded_for;
}

Navigate to localhost/searxng and there's our search engine.

In order to use it as the default search engine in Firefox, right click on the url and select searxng as a search engine.

Then in settings set searxng as the default search engine.


A minimalist blog by Philip Wittamore