123SUDODocs
Guides

Local Models with Ollama

Connect Ollama instances to run open-source models with zero token fees.

9xchat connects to Ollama runtimes running either on your machine or on a remote server on your network. When querying an Ollama model running on your machine, prompts do not travel to external cloud APIs, and you never consume 9xchat credits or pay per-token fees.

Ollama model connections are available on desktop (Windows, macOS, and Linux). Using your own Ollama models does not require a subscription or 9xchat credits.

Setup guide

1. Install Ollama

Download and install Ollama from ollama.com for your desktop operating system.

2. Pull a model

Open your terminal or command prompt and pull your desired model:

# General chat models
ollama run llama3.2

# Coding & reasoning models
ollama run deepseek-r1:8b
ollama run qwen2.5-coder:7b

By default, Ollama serves its API locally at http://localhost:11434.

3. Connect Ollama in 9xchat

  1. In 9xchat, open Library → Models.
  2. Select Ollama in the provider sidebar.
  3. 9xchat automatically checks http://localhost:11434 and lists your installed models.
  4. If your Ollama instance runs on a remote machine or custom port, enter the URL in the Host URL field.
  5. Enable the models you want available in the chat composer.

Current capabilities and limitations

  • Chat conversations: You can switch between cloud models and Ollama models per message in standard chat threads.
  • Tools and MCP: Ollama models currently do not support 9xchat agentic tools or MCP server function calling.
  • Code Workspace: The full agentic multi-file Code workflow requires cloud models capable of structured tool execution; basic code chat and explanations can still run on Ollama models.
  • Local Knowledge indexing: In Settings → Default Models, you can select Ollama as your embeddings provider to index document collections locally.

Privacy considerations

  • When pointing to localhost or 127.0.0.1, generation requests stay entirely on your computer.
  • If you configure a remote host URL (e.g. http://192.168.1.50:11434), requests travel over your network to that destination host.
  • Cloud features (such as web search, YouTube transcripts, and cloud audio) contact external services even if your selected chat model is local.

Troubleshooting

  • Instance not detected: Confirm Ollama is running and accessible at http://localhost:11434.
  • Remote or Docker connections: Start Ollama with OLLAMA_ORIGIN="*" to permit cross-origin requests from 9xchat.
  • Performance: If generation is slow, choose a smaller parameter model (such as llama3.2:3b or 8b) that fits comfortably in your system's RAM/VRAM.

On this page