I recently decided to host my own
SearXNG
instance. SearXNG is meta search engine. “What is a meta search engine?” I hear you ask. Well, a meta search engine is a
search engine that uses other search engines to determine what results to show a user when they make a query. SearXNG
supports
many different search engines.
On top of search, it supports doing unit conversions, like “35F to C”, and it can also present info panels from sites
like Wikipedia. All of this functionality is supported out of the box and SearXNG makes it really easy to stand up your
own instance with a
docker image
that they build. All you have to do is docker pull and then docker run the image. By default your instance will
be available at localhost:8080. If self hosting is not for you, they host a
webpage of public instances
that other people have hosted and made available for other people to use.
After you’ve played around with SearXNG for a bit, you might notice that something feels off. Unlike Google, DuckDuckGo,
etc. SearXNG does not display favicons, the little icons that appear in your browser’s tabs for websites, next to the
URL for a search result. However, SearXNG actually does support favicons, but it requires
additional setup.
First you need to setup
Valkey,
the open source version of
Redis,
and then add the URL for your Valkey instance to your settings.yml under redis.url. Then you can add a
search.favicon_resolver. You should also
setup a favicon cache
so that your SearXNG instance does not have to download every favicon everytime you make a search, which should save
your bandwidth. Now you can restart your SearXNG instance and you should see the favicons for websites next to
the search results!
I’ve had my instance setup for almost week now, and I’ve actually set it as my default search engine in Firefox. In the time I’ve been using it, I have not missed Google. However, there are things that I wish I could change in the preferences:
- Let users change the font size
- Let users choose how much of the screen will be used when showing results
I should mention that at my desk I have a 1440p ultrawide monitor. The text size of the default theme for SearXNG is smaller than the size of the text on Google. It’s not unreadable, but it would be nice if the font size could be changed by a user without having to change the page zoom. Additionally, on my monitor, results take up less than 1/3rd of screen real estate. I understand that there probably aren’t that many people with ultrawide monitors and even less with ultrawides with resolutions greater than 1080p, but it would be nice to take advantage all of the extra screen space. However, SearXNG does provide an option to center results instead having them left aligned. This can make the page feel less awkward by splitting the empty space between the left and right sides of the screen. I should point out that SearXNG wraps the lines for results at around the same point as Google, so they might just be following the crowd on this.
I enjoyed setting up my instance and learning new features of Podman to create SystemD service for running SearXNG using containers as well as learning how to use Nginx to redirect traffic to the SearXNG container. If you are self hosting or thinking about self hosting, I highly recommend trying out SearXNG.
Maybe I’ll do my next post on generating Podman SystemD units using Quadlet, which was released back in Feb. 2023 as part of Podman 4.4.