Skip to main content

Desktop App

The Khoj Desktop app is a companion application that automatically syncs your local files and folders with Khoj, enabling you to chat with and search your entire knowledge base.
The Desktop app keeps your files in sync automatically, so Khoj always has access to your latest documents, notes, and files.

Features

Automatic Sync

Continuously syncs selected files and folders to keep Khoj up-to-date with your latest content.

File Management

Easily add or remove files and folders from the Khoj index through a simple settings interface.

Background Operation

Runs quietly in the background, ensuring your knowledge base is always current.

Cross-Platform

Available for Windows, macOS, and Linux.

Installation

1

Download the App

Download the Khoj Desktop app for your operating system from khoj.dev/downloads.

Windows

.exe installer

macOS

.dmg installer

Linux

.AppImage or .deb
2

Install the Application

Run the installer and follow the on-screen instructions to complete the installation.
3

Launch Khoj

Open the Khoj Desktop app from your applications menu or desktop shortcut.

Configuration

Khoj Cloud Setup

1

Generate API Key

Navigate to the Khoj Web App Settings and generate a new API key.
2

Open Desktop Settings

Click the settings icon in the Khoj Desktop app.
3

Enter API Key

Paste your API key in the Khoj API Key field and click Save.
4

Add Files and Folders

Click Add Files or Add Folders to select content you want Khoj to index.These files and folders will be automatically kept in sync.
You can add as many files and folders as you want. Khoj will handle the indexing and syncing automatically.

Self-Hosted Setup

If you’re running your own Khoj server, follow these additional configuration steps.
1

Open Settings

Open the Settings page in the Khoj Desktop app.
2

Configure Server URL

Set the Khoj URL field to your self-hosted server URL.
http://127.0.0.1:42110
3

API Key (Optional)

If your Khoj server is not running in anonymous mode, generate and enter an API key.Leave the Khoj API Key field empty if running with anonymous mode:
khoj --anonymous-mode
4

Add Content

Add files and folders you want to sync, then click Save.

Using the Desktop App

Adding Content

  1. Open the Khoj Desktop app settings
  2. Click Add Folders
  3. Select the folder(s) you want to sync
  4. Click Save to start syncing
All files within the selected folders will be recursively indexed and kept in sync.

Removing Content

To remove files or folders from Khoj:
  1. Open the Desktop app settings
  2. Find the file or folder in the list
  3. Click the Remove button next to it
  4. Click Save to apply changes
Removing content from the Desktop app will remove it from Khoj’s index, but it will not delete the files from your computer.

Sync Status

The Desktop app shows the current sync status:
  • Syncing: Files are currently being uploaded and indexed
  • Up to date: All files are synced with the latest version
  • Error: There was an issue syncing (check your connection or API key)

Progressive Web App Alternative

You can also install the Khoj web interface as a Progressive Web App (PWA) on your desktop:
1

Open Khoj in Chrome

Navigate to app.khoj.dev in Chrome or Edge.
2

Install the App

Click the install button in the address bar or use the menu:PWA Install Desktop
3

Alternative Installation

Or via menu:
  1. Click the three-dot menu
  2. Go to ‘Cast, Save, and Share’
  3. Click “Install Khoj”
Chrome PWA Alternative
The PWA provides the web interface only. To sync local files and folders, you still need the Desktop companion app.

Troubleshooting

  1. Verify your API key is correct
  2. Check your internet connection
  3. Ensure the Khoj server URL is correct
  4. Try removing and re-adding the problematic files/folders
For Khoj Cloud users:
  • Check your internet connection
  • Verify the server URL is https://app.khoj.dev
For self-hosted users:
  • Ensure your Khoj server is running
  • Verify the server URL and port are correct
  • Check firewall settings
  1. Generate a new API key from the Settings page
  2. Copy the entire key (check for extra spaces)
  3. Paste it into the Desktop app settings
  4. Click Save and restart the app
This is normal during initial indexing of large file collections. Once indexing is complete, resource usage will decrease significantly.If the issue persists:
  • Try syncing folders in smaller batches
  • Exclude large binary files or databases
  • Check for file permission issues

Supported File Types

The Desktop app can sync and index various file types:

Documents

  • Markdown (.md)
  • PDF (.pdf)
  • Text (.txt)
  • Org mode (.org)

Office Files

  • Word (.docx)
  • Excel (.xlsx)
  • PowerPoint (.pptx)

Other

  • Images (with OCR)
  • Code files
  • HTML files

Next Steps

Web Client

Access Khoj from any browser

Chat Features

Learn about chat capabilities

Obsidian Plugin

Integrate with Obsidian

Search

Master natural language search

Build docs developers (and LLMs) love