Recently, I also stumbled across this. First we need to decide, for what purpose we want to run searx, because this determines the installation procedure. The
official guides describe the installation procedure of public searx instances on Linux with all the bells & whistles of bot blocking, proxying of search requests to the upstream engines, in order to avoid captcha problems, and searx multiprocess operation for load balancing.
- If you want to setup a public instance, then you want to follow the guide of Westofer and revise your setup regarding bot blocking using filtron. For load balancing with multiprocess searx, you would actually want to utilize uwsgi instead of pm2.
- In case you want to setup a local instance either for use in your LAN only, or even a private instance running on the loopback interface of your computer, then all these guides are overly complicated and bring in stuff that you do not need and actually do not want.
For installation of local instances you may want to consider the following.
The port
www/searx is not that bad. It is only outdated — searx 0.16, while the current release is v0.18. The port comes with a working
rc startup script, which utilizes the generic
daemon(8) utility of FreeBSD for daemonizing searx, and it pre-installs most of the dependencies. Furthermore, searx is a well-designed python software package, having its own
setup.py script. Therefore almost everything is already in place to get a local/private searx instance up and running in a few minutes.
First install the outdated port:
# pkg install -y searx
If not already done, complete the python installation, so we get
/usr/local/bin/python and
/usr/local/bin/python3 properly linked to the actual python binary.
# pkg install -y python python3
Now manually update the searx installation from upstream — this step can be repeated occasionally.
# fetch -o searx-master.zip https://github.com/searx/searx/archive/master.zip
# unzip searx-master.zip; cd searx-master
# python setup.py install
# rm -r `python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`/searx
At at the time writing, python3.7 is the current version, if you got another version, then in the commands below, replace 3.7 with 3.x of your version. In addition note the current searx version, and use it in the following commands (assuming tcsh is your shell).
# setenv SEARXV `sed -n '/^Version: /{s///;p;}' searx.egg-info/PKG-INFO`; echo $SEARXV
# ln -s searx-$SEARXV-py3.7.egg/searx `python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`/searx
# cp searx/settings.yml /usr/local/etc/searx-settings.yml
# cp searx/settings.yml /usr/local/etc/searx-settings.yml.sample
# sed -e "s|ultrasecretkey|`/usr/bin/openssl rand -base64 32`|" -i "" /usr/local/etc/searx-settings.yml
# ln -sf /usr/local/etc/searx-settings.yml `python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'`/searx/settings.yml
In case you want to run searx as a private instance on localhost of your computer, then you are ready to go:
# sysrc searx_enable="YES"
# service searx start
In case you want to run searx as a local instance in your LAN, you need to change the setting
bind_address from
127.0.0.1:8888 to the correct lanip-address, for example
192.168.0.11:8888, and restart searx, in case it was started already.
Now point your browser to either of it:
http://localhost:8888/
or
http://lanip-address:8888/
I need to adapt the timeout setting from 3.0 to 5.0, otherwise I see a lot of timeout errors.