
Host My Own Private Search Engine
Break free from ad-driven search engines. Learn how to deploy your own privacy-focused search engine using SearXNG on AWS EC2 with Docker.
Last week I searched for "Apple Macbook" on Google. Within an hour, my Instagram feed was flooded with laptop ads. YouTube? laptop ads. Random news sites? More laptop.
That moment made me realize — I'm not using Google. Google is using me.
So I decided to do something about it. I built my own search engine.
The Problem
Here's what actually happens when you search on Google:
Your query gets logged. Your IP address, device info, location — all recorded. If you're signed in, it's tied to your account. If you're not, Google creates a "shadow profile" based on your browser fingerprint.
Then the real fun begins. That data gets shared across YouTube, Gmail, Google Maps, and every website running Google Analytics (which is basically every website). Advertisers bid on your attention based on what you searched.
You searched for chairs? Cool, now you're "in-market for office furniture" and that label follows you around the internet for weeks.
This isn't some conspiracy. It's literally their business model. Google made $212.4 billion in ad revenue last year. That money comes from knowing what you want before you do.
The "Aha" Moment
Try this yourself:
- Search for something specific — "best mechanical keyboard" or "trips from Darjeeling"
- Don't click anything. Just search and close the tab
- Open Instagram or YouTube
- Wait a few hours
You'll see ads for exactly what you searched. It's creepy once you notice it.
My Solution — SearXNG
I found SearXNG, an open-source metasearch engine. It pulls results from Google, Bing, DuckDuckGo, Wikipedia, Reddit — basically everywhere — but doesn't track anything.
No logs. No profiles. No ads. Nothing.
It's like having a middleman who asks Google questions on your behalf, so Google never knows it was you asking.
| Feature | SearXNG | |
|---|---|---|
| Logs queries | ✓ | ✗ |
| Builds profiles | ✓ | ✗ |
| Sells your data | ✓ | ✗ |
| Shows ads | ✓ | ✗ |
I hosted it on my own EC2 instance. Total control. Nobody sees my searches except me.
What I Built
- Runs on a $5/month EC2 instance
- Pulls from 70+ search sources
- HTTPS with Let's Encrypt (free SSL)
- Docker-based — took 15 minutes to set up
- Works on any device with a browser

How to Build Your Own
Step 1: Spin Up an EC2 Instance
Launch an Ubuntu instance on AWS. A t2.micro works fine for personal use.
Once you're SSH'd in, update everything:
sudo apt-get update && sudo apt-get upgradeStep 2: Install Docker and SearXNG
git clone https://github.com/searxng/searxng-docker.git
sudo chown -R root:root searxng-docker
cd searxng-docker/
sudo apt install docker.io docker-compose -yStep 3: Configure Your Domain
Edit the .env file:
SEARXNG_HOSTNAME=search.yourdomain.com
LETSENCRYPT_EMAIL=your@email.comPoint your domain's DNS to your EC2 public IP.
Step 4: Launch It
docker compose up -dDone. Your search engine is live at https://search.yourdomain.com
The whole thing took me about 15 minutes. Most of that was waiting for DNS to propagate.
Final Thoughts
You don't need to trust Google. Or Bing. Or anyone. The tools exist to build your own.
SearXNG isn't perfect — sometimes results are slower, sometimes you need to tweak settings. But it works. And it's yours.
If you're curious, try one of the public SearXNG instances first. If you like it, host your own. It's easier than you think.
Your searches are your business. Keep them that way.
