Configuring Searx

Searx is a free and open source metasearch engine. It can be self-hosted (like I do!) or accessed at searx.me.

Metasearch engine?

A metasearch engine is a search engines that uses other search engines to get its results. For example, when you search metasearch engine A for “cat”, it would ask search engine A and search engine B to look for “cat”, compile the results, and return them to you. This means that searx doesn’t need to store a database of crawled results on disk, saving gigabytes of space and massive amounts of bandwidth. It also means that it has access to the same data other search engines have, rather than being restricted by, for example, how quickly your server can discover this info on its own. It does, however, come at the price of speed. A regular search engine can work much quicker, as it just needs to query its own internal database and return the results to you. A metasearch engine, however, needs to query each site (in parallel), wait for them to return their results, compile them, and return the finished product to you.

Installation

Searx can either be installed with Docker or as a normal service. While I personally use the latter method, I’d recommend the former, because it’s easier to install and manage.

After you’ve installed Searx, you’ll probably want to put it behind a proxy like nginx. There is a guide on doing this available.

You’re now ready to use Searx! :toot:

Configuration

Apparance

By default, Searx looks rather bland.

A search for "cat", using Searx's default theme.
A search for “cat”, using Searx’s default theme.

There’s nothing wrong with this, of course. I prefer the style “Pointhi”, which looks like this:

A search for "cat", using the "Pointhi" style.
A search for “cat”, using the “Pointhi” style.

Pointhi is a style for the Oscar theme. Oscar is the only theme to have styles to choose from. To set a style as the default, you’ll need to edit settings.yml, which is located at searx/searx/settings.yml. These are the relevant settings:

´╗┐default_theme and oscar_style highlighted in settings.yml.

For a list of available themes, open the settings page on your Searx instance.

Engines

You can choose which engines to use, how important their results are, and whether they’re enabled by default. Look through the engines section in the settings file to see some examples. I’d recommend disabling Google by default and enabling StartPage instead, because (as of the time of writing) Google frequently returns API errors and CAPTCHA requests instead of giving you results. StartPage is based on Google, so you’ll get the same results.

You can also set the request timeout globally. Lower timeouts mean faster page loads at the expense of engines potentially timing out. Set request_timeout in the outgoing section to a custom value in seconds. Under the search section, you’ll also find settings for how long an engine will be “banned” for if it fails to return requests in the specified time.

Logo and name

You can change the name of your Searx instance in the settings file. Changing the logo is a bit more involved: navigate to searx/searx/static/themes/[theme you're using]/img, look for the logo, and replace it with your own image.

BunBunGo, with its logo of a smiling bunny girl
Much better.

Done!

Now that you’ve installed and configured Searx, you can set it as your browser’s default search engine. How to do this varies from browser to browser, but almost all browsers let you do this. Have fun! :mlem:


Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.