Intelligence · Local AI search
Set up an Obsidian local AI plugin on Linux with Ollama
Install Ollama, pull a chat model and an embedding model, allow app://obsidian.md* in OLLAMA_ORIGINS, and point an Obsidian plugin such as Copilot at it. Your notes are then indexed and answered on your own computer, even offline.

To run a local AI plugin for Obsidian on Linux, install Ollama, pull one chat model and one embedding model, allow Obsidian's app://obsidian.md* origin in Ollama, and point a community plugin such as Copilot at Ollama on your own computer. The plugin then indexes your markdown notes and answers questions from them, and once the models are downloaded it works offline. The commands below follow Ollama's own Linux docs and FAQ and the Copilot plugin's local setup guide, all checked in November 2026.
How an Obsidian local AI plugin works on Linux
An Obsidian local AI plugin on Linux is a front end. Ollama runs the models as a small server on your computer, and the plugin sends your question and the matching notes to it.
Ollama listens on 127.0.0.1 port 11434 by default, according to its FAQ. That address only accepts connections from the same computer, which is what you want for private notes. The plugin needs two models from that server:
- A chat model writes the answer, for example
llama3.2ormistral. - An embedding model turns each note into numbers so the plugin can find the notes that match your question, for example
nomic-embed-text.
This guide uses Copilot for Obsidian (the logancyang/obsidian-copilot project) because its own guide documents Ollama for both chat and embeddings. Other community plugins also talk to Ollama. If you choose one of them, check its own docs for the setting names.
Step 1: install Ollama on Linux
Install Ollama on Linux with the one-line script from Ollama's Linux docs, then confirm the version. The script is the same command you use later to update.
``shell curl -fsSL https://ollama.com/install.sh | sh ollama -v systemctl status ollama ``
If you prefer to read a script before you run it, download install.sh first and open it in a text editor. Ollama also documents a manual install that extracts a package into /usr:
``shell curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst | sudo tar x -C /usr ollama serve ``
A few notes from the same docs:
- On an ARM64 computer, use the
ollama-linux-arm64.tar.zstpackage instead. - With an AMD GPU, also extract the
ollama-linux-amd64-rocm.tar.zstpackage. - With an NVIDIA GPU, CUDA drivers are optional. Run
nvidia-smito check that the driver sees your card. - After a manual install, Ollama recommends adding it as a systemd service so it starts with the computer.
Step 2: pull a chat model and an embedding model
Pull one chat model and one embedding model with ollama pull, then check that both appear in ollama list. Start small. You can switch to a larger chat model later without touching your notes.
``shell ollama pull llama3.2 ollama pull nomic-embed-text ollama list ``
The Copilot guide uses nomic-embed-text for local embeddings. It also names mxbai-embed-large as a stronger choice for vector search, so try it if the plugin keeps pulling the wrong notes. Write the model names down exactly as ollama list shows them. You will type them into the plugin in Step 4.
How much RAM each model size needs
Ollama's README gives a plain rule: at least 8 GB of RAM for 7B models, 16 GB for 13B models and 32 GB for 33B models. The table pairs that rule with download sizes from the same README's model table at version 0.9.0. Current library pages may list newer tags.
| Model tag | Parameters | Download size | Nearest Ollama RAM rule |
|---|---|---|---|
gemma3:1b | 1B | 815 MB | Below the 7B line, no figure published |
llama3.2 | 3B | 2.0 GB | Below the 7B line, no figure published |
gemma3 | 4B | 3.3 GB | Below the 7B line, no figure published |
mistral | 7B | 4.1 GB | 7B: at least 8 GB |
llama3.1 | 8B | 4.7 GB | Between 7B (8 GB) and 13B (16 GB) |
gemma3:12b | 12B | 8.1 GB | Near 13B: 16 GB |
phi4 | 14B | 9.1 GB | Just above 13B: 16 GB or more |
gemma3:27b | 27B | 17 GB | Between 13B (16 GB) and 33B (32 GB) |
A simple rule of thumb: pick a chat model whose RAM line sits well below the memory you have free, which is less than your total memory. Obsidian, your browser and the embedding model all need room too. To see what is loaded right now, run ollama ps. Its PROCESSOR column shows 100% CPU when a model sits entirely in system memory and 100% GPU when it fits on the graphics card.
Step 3: let Obsidian reach Ollama
Obsidian can only talk to Ollama after you add app://obsidian.md* to the OLLAMA_ORIGINS setting. The Copilot guide calls this step required, and without it the plugin fails with a connection or CORS error.
Ollama's FAQ says that when Ollama runs as a systemd service, you set environment variables with systemctl edit. Open the editor:
``shell sudo systemctl edit ollama.service ``
Add these lines under [Service], then save and exit:
``ini [Service] Environment="OLLAMA_ORIGINS=app://obsidian.md*" Environment="OLLAMA_CONTEXT_LENGTH=8192" Environment="OLLAMA_NO_CLOUD=1" ``
Reload systemd and restart Ollama:
``shell sudo systemctl daemon-reload sudo systemctl restart ollama ``
Each line has a job:
OLLAMA_ORIGINSlets the Obsidian app call the server.OLLAMA_CONTEXT_LENGTHraises the context window. Ollama's FAQ says the default is 4096 tokens, and the Copilot guide warns that a window that is too small makes long prompts fail without an error. Notes pulled in for an answer count toward that window.OLLAMA_NO_CLOUD=1turns on what Ollama calls local only mode. You lose Ollama's cloud models and web search, so a cloud model cannot be picked by mistake.
If you run Ollama by hand instead of as a service, put the variable in front of the command: OLLAMA_ORIGINS="app://obsidian.md*" ollama serve. The quotes matter in the fish shell. Leave OLLAMA_HOST alone. Setting it to 0.0.0.0 opens the server to your whole network.
Step 4: point the Obsidian plugin at Ollama
Point the plugin at Ollama by adding your chat model and your embedding model with ollama as the provider. In Obsidian, install Copilot from Settings > Community plugins, then open its settings.
The Copilot guide describes these steps:
- Click Add Custom Model, enter the chat model name exactly as
ollama listshows it, such asllama3.2, and selectollamaas the provider. - Pick that model in the chat model picker.
- In the QA settings, add
nomic-embed-textas the embedding model with the providerollama. - Switch the chat panel to QA mode and let the plugin index your vault.
The guide says that with one Ollama server handling both chat and embeddings, you get a completely offline QA setup. The guide still mentions an Ollama Windows preview and Llama 2 as the default model, so parts of it predate current releases and a button may sit in a different place in yours. Look for the same three fields: model name, provider and embedding model.
Ollama local LLM RAG setup for markdown notes
An Ollama local LLM RAG setup for markdown notes has two phases: indexing, where the embedding model reads every note once, and asking, where only the matching parts of notes go to the chat model. Both phases run against the Ollama server on your computer.
In practice the flow looks like this:
- Index. The plugin splits each markdown file into pieces and asks the embedding model for a vector for each piece. It keeps those vectors so it does not have to read the vault again for every question.
- Retrieve. When you ask a question, the plugin turns the question into a vector the same way and finds the closest pieces of your notes.
- Answer. It sends those pieces plus your question to the chat model, which writes the answer from them.
A few habits make answers better:
- Re-index after you change the embedding model. Vectors from two different embedding models do not match, so an old index gives poor results.
- Write a clear first line or heading in each note. Retrieval works on the text, and a note titled "Meeting" with no context is hard to find.
- Keep the context window in mind. If answers seem to ignore a long note, raise
OLLAMA_CONTEXT_LENGTHand restart Ollama. - Ask questions in your own words. The embedding model matches meaning, so you can phrase a question the way you would write the note.
If you would rather see how an AI tool can be limited to answering only from your notes, read AI second brain apps that answer only from your notes.
A quick test that your questions stay on your computer
A simple check is to turn your network off and ask a question about your vault. If the plugin still answers, both the chat model and the embedding model are running on your computer.
Run these checks in order:
- Check the bind address. Run
ss -tlnp | grep 11434. You should see127.0.0.1:11434, which means only your own computer can reach the server. - Check that cloud features are off. Run
journalctl -e -u ollamaand look for the line Ollama's FAQ describes:Ollama cloud disabled: true. - Go offline. Run
nmcli networking off, or unplug the cable and turn off Wi-Fi. - Ask a vault question in the plugin's QA mode, about something only your notes contain.
- Watch the server. In a second terminal, run
ollama pswhile the answer comes in. Your chat model should appear in the list. - Go back online with
nmcli networking on.
Ollama's FAQ also answers the privacy question directly: "We don't see your prompts or data when you run locally." This test covers the question-and-answer path. It does not audit every other plugin in your vault or Obsidian's own services, so check those separately if you use them.
Worked example: a 16 GB laptop with no GPU
This example shows how to pick models for a common Linux laptop. The numbers about the laptop and vault are assumptions. The model sizes and RAM rule come from Ollama's README.
Assumptions: a laptop with 16 GB of RAM, no dedicated graphics card and a vault of about 1,500 markdown notes. You keep a browser and Obsidian open while you work.
- Chat model. Ollama's rule puts 7B models at 8 GB. With 16 GB total and other apps open,
mistral(7B, 4.1 GB download) orllama3.1(8B, 4.7 GB) is a sensible ceiling. If answers come back too slowly, step down togemma3(4B, 3.3 GB) orllama3.2(3B, 2.0 GB). - Embedding model.
nomic-embed-text, as in the Copilot guide. - Disk. Plan for a few GB under
/usr/share/ollama/.ollama/models, which is where Ollama stores models on Linux. SetOLLAMA_MODELSto use a different folder, and give theollamauser access withsudo chown -R ollama:ollama <directory>. - Expectations. The first indexing pass is the slow part, since every note is embedded once. After that, each question only needs the question itself embedded before the search.
Run ollama ps during a question. On this laptop the PROCESSOR column should read 100% CPU, which is normal without a graphics card.
Common problems and quick fixes
Most failures come from four causes: a missing origin, a short context window, a model name typo or two servers fighting over the port. The table maps each symptom to its fix.
| What you see | Likely cause | Fix |
|---|---|---|
| The plugin cannot connect, or shows a CORS error | app://obsidian.md* is not in OLLAMA_ORIGINS | Add it with systemctl edit ollama.service, then reload and restart |
| Answers ignore parts of long notes | The context window is too small | Raise OLLAMA_CONTEXT_LENGTH and restart Ollama |
| "Model not found" | The name in the plugin does not match | Copy the exact name from ollama list |
ollama serve fails because the port is busy | The service is already running | Use the service, or stop it with sudo systemctl stop ollama first |
| Answers are very slow | The model is too large for your memory | Check ollama ps and try a smaller tag |
To update Ollama later, run the install script again. To read its logs, use journalctl -e -u ollama.
Where Barside fits
Barside is a free desktop app for Windows, Mac and Linux that keeps notes, tasks, bookmarks and recordings on your computer, with no account needed for personal use. It suits people who want one app for notes, passwords and meetings more than a plugin setup.
Barside takes a different route to AI. It has no AI model of its own and no AI subscription. You connect your own Claude, ChatGPT, Gemini or OpenRouter account in Settings > AI, and AI apps such as Claude Desktop can use notes you choose through AI connections. Library search and Whisper speech-to-text run on your computer. Those AI providers are cloud services, so if every answer must come from a model on your own computer, the Obsidian and Ollama setup above is the one that fits. On Linux, Barside ships as an AppImage for most distributions and a .deb for Ubuntu and Debian.
For a side-by-side look at the two approaches, read Obsidian AI plugins vs an all-in-one AI notes app. If you want to compare cloud models with your own key, see bring your own key and switch models. And if your notes start as calls, fully offline AI meeting transcription with local Whisper covers that part.
FAQ
Questions and answers
Do I need a GPU to run Ollama with Obsidian on Linux?
No, a GPU is optional. Ollama's docs list the NVIDIA and AMD drivers as optional, and a model can load entirely in system memory, which ollama ps shows as 100% CPU. Without a GPU, start with a smaller tag such as a 3B or 4B model, and move up if answers stay quick enough.
Why does my Obsidian plugin say it cannot connect to Ollama?
Usually the Obsidian origin is not allowed yet. Add Environment="OLLAMA_ORIGINS=app://obsidian.md*" with sudo systemctl edit ollama.service, then run sudo systemctl daemon-reload and sudo systemctl restart ollama. Also check that systemctl status ollama shows the service running.
Which embedding model should I use for Obsidian notes?
Start with nomic-embed-text, the model the Copilot plugin guide uses for local embeddings. The same guide names mxbai-embed-large as a stronger choice for vector search. Whichever you pick, re-index the vault after you switch.
Does Ollama send my notes or prompts to ollama.com?
Not when you run a local model. Ollama's FAQ says it does not see your prompts or data when you run locally, and that prompts sent to cloud-hosted models are processed on its servers. Setting OLLAMA_NO_CLOUD=1 turns those cloud features off.
Where does Ollama store downloaded models on Linux?
Ollama stores models in /usr/share/ollama/.ollama/models on Linux. To use another folder, set OLLAMA_MODELS and give the ollama user access with sudo chown -R ollama:ollama followed by the folder path.
Can I run Ollama on one computer and use it from Obsidian on another?
Yes, but it opens the server to your network. Ollama binds 127.0.0.1 by default, and you change that with OLLAMA_HOST. Only do it on a network you trust, since other computers on that network can then reach the server.
How do I update Ollama on Linux?
Run the install script again with curl -fsSL https://ollama.com/install.sh | sh, as Ollama's Linux docs describe. Then check the new version with ollama -v and confirm the service with systemctl status ollama.
Sources
Where the facts come from
Checked on November 26, 2026. Products change: if something here is out of date, tell us at support@barside.space.