Code Ollama requires an Ollama server and at least one installed model.
Install Ollama on macOS with Homebrew:
brew install ollamaInstall Ollama on Linux:
curl -fsSL https://ollama.com/install.sh | shYou can also download Ollama for macOS or Windows from the official download page.
Confirm the CLI is installed:
ollama --versionStart the Ollama server:
ollama serveThe desktop application may already run the server. If Ollama reports that the port is already in use, check whether the application or another ollama serve process is running.
Confirm the server is available and list installed models:
ollama listUse /models in the Code Ollama TUI to download, switch, or delete models.
You can also pull gemma4 with the Ollama CLI:
ollama pull gemma4Confirm the model works:
ollama run gemma4 "Hello, world!"Choose a model that supports tool calling when you want Code Ollama to read files, edit code, or run commands. Image prompts also require a vision-capable model.
Code Ollama connects to http://localhost:11434 by default.
Use /host in the TUI to configure and test another Ollama server. You can also set host in ~/.code-ollama/config.json:
{
"host": "http://ollama.example.com:11434"
}Set OLLAMA_HOST when launching Code Ollama to override both the default and the saved host:
OLLAMA_HOST=http://ollama.example.com:11434 code-ollamaRemove OLLAMA_HOST before using /host when the environment variable points to a different server.
Check the complete setup:
code-ollama doctorThe command checks:
~/.code-ollama/config.json- the effective Ollama host
- server connectivity
- installed models
- the selected model
Warnings identify incomplete setup. Failed checks must be fixed before Code Ollama can use the affected server or model.
- Ollama server unavailable: Start it with
ollama serve, open the desktop application, or configure the correct URL with/host. - Port already in use: Check whether Ollama is already running before starting another server.
- No models installed: Download a model with
/modelsorollama pull <model>. - No model configured: Use
/modelsto select an installed model. - Configured model is missing: Download the selected model or switch to one that is installed.
- Unexpected host: Check
OLLAMA_HOST; it takes precedence over the savedhostvalue. - Remote server unreachable: Confirm the URL, network access, and Ollama server binding on the remote machine.
- Model download or load fails: Check available disk space and memory, then try a smaller model.