Tutorial - install your own SearXNG (privacy metasearch engine)

CyberCommander

Power Member
Joined
Dec 30, 2019
Messages
637
Reaction score
735
Hi guys

In this tutorial i will show you how you can install easy SearXNG in 10 minutes.

What is SearXNG?
SearXNG (Next Generation) is an open source metasearch engine that supports over 138 search engines and preserves your privacy.
https://docs.searxng.org/
Public instances:
https://searx.space/
Requirements
- You need access to your VPS Server (example: https://www.edisglobal.com/) with SSH Client like Putty (https://www.putty.org/)
- You need access to your domain DNS records (example https://www.cloudflare.com/)
- You need an energy drink ;-)

Step 1:
Register a domain like SearXNG.yz

Step 2:
Create a cheap VPS server (example https://www.edisglobal.com/ for 5$ per month)
In my Tutorial i use Ubuntu 22.04 LTS
1690717788507.png


Step 3: create an A record of your domain SearXNG.yz to the VPS server IP X.X.X.X
1690717931966.png


Step 4: start the SSH connection to your VPS Server
1690718061575.png


Step 5: login with your root account & password

Step 6: update your ubuntu server with
Code:
sudo apt update && sudo apt upgrade -y
type Yes + Enter
It will ask you maybe about Kernel update & restart the service --> enter

Step 7: install git, docker & compose
Code:
sudo apt install git docker.io docker-compose
type yes

Step 8: add firewall rules for http
Code:
ufw allow http

Step 9: add firewall rules for https
Code:
ufw allow https

Step 10: switch to this path
Code:
cd /usr/local/

Step 11: clone SearXNG from git
Code:
sudo git clone https://github.com/searxng/searxng-docker.git

Step 12: open this path
Code:
cd searxng-docker

Step 13: open this path
Code:
cd searxng

Step 14: type ls
Code:
ls

you should see the file settings.yml
1690720671073.png


Step 15: create openssl key and copy this key
Code:
openssl rand -base64 36
1690720613466.png


Step 16: open the settings.yml file
Code:
nano settings.yml

Step 17: paste the OpenSSL key in the secret key between "..."
1690719576528.png


Step 18: close with ctrl + x --> y --> enter

Step 19: type back
Code:
cd ..

Step 20: type ll & enter
Code:
ll

Step 21: open the file .env with nano .env
Code:
nano .env

Step 22: delete the # by Hostname & E-Mail and tpye your domain & email address

SEARXNG_HOSTNAME=searxng.yz
LETSENCRYPT_EMAIL=[email protected]
1690719863328.png


Step 23: close with ctrl + x --> y --> enter

Step 24: start docker compose as demon (it takes time)
Code:
docker-compose up -d

Step 25: open in your browser your domain searxng.yz. the engine should now works :)
1690720336730.png


If you like my tutorial, please give me a like and follow me for more future tutorials :)
 
SearXNG update

Step 1: switch in your searx-docker folder
Code:
cd /usr/local/searxng-docker

Step 2: type pull command
Code:
docker-compose pull

Step 3: type down command
Code:
docker-compose down

Step 4: start demon
Code:
docker-compose up -d

Result:
1691234013187.png


PS: if you select in the settings GET as HTTP method, you can switch also back in the browser if you open a website and wanna back to the search engine
1691234133512.png
 
Back
Top