Use Ollama or LM Studio as a local AI server

Point Datark's AI assistant at a model running on your own computer, with no cloud account.

Updated Written for Datark 1.0.5 for Mac and 1.1.1 for iPhone and iPad

Datark’s AI assistant can talk to any local server that speaks the OpenAI chat format. Ollama and LM Studio both do. Your prompts, SQL and schema details go only to the address you enter, and no cloud key is involved.

1. Start the local server

  • LM Studio: load a model and start the local server. Its address is http://localhost:1234/v1/chat/completions unless you changed the port.
  • Ollama: run Ollama and pull a model. Its address is http://localhost:11434/v1/chat/completions.

Both tools document how to start the server and which model names to use. Keep the model name you will enter in Datark: it is the name the server lists.

2. Set it up on Mac

  1. Open Settings and choose AI.
  2. Set the provider to Local Server.
  3. In Endpoint URL, enter the complete request address from step 1, including the path.
  4. In Model, enter the model name the server uses.
  5. Open the AI workspace (Command-5) and ask a question about a connection or query.

3. Set it up on iPhone or iPad

On a phone or tablet, localhost means the device itself, not your computer. Use your computer’s address on the network instead, for example http://192.168.1.20:1234/v1/chat/completions.

  1. Make the server listen on your network, not only on the computer itself. LM Studio and Ollama each have a setting for this; see their documentation.
  2. In Datark, open Settings, choose the AI section and pick Local Server.
  3. Enter the endpoint URL with your computer’s address, then the model name.
  4. Datark asks you to allow sharing with that address, because it is not the device itself. Review it and choose Allow. You can revoke it in Settings.
  5. iOS may also ask for permission to find devices on your local network. Allow it.

What stays private

  • Nothing is sent to a cloud provider. The cloud providers, OpenAI and Anthropic, stay off until you allow each one.
  • Generated SQL opens in the query editor for you to read. It never runs on its own.
  • AI chats are kept in memory and are not saved automatically. On iPhone and iPad, you can export a text transcript to a file you choose. It includes unsent draft text and omits images.

If nothing comes back

  • Check that the server is running and the model is loaded.
  • Check that the endpoint ends with /v1/chat/completions and that the port matches the server’s.
  • On iPhone and iPad, check that the server accepts connections from other devices and that your device is on the same network.

Download Datark. It's free.

Free for Mac, iPhone and iPad. No account required.