Build your own private search engine SearXNG
Preparation. Make sure you have Docker and Docker Compose installed on your machine.
Step 1: Create the instance catalog
First, create a directory to hold the SearXNG configuration files:
mkdir searxng
Step 2: Run the SearXNG Docker Container
Use the following command to pull the Docker image of SearXNG and run the container:
docker run \ --rm -d -p 8081:8080 \ -v "${PWD}/searxng:/etc/searxng" \ -e "BASE_URL=http://localhost:8081/" \ -e "INSTANCE_NAME=searxng" \ searxng/searxng
Step 3: Enable JSON Format Output
SearXNG does not output results in JSON format by default.
- Go to the container's configuration file directory:
cd /root/searxng
- Open it with your favorite text editor
settings.yml
Documentation. - locate
formats
section, addjson
::
formats: - json # add json format
- Restart the Docker container to make the changes take effect:
docker restart
Step 4: Configure SearXNG in Open Web UI
Now you can add SearXNG as a custom search engine in Open Web UI.
- Searxng query URL.
http://:8081
commander-in-chief (military) Replace with the IP address of the SearXNG instance.
- Intranet access. Use the IP address of the container.
- Extranet access. Use the public IP address of your server.
Done!
Note that the port can be replaced with the one you want to prevent whitelining.