Answer#
A local server is added like any other provider, with a different base URL and no key. The presets in the providers dialog use these addresses:
| Preset | API base URL |
|---|---|
| Ollama (local) | http://localhost:11434/v1 |
| LM Studio (local) | http://localhost:1234/v1 |
| llama.cpp server (local) | http://localhost:8080/v1 |
The default port of each server can be changed in that server; if you change it, edit the base URL in the provider entry to match. The three local presets do not require a key. A "Custom: OpenAI-compatible endpoint" preset exists for any other server that offers the same request format.
How to do it#
- Install and start the local server, and download a model in it. The model's name in the server is what goes into Ruststudio's Model field (the Ollama preset suggests
qwen2.5-coder, but only a model you have downloaded will answer). See the server's own documentation for how to download a model. - In Ruststudio choose AI > AI Providers..., add the preset, and check that the base URL and model name match the server.
- Press Test connection, then Use this one and Save.
- Open the assistant with Ctrl+Shift+I.
Things to know#
- Requests go to the address you configured. With a local address they do not leave your machine; with any other address they go to that service.
- A small local model is a different tool from a large hosted one: it is quicker to reach and private, but write shorter, more specific requests and check the result more carefully.
- If Test connection fails, the server is probably not running, the port differs, or the model name does not exist in the server.