Running a Whoogle Instance on the Raspberry Pi Zero 2 W
Tinkering with hardware and a continued interest in managing my own data as much as possible led me to look into buying a Raspberry Pi. These are tiny, low-cost computers with a few connections for peripheral hardware (USB, HDMI), a WiFi card and a microSD slot.
Due to the low cost and small size, Raspberry Pi computers are perfect for dedicated services and functions, and there is no end to project ideas for these devices online.
While installing an operating and software is made as easy as possible, I found there was still a bit of a learning curve. Trial and error worked best; I discovered the Pi at the perfect moment in my tech/privacy journey.
I had initially hoped that a Pi project would appeal to my children. While they have expressed some interest, we have not yet tried a project together, but this may still happen.
In this article, I will describe some of the frustrations I had with finding the right project for the Raspberry Pi, and why using it to run Whoogle instance ended up being a good fit. Of course, I will also explain what that is!
The Raspberry Pi Zero 2 W
I spent a fair amount of time researching the different types of Raspberry Pi computers available. There was a shortage of chips during Covid, and I ended up buying the cheap and very basic Zero 2 W model. I also bought an attractive little case, some cable connections and a microSD card as a set.
slightly wonky screenshot taken from: raspberrypi.com
Operating systems and projects
In the weeks that followed, I learned how to install various operating systems on the device. The simplest way is actually to take out the microSD card and install your software onto it.
The company behind the Pi has developed a neat little tool called the Raspberry Pi imager. If you have flashed a Linux distro image on a USB stick before, this process will be familiar to you. The difference here is that the flashing tool comes pre-installed with a range of operating systems for the Pi, including specialised ones for running a media player or a retro gaming computer, for example.
The OS that gave me the best experience with the Raspberry Pi Zero 2 W is Raspberry Pi OS (Legacy, 32-bit) Lite.
To find it, select the option 'Raspberry Pi OS (other)' in the imager tool. It's the first one listed there. The 'Lite' version of the 32 bit OS was the most predictable and robust.
The general name for the OS is 'Raspbian', and it is Linux-based.
I took numerous notes on RP projects and documented each attempt, what worked, at what point the project failed, and where it was successful.
I learned how to set up an Ubuntu server; how to mount a large external drive for storing media; how to run Nextcloud from the Pi; how to set up a dedicated HTML server for a family tree project (GRAMPS) I was working on; and I toyed with media servers like Plex and Jellyfish.
I had varying degrees of success, but began to realise that some of these projects were a little beyond the processing power of my Zero 2 W model. Projects worked but ran slow, or didn't work well due to its hardware limitations.
One day, listening to the Opt Out podcast, I heard about an interesting search engine project called Whoogle, and thought that might be a more practical fit.
Whoogle Search
The Whoogle Search GibHub page states:
Get Google search results, but without any ads, JavaScript, AMP links, cookies, or IP address tracking. Easily deployable in one click as a Docker app, and customizable with a single config file. Quick and simple to implement as a primary search engine replacement on both desktop and mobile.
My understanding is that Whoogle takes Google's search results but withholds a lot of the data that Google would normally to collect about you.
While it is possible to set up a public-facing Whoogle site, I thought it would be interesting to keep things small scale and run Whoogle from my Raspberry Pi in my home for myself and my family members.
Scrolling further down the GitHub page shows a number of ways of installing Whoogle. If you are thinking of installing Whoogle on a Raspberry Pi, I recommend scrolling all the way down to the subheading 'Manual (Docker)'. That worked for me and was easy to follow.
One note about this: familiarity with using terminal commands is needed, but if you don't have that experience, I would say this is a perfect project to get started learning these!
Whoogle works
In short: Whoogle works! This felt like a project where the difficulty level was just right. It was really satisfying to think of a specific, practical use for the Raspberry Pi, do the research, install Whoogle and then see it in action as a working service!
Whoogle is my default browser when I'm at home, and I have set it as the default in my children's browsers too. They like the name and find the concept of privacy browsing (mildly) interesting.
You can adjust configurations on the main page by hitting the small '+' sign, which takes you to a menu that looks like this:
An unexpected bonus of running your local search engine from a separate device is that when other devices or software crash, the Whoogle search engine is unaffected.
Problems
Readers of my blog know that I never shy away from listing the problems I ran into with any project, so here it goes. Keep in mind that these issues are about running a Whoogle instance on a Raspberry Pi, specifically:
- Searches on my Whoogle instance are a fraction slower than on any mainstream browser; this could be due to the hardware limitations of the processor on the Pi. The kids accepted and got used to it
- Whoogle is not a set-and-forget piece of software like Nextcloud is. I need to manually update via Docker and that meant learning some commands for pausing the and restarting Whoogle. I will add the commands I use most below
- A change in modem passwords or an electricity blackout usually means I need to go back into the Raspberry Pi OS. If for some reason I am unable to do that remotely, then I need to dig out the cables and hook my monitor, keyboard and mouse up to the Raspberry Pi
- An update of the general OS sometimes results in Whoogle shutting down
- It varies per browser, but I found it wasn't all that straightforward to set Whoogle as your default search engine. You have to manually add it. The easiest way is to set Whoogle as the Home page
Alternative projects for the Raspberry Pi
The amount of Raspberry Pi projects on offer on the Internet can be overwhelming. Here's a shortlist of other projects that caught my eye:
- PINode-XMR
- Nexctloud
- Nextcloud
- Host a website
- *Apache instructions above don't work, but these do: *Install Apache
- Cockpit
- Discourse
- DietPi (alternate light os)
- Mount USB drives automatically
- Ubuntu
- Ubuntu Server
- Snap
- LAMP server & Wordpress (and website)
- Jellyfin (open source Plex-like media server)
I have played around with Ubuntu and Nexctloud, but would like to try out more of these in future.
Today
While it can be annoying to have to hook up the Pi to peripherals when something isn't working right, running Whoogle from its own device has made me see the benefits of using small computers for dedicated tasks in the house. When your main device reboots or crashes, these other services keep working.
I run Nextcloud and Monero-related services from other devices, and I now realise that has probably saved me a lot of headache. While it may seem appealing to do so, the risk of running all your software on your fastest device is that when it crashes, everything breaks. Thus, spreading applications over different hardware devices can really add stability to your home network experience.
Updates
I got some interesting Pi recommendations after publishing:
If you are out of the house a lot, some cool projects for the Pi are a Tailscale node/subnet router or a PiVPN Wireguard access point. These give you local access to your LAN so you can get to your self-hosted stuff on the go.
Did you already try running pihole on a raspberry pi? (I didn't see it listed on the page)
Documentation
Ben Busby's home page (developer)
Interview with Ben Busby on Opt Out
Public privacy-focused search engines
The FAQ on Whoogle's GitHub page states:
Whoogle is intended to only ever be deployed to private instances by individuals of any background, with as little effort as possible. [...] Use public instances at your own discretion. The maintainers of Whoogle do not personally validate the integrity of any other instances. Popular public instances are more likely to be rate-limited or blocked.
This is followed by a list of public instances of Whoogle.
Another privacy search engine that operates on a similar principle but is meant to be hosted publicly, searX is a metasearch engine, which means it collates results of several mainstream engines, not just those from Google.
My Docker notes
Here are the steps I took (in 2023) to install Whoogle on the Raspberry Pi:
- follow instructions for Raspbian and set up wifi and ssh
- run
sudo apt update && sudo apt full-upgrade
- run
python3 --version
to check python is installed - run
sudo apt install pip
(not sure if necessary but didn't do first time and crashed) - install openssl:
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
- install docker:
curl -sLS https://get.docker.com | sh
- check with
sudo docker -v
(there's an extra step for gpu memory in the docker note here that I did not do) - add user permissions:
sudo usermod -aG docker yourusername
- check
sudo docker ps
shows something besides an error - if error message says daemon not running, try
sudo systemctl start docker
- download Whoogle:
sudo docker pull benbusby/whoogle-search
- run Whoogle
sudo docker run --publish 5000:5000 --detach --name whoogle-search benbusby/whoogle-search:latest
- go to http://xxx.xxx.x.xxx:5000 (your device's ip plus :5000) in browser on other device and set configuration settings you want for Whoogle.
- to kill:
docker rm --force whoogle-search
Here are my notes for rebooting Whoogle:
If after update && upgrade or reboot Whoogle stops working:
docker rm --force whoogle-search
(kills the docker)docker run --restart=always --publish 5000:5000 --detach --name whoogle-search \ benbusby/whoogle-search:latest
docker ps
(should show whoogle)
Here are my notes for updating Whoogle:
sudo apt update && upgrade
(That will most likely stop the docker.)
check status with docker ps -a
docker images
(gives you image ID number)
docker ps -a
(gives container ID number, even if stopped running)
docker stop <container ID>
if not stopped
docker rm <container ID>
docker rmi <image ID>
(removes associated image)
docker pull benbusby/whoogle-search
(pull new version)
docker run --publish 5000:5000 --detach --name whoogle-search benbusby/whoogle-search:latest
docker ps
(to check up and running)
docker start <container ID>
starts it up again
-----Discuss on Reddit-----
Subscribe to my blog via email or RSS feed.
Find me on Mastodon and Twitter.
Back to Blog