Local Docker Compose setup for running Ollama with Open WebUI and SearXNG search support.
ollama: Ollama server exposed onhttp://localhost:11434open-webui: Open WebUI exposed onhttp://localhost/searxng: SearXNG server exposed onhttp://localhost:8080valkey: backing store for SearXNG
Open WebUI connects to Ollama through the Compose network at
http://ollama:11434. Authentication is disabled for this local deployment.
Hugging Face offline mode is enabled so the UI does not block startup on
external model downloads. Open WebUI RAG embeddings are configured to use
Ollama with nomic-embed-text.
Open WebUI web search is enabled through SearXNG at
http://searxng:8080/search?q=<query>, returning 5 results with 2 concurrent
requests.
HTTPS is expected to terminate on the separate Caddy host. Point that Caddy
reverse proxy at http://<this-host>:80 and keep WebSocket proxying enabled.
Create a local .env file from the example:
cp .env.example .envThen replace the placeholder values:
SEARXNG_SECRET=change-this-to-a-long-random-string
OLLAMA_API_KEY=change-this-to-a-long-random-stringThe .env file is ignored by git and should not be committed.
Start the stack:
docker compose up -dCheck the resolved configuration:
docker compose configStop the stack:
docker compose downPull models from the included list:
./pull-model.sh models.listPull a single model:
./pull-model.sh qwen3:8bPull multiple models:
./pull-model.sh qwen3:8b,mistral:7bModel list files support blank lines and # comments.
Ollama data is stored in ollama-data/. This directory can contain model blobs,
history, and local SSH keys generated by Ollama, so it is ignored by git.
Open WebUI data is stored in open-webui-data/. This directory can contain
chat history, users, settings, and other local application state, so it is also
ignored by git.