Ollama
Connect Ollama to SurfSense
Connect Ollama
Connect to your Ollama local server. Add it from Search Space Settings > Models.
Base URL
Choose the URL from where the SurfSense backend runs.
SurfSense Runs in Docker
Use this when SurfSense is running from Docker and Ollama is running on your computer.
http://host.docker.internal:11434This is the default in SurfSense.
Ollama Runs in Docker
Use this only when Ollama is a service in the same Compose stack as SurfSense.
http://ollama:11434SurfSense Runs Without Docker
Use this when SurfSense and Ollama both run directly on the same computer.
http://localhost:11434Ollama Runs on Another Computer
Use this when Ollama is running on another machine in your network.
http://<host>:11434Replace <host> with the LAN IP or domain for that machine.
Add the Connection
- Open Search Space Settings.
- Go to Models.
- Select Ollama.
- Set API Base URL.
- Leave API Key empty unless your endpoint needs one.
- Select the models you want to enable.
- Save the connection.
Do not add /v1 to the URL. SurfSense uses Ollama native routes such as /api/version and /api/tags.
Verify
From the host:
curl http://localhost:11434/api/versionFrom the SurfSense backend container:
docker compose exec backend curl http://host.docker.internal:11434/api/version
docker compose exec backend curl http://host.docker.internal:11434/api/tagsTroubleshooting
Name or service not known
The backend cannot resolve the host name.
Use http://host.docker.internal:11434 unless you run Ollama as a Compose service named ollama.
Connection refused
Ollama is not reachable from the backend.
Start Ollama and confirm that port 11434 is open.
No models found
Pull at least one model:
ollama pull llama3.2Then refresh model discovery in SurfSense.