Searx Supplementary Files

by Nicholas Henkey — on  , 

cover-image

I posted how to video instructions on YouTube, Odysee, and BitChute. These are the supplementary materials for your convenience. In this document you will find setup commands, other helpful commands, and links to configuration files demoed for Searx server setup.

Commands

Setup Process and Important Commands for Setup

Remember to harden your server if you will be using it for production. There are a ton of bots out there attempting to brute force servers! UFW firewall is a bare minimum for your server's security but server hardening is beyond the scope of the video and this post. Universally, all of you will need to run the following commands to get Searx installed on your server:

  1. sudo apt update
  2. sudo apt upgrade
  3. apt install net-tools nginx python3-certbot-nginx -y
  4. mkdir /home/Downloads
  5. cd /home/Downloads/
  6. git clone https://github.com/searx/searx searx
  7. cd searx/
  8. sudo -H ./utils/searx.sh install all
  9. sudo -H ./utils/filtron.sh install all
  10. sudo -H ./utils/morty.sh install all
  11. sudo -H ./utils/filtron.sh nginx install
  12. sudo -H ./utils/morty.sh nginx install

After you create your searx nginx configuration file, you can activate it by using the following symbolic link command (assumes your config file is named "searx") - sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx

Example Searx config files are lower in this document. Once everything is configured you can push your configuration file to production with - sudo systemctl restart nginx

You will need to harden your encryption by modifying the Searx settings.yml file -nano /etc/searx/settings.yml

Finally, you will need to restart searx, filtron, and morty using the following command - sudo -H service uwsgi restart [service_name_here]

Helpful Commands You Should Know

My video on how to set up Searx used the following commands. You should know these for web server administration.

  • Check which services are on which port - netstat -tulpn
  • Test your nginx configuration - nginx -t
  • If you ran sudo systemctl restart nginx without running nginx -t AND your server restart failed, check the error logs tail /var/log/nginx/error.log
  • Install ssl certificates through certbot on nginx - certbot --nginx

Configuration Files

NGINX

All of the # characters in column 1 need to be removed after you install your SSL certificates. These indicate what ciphers you are running. Any other comment tags should stay in the nginx configuration. You can download this file from my Github page here.

Filtron

You can replace the Filtron configuration file by gutting and replacing the content or by simply replacing the rules.json file on your webserver. You can download this file from my Github page here.

Additional Notes

I hit a rate limit exceeded glitch in my initial setup. This appears to be caused by the Filtron file having extremely strict permissions from the way the Searx team configured it. My rules.json configuration may be too loose for bots but in general I think this is a better setup for an unregistered "friends and family" Searx server.

To get my testbed to accept the file, sudo -H service uwsgi restart filtron did not seem to work. To resolve I changed the nginx file to listen on port 4005, restarted all uwsgi services (sudo -H service uwsgi restart [service_name_here]), and restarted nginx. Searches still failed so I reverted to port 4004 and restarted all services again. This seemed to work but I'm still not sure why, maybe it cleared a cached version of the Filtron rules.json file.