modsetter--surfsense
6ede33ccdb
Build and Push Docker Images / create_manifest (web, surfsense-web, , cpu) (push) Has been cancelled
Build and Push Docker Images / finalize_release (push) Has been cancelled
Obsidian Plugin Lint / lint (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / compute_version (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / verify_digests (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, , cpu) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda, cuda) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda126, cuda126) (push) Has been cancelled
103 行
2.0 KiB
Plaintext
103 行
2.0 KiB
Plaintext
---
|
|
title: Ollama
|
|
description: Connect Ollama to SurfSense
|
|
---
|
|
|
|
# Connect Ollama
|
|
|
|
Connect to your Ollama local server. Add it from
|
|
**Workspace 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.
|
|
|
|
```text
|
|
http://host.docker.internal:11434
|
|
```
|
|
|
|
<Callout type="info">
|
|
This is the default in SurfSense.
|
|
</Callout>
|
|
|
|
### Ollama Runs in Docker
|
|
|
|
Use this only when Ollama is a service in the same Compose stack as SurfSense.
|
|
|
|
```text
|
|
http://ollama:11434
|
|
```
|
|
|
|
### SurfSense Runs Without Docker
|
|
|
|
Use this when SurfSense and Ollama both run directly on the same computer.
|
|
|
|
```text
|
|
http://localhost:11434
|
|
```
|
|
|
|
### Ollama Runs on Another Computer
|
|
|
|
Use this when Ollama is running on another machine in your network.
|
|
|
|
```text
|
|
http://<host>:11434
|
|
```
|
|
|
|
Replace `<host>` with the LAN IP or domain for that machine.
|
|
|
|
## Add the Connection
|
|
|
|
1. Open Workspace Settings.
|
|
2. Go to Models.
|
|
3. Select Ollama.
|
|
4. Set API Base URL.
|
|
5. Leave API Key empty unless your endpoint needs one.
|
|
6. Select the models you want to enable.
|
|
7. 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:
|
|
|
|
```bash
|
|
curl http://localhost:11434/api/version
|
|
```
|
|
|
|
From the SurfSense backend container:
|
|
|
|
```bash
|
|
docker compose exec backend curl http://host.docker.internal:11434/api/version
|
|
docker compose exec backend curl http://host.docker.internal:11434/api/tags
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### 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:
|
|
|
|
```bash
|
|
ollama pull llama3.2
|
|
```
|
|
|
|
Then refresh model discovery in SurfSense.
|