Obsidian Plugin
The Khoj plugin for Obsidian lets you chat with and search your notes directly from your Obsidian vault. Your notes are automatically synced and indexed for instant access.
Features
Chat
- Faster answers: Find answers quickly from your private notes or the public internet
- Assisted creativity: Smoothly weave across retrieving answers and generating content
- Iterative discovery: Iteratively explore and re-discover your notes
Search
- Natural language: Advanced natural language understanding using Transformer-based ML models
- Incremental search: Fast, search-as-you-type experience
- Context-aware: Searches within your Obsidian vault
Find Similar Notes
Discover notes similar to the one you’re currently reading.
Auto-Sync
Your Obsidian vault is automatically synced periodically with Khoj.
Installation
Search for Khoj
Click Browse and search for “Khoj” or visit the Khoj plugin page.
See the official Obsidian Plugin Docs for more details on installing community plugins.
Configuration
Khoj Cloud Setup
Generate API Key
Go to the Khoj Web App Settings and generate an API key.
Self-Hosted Setup
If you’re running your own Khoj server, follow these configuration steps.
Usage
Chat
Access Khoj chat directly from Obsidian:- Via Ribbon
- Via Command Palette
Click the Khoj chat icon 💬 on the Ribbon (left sidebar).
Search
Perform natural language search across your vault:Enter Query
Type your search query in natural language.Examples:
- “My life goals for 2023”
- “Notes about machine learning”
- “What is the meaning of life?”
Query Filters
Use advanced filters to refine your search:Learn more about query filters in the Query Filters documentation.
Find Similar Notes
Discover related content while reading:Keyboard Shortcuts
Set up custom keyboard shortcuts for quick access:- Go to Settings → Hotkeys
- Search for “Khoj”
- Assign shortcuts to your preferred commands:
| Command | Suggested Shortcut | Description |
|---|---|---|
| Khoj: Chat | Ctrl/Cmd + K, C | Open chat |
| Khoj: Search | Ctrl/Cmd + K, S | Open search |
| Khoj: Find Similar Notes | Ctrl/Cmd + K, F | Find similar |
Sync Behavior
Understanding how sync works helps you get the most out of the Khoj plugin.
Automatic Sync
- Your vault is automatically synced periodically in the background
- New notes and changes are detected and indexed automatically
- No manual intervention required for day-to-day use
Manual Sync
Use Force Sync when you need immediate indexing:- Open plugin settings
- Click Force Sync
- Wait for confirmation
- After installing the plugin
- After importing many new notes
- When search results seem stale
Troubleshooting
Plugin not working
Plugin not working
- Open the Khoj plugin settings
- Verify your API key is correct
- Toggle Disable then Enable on the plugin
- Try restarting Obsidian
Search results are outdated or missing
Search results are outdated or missing
- Open plugin settings
- Click Force Sync to refresh the index
- Wait for sync to complete
- Try your search again
Cannot connect to server
Cannot connect to server
For Khoj Cloud:
- Verify the Khoj URL is set to
https://app.khoj.dev - Check your internet connection
- Verify your API key is valid
- Ensure your Khoj server is running
- Verify the server URL and port
- Check firewall settings
Sync is slow or hanging
Sync is slow or hanging
For large vaults (1000+ notes):
- Initial sync may take several minutes
- Subsequent syncs are incremental and faster
- Close and reopen Obsidian if sync appears stuck
- Check the Obsidian developer console for errors (Ctrl/Cmd + Shift + I)
Updating the Plugin
Privacy and Data
Khoj Cloud
Your notes are encrypted in transit (HTTPS) and indexed securely on Khoj’s servers. See our Privacy Policy for details.
Self-Hosted
When self-hosting, all data remains on your infrastructure. You have complete control over your notes and index.
Next Steps
Chat Features
Explore advanced chat capabilities
Search
Master natural language search
Query Filters
Learn advanced search syntax
Desktop App
Sync other files and folders
