Over on the Self-Hosted podcast we've been taking the "no Googtober" challenge for the month of October. Yes it is November now, but this probably gives you a clue as to how the challenge is going. (Spoiler: really well!).
One thing that was irking me though was figuring out how to set a custom default search engine in Chrome. Because as we all know, default is king. Turns out it's quite straightforward so I'll walk you through setting it up!
SearXNG
If you're not familiar, SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
I assume you have SearXNG set up and ready to go - there's a docker compose YAML in this Gist I threw together.
Configuring Chrome
Google makes it a little tricky to find exactly where you should configure a custom search engine (cynically this is not too surprising!). But here's how:
- In Chrome, click the 3 dot menu button in the top right
- Select
Settings
- Select
Search engine
in the left menu pane - Select
Manage search engines and site search
- Leave the default keyboard shortcut set to
Space or Tab
unless you have a good reason not to - Select
Add
underSite search
- Give your new search provider a name
- Enter whatever you like for
Shortcut
- something like@searxng
is fine - Populate
URL with %s in place of query
with the value from the steps below - Take your SearXNG URL and append
search?q=test
- for examplehttps://search.example.com/search?q=test
- Assuming that worked replace
test
with%s
- for examplehttps://search.example.com/search?q=%s
- Select
Add
once the fields are complete - Make this new
Site search
provider your Chrome default by selecting the 3 dot menu (pictured below) for the new provider, and selectingMake default
- Profit!
Now when you enter a search query in the Chrome address bar it will route through your SearXNG instance. Nice!