LM Studio
Connect LM Studio to SurfSense
Connect LM Studio
Connect to your LM Studio local server. Add it from Search Space 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.
http://host.docker.internal:1234/v1This is the default in SurfSense.
SurfSense Runs Without Docker
Use this when SurfSense and LM Studio both run directly on the same computer.
http://localhost:1234/v1LM Studio Runs on Another Computer
Use this when LM Studio is running on another machine in your network.
http://<host>:1234/v1Replace <host> with the LAN IP or domain for that machine.
LM Studio Setup
- Open LM Studio.
- Load a model.
- Start the local server.
- Confirm the server listens on port
1234.
Add the Connection
- Open Search Space Settings.
- Go to Models.
- Select LM Studio.
- Set API Base URL.
- Leave API Key empty unless your server requires one.
- Select the models you want to enable.
- 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:
curl http://localhost:1234/v1/modelsFrom the SurfSense backend container:
docker compose exec backend curl http://host.docker.internal:1234/v1/modelsTroubleshooting
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.