I started my “degooglification” process some time last year, and while there are still things which I can’t fix yet (such as my dependence on at least one full Google-Android because of my Android Wear watch), I have come a long way since I started.
I’m doing a lot of self-hosting already, and I managed to replace most Google services with Nextcloud apps. The latest service I now completely made private is search. I had already been using startpage.com as my default search engine, which helps, but I was wondering if it’s possible to take it further. The answer to that is called Searx. It’s a metasearch engine, and even using a public instance is already pretty safe. If you want more privacy, you can host your own, installing it on your existing web server following these instructions. I did that, but I also just took it a step further, just to see if I can 😉
If you either don’t have your own server or want even more privacy, you can run it straight from your own computer, and if you then hide behind a private VPN server, nobody will ever be able to track your searches anymore 😉 . Ok, that last bit might be a little overkill. Let’s just assume you want to know how to do this because you don’t have your own server.
The following process was done on Ubuntu 18.04. It should work on any other Linux distribution, although the process of installing dependencies will differ if you’re not on a Debian based system. Note that only this first step will be done as the root user, everything else happens as your normal user.
- Install the dependencies, as per the official instructions:
sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-babel zlib1g-dev libffi-dev libssl-dev
- Decide where you want to put the code. I put it in ~/bin.
git clone https://github.com/asciimoo/searx.git
- Create and activate the virtual environment:
- Install dependencies:
- One final configuration step:
sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
- Now you can test it by running
and calling http://localhost:8888 from a web browser-
- Now, if you want to start it from your applications menu on whichever desktop environment you use, first create a shell script with the following content:
I called it
start-searxand placed it in my ~/bin folder, which is where I put all my shell scripts.
- Now, you could either start this from a terminal or via Alt + F2. You can also use your DE’s menu editor, like Alacarte in GNOME to create an entry you can click on, or add it to your autostart.
Voilà, your perfectly local search engine.
All credit for the installation instructions goes to the developer; I only added the local bits and removed the parts related to a production server accessible from the Internet.