Self-host Khoj
2.0.0-beta.28AI second brain to chat with your docs, agents, automations
docker-compose up- Stars
- 38 080
- RAM
- Minimum 8 GB RAM (16 GB VRAM recommended)
- Storage
- Minimum 5 GB of disk available
- Port
- 42110 (Khoj web app and API server (started with --host="0.0.0.0" --port=42110))
ghcr.io/khoj-ai/khojWhat is Khoj?
Khoj is a personal AI assistant that indexes your notes and files so you can talk to them, using whichever large language model you point it at, local or hosted. Retrieval-augmented chat sits on top of a fast semantic search engine, and you can define custom agents with their own knowledge, persona, model and tools, or schedule recurring research that arrives in your inbox as email. It also generates images from prompts, takes and plays voice input, and writes and runs small Python programs for analysis and plots. Access is not limited to the browser: there are desktop, Obsidian, Emacs and WhatsApp clients, plus a PWA install for phones. Self-hosting means running the project's docker-compose stack (PostgreSQL with pgvector plus bundled SearxNG and Terrarium containers) or installing the server with pip and launching khoj --anonymous-mode; multi-user setups turn on magic-link or Google sign-in and are administered through a Django admin panel at /server/admin. The software is AGPL-3.0 licensed, current releases are in the 2.0 beta series, telemetry is on by default but can be switched off, and the vendor also offers a hosted cloud instance and an on-premises/hybrid enterprise variant.
Khoj alternatives
DodaiosSelf-hosted open-source AI assistant for desktop and headless servers. Coordinates coding agents, voice control with wake word, 40+ tool integrations, all data local.CompareDodaios with Khoj
CORECORE is a self-hosted personal AI OS: a temporal memory graph, a task engine with approval, scratchpad, voice and messaging access, plus Claude Code and Codex sessions.CompareCORE with Khoj
nanobotOpen-source Python framework you self-host as a personal AI agent: WebUI workbench, terminal client and chat channels with tools, memory, MCP and schedules.Comparenanobot with Khoj
Should you self-host Khoj?
Khoj scores 79/100 on selfhost.directory (how scoring works) and ranks #5 of 120 in AI Assistant. It has 38 080 GitHub stars, +516 in the last 30 days.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is hermes-agent (89/100, 261 891 stars). It scores higher overall, so compare the two before you pick. See Khoj vs hermes-agent side by side.
Features
- Admin Panel
- Chat with local or online LLMs
- Chat with your documents
- Desktop file sync
- Image Generation
- Multi-user AuthenticationGoogle OAuth needs the prod image ghcr.io/khoj-ai/khoj-cloud or pip install khoj[prod].
- Online search with references
- Python code execution
- Scheduled Automations
- Semantic Search
- Shareable conversations
- Voice chat
FAQ
How can I make my own agent?
Follow the project's step-by-step blog guide on creating custom agents in Khoj.
Can I use Khoj without self-hosting?
Yes, Khoj can be used straight away on the hosted app at app.khoj.dev with no setup.
More in AI Assistant
kiwi-memSelf-hosted memory gateway giving AI companions human-like long-term memory that fades, strengthens, sleeps, compresses — OpenAI/Anthropic compatible, Docker.
kynsKYNS is a self-hosted, open-source AI chat platform on LibreChat with uncensored chat, image generation, web search, and 24-hour auto-deletion.
LearnBuddySelf-hosted AI learning system that creates personalized 4-24 week study paths through conversational assessment, with BYOK LLM support and optional Feishu integration.
LeonAn open-source personal assistant you run self-hosted on your own machine, with voice chat, offline STT/TTS, modular skills, layered memory, and agentic tool execution.
lettaSelf-hosted Letta agent runtime: open-source stateful AI agents with persistent MemFS memory, an App Server, an OpenAI-compatible API, and Slack or Telegram channels.
LexiconA free, open-source desktop editor for Windows, macOS, and Linux that checks grammar offline and rewrites text using local AI models — no account or cloud needed.
LibratoryLibratory turns PDFs into M4B audiobooks with chapter markers, read-along highlighting, and bilingual editions. Self-hosted with offline-first TTS and AI.
LibreChatSelf-hosted open-source AI chat unifying OpenAI, Anthropic, Google, Azure, AWS, and local models with agents, code interpreter, artifacts, MCP, and enterprise auth.
lightdashLightdash is an open-source, self-hosted BI platform with a governed metrics layer, AI agents, dashboards, and data apps for modern data teams.
LimeBot-OSSelf-hosted agentic AI assistant with persistent memory, web dashboard, Discord/WhatsApp/Telegram support, and universal LLM compatibility via LiteLLM.
LLM HarborSelf-hosted, open-source CLI and desktop app that assembles a local AI stack: Ollama, llama.cpp, vLLM, Open WebUI and 50+ more Docker Compose services, pre-wired.
llms.pySelf-hosted, open-source alternative to ChatGPT, OpenRouter and Open WebUI: one gateway with CLI, API and web UI for text, image and audio across 530+ models.



0 comments