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
93 lines
1.8 KiB
Plaintext
93 lines
1.8 KiB
Plaintext
---
|
|
title: LM Studio
|
|
description: Connect LM Studio to SurfSense
|
|
---
|
|
|
|
# Connect LM Studio
|
|
|
|
Connect to your LM Studio local server. Add it from
|
|
**Workspace Settings > Models**.
|
|
|
|
## Base URL
|
|
|
|
LM Studio uses an OpenAI compatible server.
|
|
|
|
### SurfSense Runs in Docker
|
|
|
|
Use this when SurfSense is running from Docker and LM Studio is running on your computer.
|
|
|
|
```text
|
|
http://host.docker.internal:1234/v1
|
|
```
|
|
|
|
<Callout type="info">
|
|
This is the default in SurfSense.
|
|
</Callout>
|
|
|
|
### SurfSense Runs Without Docker
|
|
|
|
Use this when SurfSense and LM Studio both run directly on the same computer.
|
|
|
|
```text
|
|
http://localhost:1234/v1
|
|
```
|
|
|
|
### LM Studio Runs on Another Computer
|
|
|
|
Use this when LM Studio is running on another machine in your network.
|
|
|
|
```text
|
|
http://<host>:1234/v1
|
|
```
|
|
|
|
Replace `<host>` with the LAN IP or domain for that machine.
|
|
|
|
## LM Studio Setup
|
|
|
|
1. Open LM Studio.
|
|
2. Load a model.
|
|
3. Start the local server.
|
|
4. Confirm the server listens on port `1234`.
|
|
|
|
## Add the Connection
|
|
|
|
1. Open Workspace Settings.
|
|
2. Go to Models.
|
|
3. Select LM Studio.
|
|
4. Set API Base URL.
|
|
5. Leave API Key empty unless your server requires one.
|
|
6. Select the models you want to enable.
|
|
7. Save the connection.
|
|
|
|
SurfSense discovers models from `/v1/models`. If you enter the URL without `/v1`, SurfSense adds it for requests.
|
|
|
|
## Verify
|
|
|
|
From the host:
|
|
|
|
```bash
|
|
curl http://localhost:1234/v1/models
|
|
```
|
|
|
|
From the SurfSense backend container:
|
|
|
|
```bash
|
|
docker compose exec backend curl http://host.docker.internal:1234/v1/models
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Connection refused
|
|
|
|
LM Studio is not reachable from the backend.
|
|
|
|
Start the LM Studio server and confirm that port `1234` is open.
|
|
|
|
### No models found
|
|
|
|
Load a model in LM Studio, then refresh model discovery in SurfSense.
|
|
|
|
### Endpoint returned 404
|
|
|
|
Use an OpenAI compatible server URL. The models endpoint must be available at `/v1/models`.
|