Llama.cpp + SearXNG: Linux AI search setup
Learn to connect Llama.cpp with SearXNG on Linux, build Docker services and a Flask test app, and check that the backend works after reboot.
Player not loading? Watch on YouTube
This tutorial connects Llama.cpp inference with SearXNG web search on Linux. The presenter demonstrates an installer, then walks through manual setup with separate Python environments and Docker services. The metadata recommends Ubuntu or Debian and lists a GPU as optional; the manual walkthrough uses Python 3.11 for the search environment and later builds a CPU container.
The code review explains how the local LLM receives search context. Prompts containing triggers such as "news", "latest" or "headlines" cause an HTTP request to SearXNG. The backend requests JSON, keeps five results with titles, descriptions and URLs, and adds them to the model prompt. It selects the first GGUF file in the models directory and sets a maximum response length of 1,000 tokens.
A small Flask application tests the backend through HTTP requests. The presenter also shuts down the Ubuntu machine and demonstrates another request after startup to check persistence. This is a self-hosted search workflow that retrieves internet data, so the search portion is not offline.
The installer has a material limitation: the presenter says this version targets machines without Docker and closes by discussing changes to avoid erasing existing Docker installations. The description also warns that some code may differ for legibility.