A check-in on self-hosting SearXNG metasearch engine
For a few weeks I’ve been using SearXNG as my primary search engine. I am self-hosting it here at the house, blocked from public internet, and sending it through a VPN proxy to have some privacy. Over the last three weeks it has been running so well I forget I was using a custom search engine.
What is SearXNG
I’ve mentioned in some of my recent blog posts that I’ve been using SearXNG for a better search experience, not for privacy. In general, modern search is awful.
SearXNG is actually not its own search engine, but a metasearch engine. Or in other words, a search aggregator. Instead of being solely one search engine, it blends multiple search engines, plus search directly from other sites, into a single interface.
After standing up a SearXNG instance you will see there are dozens of options for search results. For example, in addition to general search engines, I have also enabled results from:
- Docker hub
- Github
- Hackernews
- Fdroid
- Z-Library
- Lemmy & Mastodon instances
And many more.
All of these results are delivered into a single search results page and the results pages can be customized.
There are public instances, but I find the best way to use it is to self-host and adjust it to your needs.
SearXNG experience
Just like my experience with GoToSocial as my Mastodon instance I have no drama to share with SearXNG. It just works. I have no complaints and have not had to institute any workarounds. Searches take about 2-3 seconds and they are much better than what I was getting with DuckDuckGo and Start Page. The interface is much better than Google and now that I am using a VPN proxy for results (along with always using private tabs to restrict cookie tracking), I feel a little more private. It is far from perfect privacy, but better.
The real story is that it just works and does exactly what I wanted it to do. I wanted to merge multiple search engines into one place and reduce the amount of search “clutter”. SearXNG knocks it out of the park.
SearXNG setup
There are multiple ways to install SearXNG, but of course I just used the Docker configuration. Since it is on my LAN and access is locked to only my LAN, I’m not as concerned about running a container open to the public. Of course I have it available through Tailscale so I can access when out of the house.
The requirements are tiny. I am currently running it in a VM with 4 GB of RAM and 2 CPU cores and this is overkill. It barely peeks above 1 GB in normal use for 4 users and never exceeds 5% CPU utilization.
Reverse proxy notes
I do want to add that using a reverse proxy for my self-hosted services has been a life changer. For a long time I would beat my head against the wall trying to get things working with either IP:PORT configurations or with self-signed certs with .local domains. Nearly all my issues with setting up and using self-hosted services were solved by simply having a reverse proxy that would give me a real top level domain with SSL/TLS. SearXNG is no different.
I looked through my notes and saw that I had previously tried it and gave up because nothing was working correctly. This time, after setting up with Docker and feeding through my reverse proxy, everything just worked.
Learning how to use and setting up a reverse proxy is worth your time as a self-hoster. I wish I would have done it sooner.