Updated 3/24/2024 https://renovatu.com/searxng/Installing-SEARXNG-into-a-VM-with-Ubuntu-20-04-4-on-a-local-lan.txt Installing SEARXNG into a VM with Ubuntu 20.04.4 on a local lan. I created an Ubuntu20.04.4 virtual machine from an ISO in xcp-ng with 4vCPU, 8GiB ram and 120GiB drive. You can use whatever specs you think is good for your system. Make sure you set a static IP address for the VM like 192.168.10.10/24 or any IP address that matches your network. You must use an IP address that is on the same subnet as your lan or you wont be able to get to it across your network. Once the VM is ready I use Putty from my windows desktop to log in via SSH. On a new machine you should update the VM sudo apt update and sudo apt upgrade Then reboot. Log back in and change into the /usr/local directory: cd /usr/local Run: sudo apt install git sudo apt install docker.io sudo apt install docker-compose sudo git clone https://github.com/searxng/searxng-docker.git Change into the newly created directory searxng-docker/ cd searxng-docker/ You should now be in: /usr/local/searxng-docker/ Now edit the environment file .env # it is a hidden file Run: ls -ah to see that it is there. If you open a blank file in nano you are in the wrong directory or mistyped the name. sudo nano .env Un-comment the SEARXNG_HOSTNAME= line and change the address portion to your IP address that you gave the VM when you created it. Leave the LETSENCRYPT_EMAIL= line commented out. SEARXNG_HOSTNAME=192.168.10.10 # LETSENCRYPT_EMAIL= Save the file and exit nano. While still in the /usr/local/searxng-docker/ directory Run: sudo sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml This adds the secret key line in the settings.yml file in the /usr/local/searxng-docker/searxng directory At this point I reboot the VM just for good measure. Log back into your VM and change back into the /usr/local/searxng-docker/ directory then start docker and make it run in the background. sudo docker-compose up -d # see running containers sudo docker ps If you edit the settings.yml file in the /usr/local/searxng-docker/searxng/ directory, you can stop docker and restart it for the changes to be loaded. sudo docker-compose down sudo docker-compose up -d To auto restart your containers after a reboot run. sudo docker update --restart unless-stopped $(docker ps -q) If at some point you get permission denied mesage you can add yourself to the docker group. Make sure it exists and add it if it doesnt. sudo getent group docker || groupadd docker Then add the user that you are currently logged in as. sudo usermod -aG docker $USER Then log out and back in to update your groups. Or restart. Now you should be able to use your browser on any machine on your network to search from your new serch page. https://192.168.10.10 Use whatever IP address you used when creating the VM... ############## Once you have had this up and running for a while you will need to update your container from github. To do this you run the docker pull command. Log back into your VM and change back into the /usr/local/searxng-docker/ directory The fast way is to run the "pull" command and then run the "up" command This will download the updated image and restart your container leaving the old ones on the server taking up space. Though at some point you will want to clean up the old images with the "prune" command. # Pull all images in the stack sudo docker-compose pull # Restart sudo docker-compose up -d #Delete all unused images sudo docker image prune -f # Make sure your system restarts after a reboot sudo docker update --restart unless-stopped $(docker ps -q) RD https://searchtoggle.com/ https://renovatu.com