Build your own PRIVATE search engine - Using SearXNG¶
Setup a server running Ubuntu 20.04 or Debian 11
We was using Debian 11 in a Container hosted in Proxmox
Login as root and update.
apt install && sudo apt upgrade -y
Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
Install docker-compose
apt install docker-compose -y
Now we can move to the directory where we want to install Searx and using git
NOTE: if you don’t have git installed install it – apt install git
cd /usr/local git clone https://github.com/searxng/searxng-docker.git
Verify that it copied correctly in to your current directory
ls
Now change in to the new directory
cd searxng-docker
adjust the content of the .env file
nano .env
Add you host name to SEARXING_HOSTNAME= your_host_name_here
If you want to use a SSL remove the # on the LETSENCRYPT= <email> and add you email address
exit the file using Ctrl+X hit “Y” and then “Enter”
Run this command to generate a key
sed -i “s|ultrasecretkey|$(openssl rand -hex 32) |g” searxng/settings.yml
Now to start SearX run this command
sudo docker-compose up -d
If you want to auto restart your on a reboot you will need to edit the docker-compose.yaml file
nano docker-compose.yaml
Add
add restart: always
after the following
environment:
– SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME:-http://localhost:80}
– SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal}
..
tmpfs:
– /var/lib/redis
..
environment:
– SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
now restart SearX
sudo docker-compose up -d
Updated by Gareth Eaton almost 2 years ago · 4 revisions