Taylor D. Marchetta383 downloadsChat with your notes in a right sidebar using a remote Ollama server.
A right-sidebar chat panel that lets you chat with your notes using a remote Ollama server over its native chat API. Local-first — nothing leaves your LAN.
[[Note#Heading]] links you can click. Index builds incrementally in the background; edits and renames re-embed automatically with a 2s debounce. Embedder model is configurable and independent from the chat model.[[wikilinks]] all work./summarize, /expand, /rewrite, /brainstorm out of the box, fully editable in settings.ai: { model: ..., systemPrompt: ... } to a note's frontmatter to override global settings when chatting with that note.Chats/YYYY-MM-DD — <title>.md by default).+ icon or command palette.Screenshots pending capture. The shot list and exact filenames live in
assets/README.md; drop the PNGs intoassets/and uncomment the block below to enable this section.
Ollama running on another PC on your LAN. On the host:
# macOS
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
launchctl setenv OLLAMA_ORIGINS "app://obsidian.md"
# restart Ollama
# Linux (systemd)
sudo systemctl edit ollama.service
# add under [Service]:
# Environment="OLLAMA_HOST=0.0.0.0:11434"
# Environment="OLLAMA_ORIGINS=app://obsidian.md"
sudo systemctl restart ollama
# Windows
# Set OLLAMA_HOST=0.0.0.0:11434 and OLLAMA_ORIGINS=app://obsidian.md in System Environment Variables,
# then restart the Ollama app.
Obsidian needs OLLAMA_ORIGINS set so it can make streaming fetch requests to Ollama across the LAN. Prefer app://obsidian.md — it scopes access to Obsidian only. OLLAMA_ORIGINS=* also works and is convenient for troubleshooting, but it's less restrictive, so avoid leaving it as * on a host exposed to your LAN. Comma-separate the value to allow multiple origins.
At least one Ollama chat model pulled, plus (if you want retrieval / RAG) an embedder model:
ollama pull llama3.1:8b # chat
ollama pull nomic-embed-text # embedder — only needed for the retrieval context mode
From Obsidian's Community plugins browser (recommended):
Then configure it:
http://192.168.1.50:11434.Only needed if you want to hack on the plugin or run an unreleased build. Requires Node.js (brew install node on macOS).
Clone and build:
git clone https://github.com/tdmarchetta/obsidian-ollama-notes-chat.git
cd obsidian-ollama-notes-chat
npm install
npm run build
This produces main.js alongside manifest.json and styles.css.
Copy (or symlink) the plugin folder into your vault's plugins directory. The folder name must match the plugin id, ollama-notes-chat:
ln -s "/path/to/obsidian-ollama-notes-chat" \
"/path/to/vault/.obsidian/plugins/ollama-notes-chat"
In Obsidian, open Settings → Community plugins, turn off Restricted mode if needed, reload plugins, and enable Ollama Notes Chat. Then set the Base URL as described above.
If you want to chat with the whole vault instead of a single active note:
nomic-embed-text is the small, fast default). This is separate from your chat model.From [[Note#Heading]] citations you can click to jump to the source.Index is stored at .obsidian/plugins/ollama-notes-chat/index.json. It updates incrementally when notes change (2-second debounce) and invalidates automatically if you change the embedder model. On large vaults the cold reindex can take several minutes — you can click Cancel at any time and resume later.
Obsidian doesn't bind a default hotkey — assign one in Settings → Hotkeys by searching for "Ollama Notes Chat". The most useful commands to bind: "Open chat", "New chat", and "Open chat history".
In any note's frontmatter:
---
ai:
model: llama3.1:70b
systemPrompt: "You are a code reviewer. Be blunt and specific."
---
When this note is the active context, the plugin uses these values instead of the global settings for that send.
OLLAMA_HOST=0.0.0.0:11434 and OLLAMA_ORIGINS=app://obsidian.md are set on the host. Restart Ollama after setting them. (If it still won't connect, temporarily try OLLAMA_ORIGINS=* to rule out an origins issue.)ollama list on the host to verify models are installed.ollama list on the host and pull nomic-embed-text if missing.main.ts — plugin entry; registers the view, ribbon icon, commands, editor menu, settings tab. Owns the conversation store + persistence (including the one-shot 0.1.0 → 0.2.0 migration) and, since 0.3.0, the RAG vector store + indexer.src/view/ChatView.ts — the sidebar ItemView that owns the chat UI, streaming, and rendering.src/view/HistoryDrawer.ts — overlay controller for the multi-session history drawer (mounted inside the chat view, not a separate ItemView).src/chat/ConversationStore.ts — CRUD layer over ConversationSnapshot[]; filters empty conversations out of persistence.src/chat/Conversation.ts — per-conversation state, auto-titling, and ConversationSnapshot shape.src/ollama/OllamaClient.ts — fetch-based native /api/chat client with NDJSON streaming generator (keeps Ollama's timing fields for the stats modal) plus requestUrl-based /api/embed and /api/tags.src/context/NoteContext.ts — builds the context block from the active note/selection/linked notes/retrieved passages.src/rag/Chunker.ts — heading-first markdown chunker with fixed-size fallback.src/rag/VectorStore.ts — in-memory map, flat JSON persistence at index.json, atomic tmp+rename writes, inline cosine top-K.src/rag/Indexer.ts — vault walk, mtime-diff, batched embedding, debounced event handlers.src/settings/ — typed settings, defaults, and the settings tab.styles.css — scoped under .ollama-chat-view / .ollama-chat-settings; uses only Obsidian theme variables.Release history is in CHANGELOG.md.
Ollama Notes Chat is free and open source. If it makes your notes more useful and you'd like to support continued development, you can buy me a coffee:
☕ buymeacoffee.com/tdmarchetta
100% of contributions go to the developer.
MIT