Using Obsidian Copilot with a Local LLM
This is a quick document to walk through configuring Obsidian Copilot with LM Studio for local models and embeddings if you want to run the AI pieces fully locally.
- Install LM Studio from their website or via winget (
winget install ElementLabs.LMStudio
). - Install the community plugin Obsidian Copilot.
- Launch LM Studio and click on the magnifying glass icon in the left hand blade called “Discover.”
- Search for a model that will fit in your computer’s memory capacity - for the remainder of this walk through, I will use the model gemma-3-4b-it-qat.
- Click on the console tab on the left hand blade called “Developer.” Click the button in the top middle of the page that says “Select a model to load (Ctrl +L)”. Load both the model you deployed in step 4 and the default embedding, text-embedding-nomic-embed-text-v1.5.
- Click on the button in the top left that says “Settings” and enable CORS. Click the slider next to “Status: Stopped” to start the local model server. After this, it should say “Status: Running.”
- In Obsidian, navigate to the Obsidian Copilot settings. Click on the tab marked “Model.” Uncheck all current models (unless you intend to use them) - this will eliminate some errors that would otherwise be displayed.
- Under “Chat Models”, click the button marked “+ Add Custom Model.”
- Give the model the name it’s listed as in LM Studio - in this case, it’s “gemma-3-4b-it-qat”.
- For provider, select “LM Studio.”
- Leave “Base URL” blank.
- For an API key, put in a few characters (it is unimportant in this case).
- Enable CORS, click “Verify” to validate that the configuration is correct, then click “Add Model.”
- Scroll down under “Embedding Models”, click on the button marked “+ Add Custom Model.”
- Give the model the name it’s listed as in LM Studio - in the default case, it’s “text-embedding-nomic-embed-text-v1.5”.
- For provider, select “LM Studio.”
- Leave “Base URL” blank.
- For an API key, put in a few characters (it is unimportant in this case).
- Enable CORS, click “Verify” to validate that the configuration is correct, then click “Add Model.”
- Return to the “Basic” tab in the settings panel and select the models you created for “Default Chat Model” and “Embedding Model.”