podman compose up -dcurl http://localhost:6333/collections
curl http://localhost:11435/api/tagsPull the embedding model into Ollama:
podman exec roo-ollama ollama pull nomic-embed-textVerify it works:
curl http://localhost:11435/api/embed \
-d '{"model":"nomic-embed-text","input":"test"}'You should receive a JSON response with an embeddings array.
In Roo Code → Codebase Indexing settings, use:
| Setting | Value |
|---|---|
| Embedder Provider | Ollama |
| Base URL | http://localhost:11435 |
| Model | nomic-embed-text |
| Qdrant URL | http://localhost:6333 |
| Qdrant API Key | (leave blank) |
| Search score threshold | (leave default) |
| Max search results | (leave default) |
For OpenCode, use the open-codebase-index plugin. It can use your external Ollama instance at http://localhost:11435, but it does not store its index in Qdrant. Its documented storage is a local index inside .opencode/index/ using SQLite, usearch vectors, and BM25.
So:
- ✅ Ollama at
http://localhost:11435 - ❌ Qdrant at
http://localhost:6333is not used by this OpenCode plugin - ✅ Index stored locally in your repository at
.opencode/index/
These instructions assume that is the “OpenCode” you mean.
Run:
curl http://localhost:11435/api/tagsYou should receive JSON listing models. If this fails, OpenCode cannot reach your embedding service yet.
A good starting point:
OLLAMA_HOST=http://localhost:11435 ollama pull nomic-embed-textThen confirm it is installed:
curl http://localhost:11435/api/tagsYou should see nomic-embed-text in the returned model list.
If you want a higher-quality local embedding model instead:
OLLAMA_HOST=http://localhost:11435 ollama pull qwen3-embedding:0.6bThis validates that the running endpoint and model both work:
curl -X POST http://localhost:11435/api/embed \
-H "Content-Type: application/json" \
-d '{
"model": "nomic-embed-text",
"input": "Test codebase embedding"
}'A successful response includes an embeddings array.
From the root of the repository you want indexed:
npm install open-codebase-indexThen add the plugin to the repository’s opencode.json file:
{
"plugin": ["open-codebase-index"]
}If opencode.json already exists, add open-codebase-index to its existing plugin array rather than replacing the rest of the configuration.
Create the directory:
mkdir -p .opencodeCreate .opencode/codebase-index.json with this content:
{
"embeddingProvider": "ollama",
"embeddingModel": "nomic-embed-text",
"scope": "project",
"indexing": {
"autoIndex": false,
"watchFiles": true,
"requireProjectMarker": true
},
"embedding": {
"batch": {
"maxBatchItems": 4,
"maxBatchTokens": 16384
}
},
"search": {
"maxResults": 20,
"minScore": 0.1
}
}The plugin documentation confirms the Ollama provider, but its shown configuration does not document a custom Ollama base URL. Therefore, the reliable method is to make the process that launches OpenCode see your non-default endpoint via OLLAMA_HOST.
macOS/Linux:
export OLLAMA_HOST=http://localhost:11435
opencodePowerShell:
$env:OLLAMA_HOST = "http://localhost:11435"
opencodeTo make that permanent, put the environment variable in the shell profile or service configuration that you use to launch OpenCode.
Launch OpenCode from the repository root, then run:
/status
Confirm it recognizes the indexer and Ollama provider. Then run:
/index
The plugin creates the project index under:
.opencode/index/
Future indexing is incremental when file watching is enabled.
Ask OpenCode something about the repository, for example:
Where is authentication checked before an API request?
Or use its codebase tools such as codebase_search, codebase_context, or implementation_lookup.
Do a forced rebuild, because changing models changes embeddings and may change vector dimensions:
/index --force
Your Qdrant server at http://localhost:6333 can stay running, but the current open-codebase-index configuration supports its own local vector storage rather than Qdrant. It will not connect to or populate Qdrant.
The plugin configuration reference is here: open-codebase-index configuration.