---
date: "2021-06-24T21:48:00Z"
title: "Self-host your web searches with Whoogle"
description: "How you can use Whoogle to self-host your web-searching and avoid ads and tracking."
tags: [100daystooffload, technology, selfhost]
---

## Google and DuckDuckGo

It's common knowledge that part of Google's business model is to use the data it knows about you, your searches, and browsing patterns in order to more effectively serve ads.

Many people feel uncomfortable with this and so there is a strong movement to adopt more privacy-focused options, such as [DuckDuckGo](https://duckduckgo.com). This was my position, too. For a few years I've been a solid DuckDuckGo user, and it was my default on Mac and mobile devices.

However, I do find that for more technical queries - e.g. for specific parts of an API's documentation - it doesn't perform as well as Google. DuckDuckGo supports using [bangs](https://duckduckgo.com/bang) for automatically forwarding searches to another service. For example, prepending a search with `!g` will forward the query to Google instead.

As time went by, I found myself using `!g` more and more - for both technical and non-technical searches. It got to the point where I was just `!g`-ing everything. And so I wondered what the point was in proxying through DuckDuckGo at all.

## Self-hosting Whoogle

Not long ago I saw a link to [Whoogle Search](https://github.com/benbusby/whoogle-search) - a self-hosted open-source Google search replacement.

Whoogle does not display ads, doesn't rely on lots of JavaScript, and still returns great results. As long as it's hosted somewhere in the cloud then there is no reason for Google to be able to track you, either.

Getting it up and running on one of my servers was super easy. I use Docker to deploy services and so after pointing a subdomain to the server, setting up the needed certificates, and adding a virtual host to my `nginx` container, all I needed to do to get Whoogle running was to pull and run the container:

```shell
docker run -d -p 5000:5000 benbusby/whoogle-search:latest
```

I could then browse to the server and begin searching.

There are lots of ways the deployment can be tweaked, including the interface and security settings, so be sure to take a look at the documentation for [more options](https://github.com/benbusby/whoogle-search).

## Setting Whoogle as Firefox's default search engine

The main way I search the web is to simply type my query into the address bar in Firefox. To make the best use of Whoogle I needed to configure Firefox to use Whoogle as my default search provider.

There is no direct option for this in the Firefox settings, however Whoogle complies with the [OpenSearch standard](https://en.wikipedia.org/wiki/OpenSearch). This means that if you visit your self-hosted search-engine in Firefox you should be able to add it to Firefox by right-clicking the address bar and selecting _Add "Whoogle Search"_.

![Adding Whoogle as a search engine](/media/blog/whoogle1.png)

Once Whoogle is added to Firefox it can be set as the default search engine through the standard Firefox settings.

On mobile Firefox - which is even more great now that iOS allows for selecting a default browser! - the process is slightly different. Simply tap _Add search engine_ in the app's settings, and in the URL box enter `https://server.address/search?q=%s` (replacing with your server's address) to add your Whoogle server as your search engine.

If you're someone that enjoys self-hosting things, then I recommend giving Whoogle a try.
