How to Set Up Khoj as Your Personal AI Research Assistant

August 7, 2026

If you’re drowning in PDFs, notes, and documents, Khoj can transform how you search and reason across your knowledge base. This tutorial covers setting up Khoj with Obsidian and configuring it for maximum research productivity.

Step 1: Choose Your Deployment

Khoj offers two paths: cloud (app.khoj.dev) for quick setup, or self-hosted via Docker for full privacy. For this tutorial, we’ll use the self-hosted option. Install Docker if you haven’t already, then run:

docker pull khoj/khoj:latest
docker run -d --name khoj -p 42110:42110 khoj/khoj:latest

Step 2: Configure Your LLM Backend

Open http://localhost:42110 and navigate to Settings. Choose your preferred LLM — GPT-4o for quality, Claude for reasoning, or Ollama for privacy. Enter your API key or configure Ollama endpoint. Khoj supports multiple models simultaneously, so you can switch per-query.

Step 3: Connect Your Obsidian Vault

In Khoj settings, go to “Content Sources” and select “Obsidian.” Point Khoj to your Obsidian vault directory. Khoj will index all Markdown files in your vault, including frontmatter metadata and wiki-links. Initial indexing takes a few minutes depending on vault size.

Step 4: Add PDFs and Web Content

Beyond Obsidian, add PDF documents, web URLs, or plain text files as additional content sources. Khoj processes each source incrementally, so you can keep adding documents over time without re-indexing everything.

Step 5: Start Researching

Use the chat interface to ask natural language questions. Khoj searches your indexed documents, retrieves relevant passages, and generates a synthesized answer with inline citations. Click any citation to jump to the source document.

Step 6: Use Advanced Search Operators

Narrow results with filters like file:filename to search within a specific document, or words:50 to limit context length. Combine natural language with operators for precise retrieval.

Step 7: Automate with Daily Notes

Configure Khoj to automatically create daily summaries of your notes, highlighting action items, open questions, and key themes. This creates a running research log that compounds over time.

Best Practices:

  • Keep your Obsidian notes well-structured with clear headings for better chunking
  • Use tags consistently so Khoj can leverage metadata for filtering
  • Regularly review and update indexed content to keep search results current
  • Try different LLM backends for different tasks — use fast models for quick lookups, powerful models for deep analysis
Tags: