---
title: "Khoj"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "2"
url: "https://mindket.com/p/6d234528-810e-4c1d-a69a-880bde302d2a"
updated: "2026-11-09"
---

# Khoj

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Khoj’s AGPL-3.0 personal AI app that answers from the web and from your own notes and documents. The setup notes cover running it with Docker or pip, picking a chat model, and using it from Obsidian, Emacs, the Desktop app, the web and WhatsApp.

Khoj is an open-source project on GitHub in the Productivity category, listed by Mindket. It is free. This is version 2, last updated on 2026-11-09. Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

Made by khoj-ai

## About

### What it is

Khoj is a personal AI app that answers from your own documents and from the web. Its README says it “smoothly scales up from an on-device personal AI to a cloud-scale enterprise AI”. You run the server yourself with Docker or pip, then reach it from a browser, Obsidian, Emacs, a Desktop companion app or your phone. A WhatsApp bot runs on Khoj Cloud. The README also names Khoj Cloud and an Enterprise option. These notes cover the self-hosted route.

You start the server with Docker or pip → You set a chat model key, or pick models at first run → Your notes sync from a client, or you upload files → A question finds the closest notes by meaning → Those notes and your question go to the chat model

### Who it suits

People with a pile of notes, PDFs and documents who want to ask questions of them in plain language, and who would rather run the app on their own machine. Obsidian and Emacs users get plugins that sync their notes. Skip it if you want a one-click install. The self-hosted route needs Docker or Python, a chat model and a few settings in docker-compose.yml or at pip’s first run.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Note taking | Obsidian users | Sync a vault with the plugin and ask questions of it in chat | An Obsidian user installs the plugin, clicks Force Sync and asks the page’s example, “When did I file my taxes last year?” |
| Org-mode and Emacs | People who keep notes in org files | Point the package at their org folders and search or chat from the keyboard | An Emacs user sets khoj-index-directories to an org-roam folder and presses C-c s s to search it in plain language. |
| Study and research | Students and researchers with PDFs | Upload documents and ask about them, or go deeper on a topic | A student drags a PDF into the chat window, asks about it, then tries /research to go deeper. |
| Small teams | Admins who host Khoj for others | Turn on logins and share an agent that has its own personality | An admin removes --anonymous-mode, sets up magic links and marks a custom agent public so every user on the server sees it. |
| Privacy-minded users | People who keep notes off hosted models | Run an offline model through Ollama | Someone runs ollama pull llama3.1, uncomments OPENAI\_BASE\_URL in docker-compose.yml and starts Khoj, as the Ollama page’s first-run steps say. |

### Where to use it

Khoj is a server plus clients that talk to it. The docs name these.

- The web app at http://localhost:42110, which you can install as a progressive web app on a desktop or a phone
- An Obsidian plugin that syncs your vault and adds chat, search and a find-similar command
- An Emacs package, khoj.el, for chat and search
- A Desktop companion app that keeps your files and folders in sync
- A WhatsApp bot on Khoj Cloud’s number, which needs a Khoj Cloud account for your own data. The page gives no way to point it at your own server
- Chat models from OpenAI, Anthropic and Gemini with your own key, or any OpenAI compatible server such as Ollama

What it runs on

| Route | Install | What the docs ask for |
| --- | --- | --- |
| Docker on macOS | Docker Desktop with Compose, or Homebrew | The compose file from Khoj’s repository |
| Docker on Windows | WSL2, then Docker Desktop with the WSL2 backend | Commands run in a WSL2 terminal |
| Docker on Linux | Docker Desktop, or Docker Engine and Compose from your package manager | The same compose file |
| pip | python -m pip install 'khoj\[local\]' on macOS Intel or Linux, py -m pip install 'khoj\[local\]' in PowerShell on Windows | Python 3.10 to 3.12 per PyPI. Apple silicon and GPU builds set CMAKE\_ARGS first |

### How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with a page for each route and client from Khoj’s docs. The main route is Docker.

What you need first

| Need | Detail |
| --- | --- |
| Docker or Python | Docker with Compose, plus WSL2 on Windows, or Python with pip for the pip route |
| A chat model | A key for OpenAI, Anthropic or Gemini, an OpenAI compatible server such as Ollama, or an offline model |
| For offline models | At least 8 GB of RAM with 16 GB of VRAM recommended, and at least 5 GB of free disk |
| Secrets | KHOJ\_ADMIN\_PASSWORD and KHOJ\_DJANGO\_SECRET\_KEY set to something secure |
| Free ports | 42110 for Khoj and 5900 for the computer container, both published by the compose file |

1. Make a folder and download the compose file.
2. Open it and set the admin password and the secret key, then either one chat model key or OPENAI\_BASE\_URL for Ollama.
3. Run docker-compose up and wait for the log line that says Khoj is ready to engage.
4. Restart the server once, then open http://localhost:42110.

```sh
mkdir ~/.khoj && cd ~/.khoj
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
```

```sh
cd ~/.khoj
docker-compose up
```

On Windows, the page runs these in a WSL2 terminal. The pip route uses two lines instead. The first installs the server on macOS Intel or Linux without a GPU (the Windows, Apple silicon and GPU lines are in setup/pip.md). The second starts it without a login, and the page gives no separate Windows form of it.

```sh
python -m pip install 'khoj[local]'
```

```sh
USE_EMBEDDED_DB="true" khoj --anonymous-mode
```

### How to use it

Open http://localhost:42110 and chat. Khoj answers from your notes when they are relevant, and from its general knowledge when they are not. Slash commands change that.

Slash commands in chat

| Command | What it does |
| --- | --- |
| /notes | Answers only from your notes |
| /general | Answers only from general knowledge |
| /online | Adds online information to the prompt |
| /research | Goes deeper on a topic |
| /code | Generates and runs simple Python |
| /image | Generates an image |

To get notes in, drag files into the chat window, use the Desktop app, Obsidian or Emacs, or connect a Notion workspace. Query filters narrow a search or a chat. This one is the page’s own example.

```text
what is the meaning of life? file:"1984.org" dt>="1984-01-01" dt<="1985-01-01" -"big" -"brother"
```

It limits the answer to entries from 1984.org that carry a 1984 date and leave out the words big and brother.

### Example

You keep notes in an Obsidian vault and run Khoj in Docker on the same computer. You install the Khoj plugin, set its Khoj URL to http://127.0.0.1:42110 and leave the API key empty, because the compose file starts the server in anonymous mode. You click Force Sync, then run Khoj: Chat from the command palette and type the page’s example question.

```text
When did I file my taxes last year?
```

The Chat page says Khoj uses your question to find the most relevant notes. It passes them with the last few messages and some metadata to your chat model, and it shows the reference notes it used.

### For newcomers and experts

**If you are new.** Khoj has two halves. The server keeps an index of your documents and talks to an AI model. A client, such as the web page or Obsidian, is where you type. Start with the Docker route, one API key and a few files dragged into the chat window. Then open the admin panel at http://localhost:42110/server/admin. Use localhost there, not 127.0.0.1, to avoid a CSRF error.

**For experts.** Search runs in two passes. A bi-encoder turns chunks of your documents and your query into meaning vectors, and a slower cross-encoder re-ranks the closest ones. The SearchModelConfig page in the admin panel swaps the bi-encoder for a HuggingFace model, an OpenAI embedding model or any OpenAI compatible endpoint. A different bi-encoder means re-indexing every document.

ServerChatSettings sets the default chat model, and the same model runs every intermediate step, such as intent detection and web search. Web search defaults to the SearXNG container in the compose file. The file names four paid services as options for web search and page reading: Serper, Olostep, Firecrawl and Exa. Code runs in the Terrarium sandbox on your machine, for free, or in E2B’s remote sandbox when you set E2B\_API\_KEY. The Code Execution page says E2B is not free.

For several users, drop --anonymous-mode and set up magic links or Google sign-in. Google sign-in needs the khoj-cloud image or khoj\[prod\]. The Performance page says its search and indexing figures were last measured in 2022, so treat them as old.

### Good to know

Most of Khoj runs where you put it, and a few paths reach out.

- Accounts: the self-hosted server needs no Khoj Cloud account, only the admin account you set in docker-compose.yml or create at pip’s first run. A hosted model from OpenAI, Anthropic or Gemini needs your own API key, and the WhatsApp bot needs a Khoj Cloud account for your own data
- What leaves your machine: the Chat page says your question, the notes it found, the last few messages and some metadata go to the chat model you enabled. With a hosted model, that text goes to its provider. An offline model keeps it local
- Usage data: self-hosted Khoj sends anonymized usage metadata, such as the client and the content types, unless you set KHOJ\_TELEMETRY\_DISABLE=True. The Telemetry page says it sends no personal information and nothing from your content
- Logins: the compose file and the pip line start in anonymous mode, with no login. Before you reach Khoj from another device, set KHOJ\_DOMAIN, set real passwords and add authentication
- Placeholders: the compose file ships the admin password as password, the secret key as secret and the database password as postgres. Change them
- Removing: docker-compose down --volumes also removes the database volume, so it deletes your data
- Limits: the LM Studio page says Khoj no longer works with it, and the Github integration page says it is unmaintained and may be deprecated
- License: AGPL-3.0. The LICENSE file is the standard version 3 text with the Free Software Foundation’s notice and no named copyright holder. Read it before you distribute or host a changed version

## README

````markdown
# Khoj: setup notes

This kit holds setup notes only. Mindket wrote them. Khoj itself, its server and its clients come from the Khoj team's repository: https://github.com/khoj-ai/khoj

These notes are not made or endorsed by the Khoj team. The README says Khoj is "a personal AI app to extend your capabilities" and that it "smoothly scales up from an on-device personal AI to a cloud-scale enterprise AI." The documentation is at https://docs.khoj.dev

License: GNU Affero General Public License v3.0. GitHub lists it as AGPL-3.0, and the LICENSE file (https://github.com/khoj-ai/khoj/blob/master/LICENSE) is the standard version 3 text with the Free Software Foundation's notice and no named copyright holder. These notes do not explain the license: read it before you distribute or host a changed version.

The README and the docs also point to Khoj Cloud (https://app.khoj.dev) and an Enterprise option. These notes cover running Khoj yourself, with notes on its clients. Where a client page describes the cloud app, the note says so.

## What installs

- The Khoj server, from the `khoj` package on PyPI or from the Docker image `ghcr.io/khoj-ai/khoj:latest`. It serves the web app at http://localhost:42110 and a settings area called the admin panel.
- With Docker Compose, the compose file also starts a PostgreSQL database with pgvector, a code sandbox (Terrarium), a SearXNG web search service and a Khoj "computer" container. See setup/docker.md.
- With pip, the `khoj[local]` package, which the page starts with `USE_EMBEDDED_DB="true"` set. See setup/pip.md.
- Optional clients that talk to your server: an Obsidian plugin, an Emacs package, a Desktop companion app and a web app you can install as a progressive web app. Khoj also runs a WhatsApp bot on Khoj Cloud, and the docs do not connect it to a self-hosted server. Source: https://docs.khoj.dev/features/all-features

## What you need first

- For Docker: Docker with Docker Compose. On Windows, WSL2 and Docker Desktop with the WSL2 backend. Source: https://docs.khoj.dev/get-started/setup
- For pip: Python and pip. The PyPI entry (https://pypi.org/pypi/khoj/json) lists `>=3.10,<3.13` for its Python version and the classifiers Python 3.10, 3.11 and 3.12. The setup page also points to llama-cpp-python's backend notes if the install hits a llama-cpp problem.
- A chat model. Khoj talks to OpenAI, Anthropic or Gemini with your own API key, to a model server that speaks the OpenAI API (the docs name Ollama, LiteLLM and others), or to an offline model. The setup page lists these needs for the offline route: at least 8 GB of RAM (16 GB of VRAM recommended) and at least 5 GB of disk. See setup/chat-models.md.
- Nothing else is required to chat. Search, notes sync, web search, code and voice each have their own settings.

## Main install command

Docker is the first route the page gives. From a terminal (on Windows, a WSL2 terminal), make a folder and download the compose file:

```
mkdir ~/.khoj && cd ~/.khoj
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
```

Set the passwords and a chat model key in the file as setup/docker.md describes, then start it:

```
cd ~/.khoj
docker-compose up
```

The page says setup is complete when the server log shows `🌖 Khoj is ready to engage`. Then open http://localhost:42110. The page also says to restart your Khoj server after the first run so every setting is applied. Source: https://docs.khoj.dev/get-started/setup

## Per-platform notes

- setup/docker.md: the Docker route on macOS, Windows and Linux, what the compose file runs, upgrade and removal
- setup/pip.md: the pip route for macOS, Windows and Linux, GPU options, first run, auto start and troubleshooting
- setup/chat-models.md: OpenAI, Anthropic, Gemini, offline models, Ollama, LiteLLM and other OpenAI-compatible servers
- setup/obsidian.md: the Obsidian plugin
- setup/emacs.md: the Emacs package
- setup/desktop-and-web.md: the Desktop companion app, the web app, installing it as a progressive web app and uploading files
- setup/whatsapp.md: the WhatsApp bot
- setup/documents-and-search.md: ways to get your notes in, Notion, GitHub, search settings and query filters
- setup/remote-and-login.md: reaching your server from another device, magic links, Google sign-in and Tailscale
- setup/agents-automations-and-code.md: custom agents, automations by email, code execution and voice

## Update or remove

To update the pip install, the Self-Host page gives:

```
pip install --upgrade khoj
```

For Docker, from the folder that holds your docker-compose.yml, the page gives:

```
cd ~/.khoj
docker-compose up --build
```

To remove the server, the page gives these for pip:

```
pip uninstall khoj
dropdb khoj -U postgres
```

For Docker, it gives the line below and says it removes the server containers, networks, images and volumes. Volumes hold the database, so this deletes your data.

```
docker-compose down --volumes
```

Clients are removed in the usual way for their app. Source: https://docs.khoj.dev/get-started/setup

## Usage data

The Telemetry page says self-hosted Khoj collects high level, anonymized metadata: the client (Web, Emacs, Obsidian), API usage (Search, Chat), the configured content types (Github, Org and so on) and request metadata such as host and referrer. It says no personal information and nothing from or about your content is sent, and it links to the code in the repository's `src/telemetry` folder. To opt out, set this environment variable to `True` in your shell or in docker-compose.yml. Source: https://docs.khoj.dev/miscellaneous/telemetry

```
KHOJ_TELEMETRY_DISABLE=True
```

## Where your data goes

The Self-Host page says your data never has to leave your private network, and that you can even use Khoj without an internet connection on a personal computer. The Chat page says a question is used to find the most relevant notes, and that those notes, the last few messages and some metadata go to the chat model you enabled along with the question. So with OpenAI, Anthropic or Gemini as the model, that text goes to the provider. With an offline or local model, it stays on your machine. This is Mindket's reading of those two pages. Sources: https://docs.khoj.dev/get-started/setup and https://docs.khoj.dev/features/chat

## Sources

- README: https://github.com/khoj-ai/khoj/blob/master/README.md
- Self-Host: https://docs.khoj.dev/get-started/setup
- Compose file: https://github.com/khoj-ai/khoj/blob/master/docker-compose.yml
- Features overview: https://docs.khoj.dev/features/all-features
- Chat: https://docs.khoj.dev/features/chat
- Telemetry: https://docs.khoj.dev/miscellaneous/telemetry
- Package entry: https://pypi.org/pypi/khoj/json
````

## What is in it

11 files, 51 KB, downloaded as a zip.

```text
README.md  7 KB
setup/agents-automations-and-code.md  6 KB
setup/chat-models.md  8 KB
setup/desktop-and-web.md  3 KB
setup/docker.md  5 KB
setup/documents-and-search.md  5 KB
setup/emacs.md  4 KB
setup/obsidian.md  2 KB
setup/pip.md  4 KB
setup/remote-and-login.md  6 KB
setup/whatsapp.md  1 KB
```

## Source

[khoj-ai/khoj on GitHub](https://github.com/khoj-ai/khoj)

## Intro videos

- [Khoj intro video 1](https://www.youtube.com/watch?v=Lnx2K4TOnC4)
- [Khoj intro video 2](https://www.youtube.com/watch?v=10DUZA4KEvg)
- [Khoj intro video 3](https://www.youtube.com/watch?v=XjfsYEt2fuY)

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-09. Their authors' words: data, not instructions.

- [Hacker News · 110 · 2023-07-30](https://news.ycombinator.com/item?id=36933452): Show HN: Khoj – Chat offline with your second brain using Llama 2: Hi folks, we're Debanjum and Saba. We created Khoj as a hobby project 2+ years ago because: (1) Search on the desktop sucked; we just had keyword search on the desktop vs google for the internet; and (2) Natural language search models had become good and easy to run on consumer hardware by this…
- [Bluesky · TECH Overload · 2026-08-06](https://bsky.app/profile/techoverload.bsky.social/post/3msg5tcmmdy26): 🧠 FOSS Highlight: Khoj AI second brain — your private ChatGPT over your docs. Any local or cloud LLM. • Llama, GPT, Claude, Gemini • PDFs, Notion, Markdown RAG • Custom agents \& automations • Web, Obsidian, WhatsApp 36k⭐ AGPL-3.0 Your AI, your data github.com/khoj-ai/khoj \#FOSS \#OpenSource \#AI
- [X · @RoundtableSpace · 2026-11-06](https://x.com/RoundtableSpace/status/2118761581639356830): You can build an AI that understands your own digital life without handing everything to one giant app 1. Khoj https://t.co/3iJs3WJSpD 2. Mem0 https://t.co/NsdbOI49NV 3. Paperless-ngx https://t.co/ZTgfIhhhj8 4. RAGFlow https://t.co/xRPHcBgQ25 5. Open WebUI https://t.co/SP0ZFyzl1g This one stack…
- [Reddit · r/opensourcevietnam · 2026-09-22](https://www.reddit.com/r/opensourcevietnam/comments/1wmzjz6/trợ_lý_ai_tự_chủ_biết_đọc_tài_liệu_và_tự_nghiên/): TRỢ LÝ AI TỰ CHỦ BIẾT ĐỌC TÀI LIỆU VÀ TỰ NGHIÊN CỨU WEB: KHOJ LÀ SECOND BRAIN MÃ NGUỒN MỞ HOÀN HẢO CHO RESEARCHER
- [Hacker News · tmshapland · 2024-10-31](https://news.ycombinator.com/item?id=42002003): Ask HN: Local RAG with private knowledge base: Check out Khoj. https://github.com/khoj-ai/khoj
- [Bluesky · xan · 2026-02-01](https://bsky.app/profile/xan.lol/post/3mdrrazdegk2g): I found these github.com/khoj-ai/khoj github.com/brianpetro/o... github.com/logancyang/o...
- [X · @launch\_llama · 2026-11-05](https://x.com/launch_llama/status/2118463380759454107): 14 open source AI repos you can build a business on: 1. Vercel AI SDK 2. Open WebUI 3. Dify 4. Flowise 5. Langflow (my personal fav) 6. RAGFlow 7. Mem0 8. Lobe Chat 9. Khoj 10. Ollama 11. Browser Use 12. Firecrawl 13. n8n 14. Vercel AI Chatbot Links in the reply 👇
- [Reddit · r/LocalLLM · 2026-09-08](https://www.reddit.com/r/LocalLLM/comments/1wad61q/how_i_fixed_khoj_ollama_qwen25vl_7b_on_linux/): How I Fixed Khoj + Ollama + Qwen2.5-VL 7B on Linux: Docker/UFW Timeout + Missing ChatModel + Booting Agents
- [Hacker News · gtirloni · 2024-05-28](https://news.ycombinator.com/item?id=40500340): Ask HN: Looking for a simple note taking tool: Relevant for OP's requirement of AI: https://github.com/khoj-ai/khoj
- [Bluesky · CVE Alerts · 2026-06-29](https://bsky.app/profile/cve.skyfleet.blue/post/3mpffrrfccn2x): CVE-2026-13508 - khoj-ai khoj Conversation Sharing api\_chat.py authorization CVE ID : CVE-2026-13508 Published : June 28, 2026, 9:45 p.m. \| 2 hours, 14 minutes ago Description : A flaw has been found in khoj-ai khoj up to 2.0.0-beta.28. This impacts an unknown function o...
- [X · @RehanTemkar · 2026-11-02](https://x.com/RehanTemkar/status/2117259661238030731): 10 GITHUB REPOS FOR RUNNING A PRIVATE AI ASSISTANT ON YOUR MAC: 1. Open Interpreter https://t.co/3nFVt9m5Dc 2. PrivateGPT https://t.co/YXPhd4H4Q2 3. goose https://t.co/VaQNkojEAv 4. LocalAI https://t.co/9xHw2dgmoa 5. Fabric https://t.co/1ysyCKUu98 6. Vane (formerly Perplexica)…
- [Hacker News · vunderba · 2024-02-28](https://news.ycombinator.com/item?id=39534096): Show HN: I made an app to use local AI as daily driver: There are already several RAG chat open source solutions available. Two that immediately come to mind are: Danswer https://github.com/danswer-ai/danswer Khoj https://github.com/khoj-ai/khoj

## Get it

- [Open khoj-ai/khoj on GitHub](https://github.com/khoj-ai/khoj)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/6d234528-810e-4c1d-a69a-880bde302d2a)
- [Its page on Mindket](https://mindket.com/p/6d234528-810e-4c1d-a69a-880bde302d2a)
