Skip to Content
Khoj

Khoj on Your Own Server: An AI Second Brain That Reads and Searches Your Documents

With our Khoj hosting we install Khoj, together with PostgreSQL and pgvector, on a VDS created for you. Khoj calls itself "your AI second brain": it searches the documents you upload by meaning, answers from them once a chat model is connected, and lets you set up custom agents and scheduled tasks.

Khoj's own web login needs an e-mail service or Google sign-in, and without either the project suggests running it in anonymous mode with no login. We run it that way and put a gate in front: the browser asks for credentials when you open the address, then Khoj appears. The release we install is flagged "latest" on GitHub even though its name contains beta. No chat model or provider key is included, and this installation has neither the code execution sandbox nor web search.

Install

From $15/mo

Comes with

  • Ubuntu Server 24.04 LTS (Noble Numbat) - 64bit
  • Docker
  • HTTPS address
  • Admin account set up during installation
  • Full root access
Khoj2.0.0-beta.28
Khoj home screen with question box, Research Mode and the Analyze document, Write code, Explain concept suggestions

Installation

About this installation

  • Everything behind the gate

    Neither Khoj's pages nor its Django panel at /server/admin open without credentials. We confirm before handing over the right password opens Khoj, while a wrong one, a missing one and an unauthenticated admin request all receive 401.

  • Document search without a key

    Three files uploaded through Search › Add Documents were listed straight away, and a search for "warranty period for lamps" put the warranty file first. The embedding model is downloaded to the server with the first document and needs no provider key.

  • PostgreSQL 17 with pgvector

    Documents, conversations and settings are stored in PostgreSQL 17 with pgvector. In place of the pg15 image in the project's example we run a pinned 0.8.1-pg17 image.

  • A tool for the gate password

    The gate password is replaced with altinsoft-app-password on the server. The tool has been run on a real installation, after which the previous password got 401. The admin panel has a password of its own.

  • Telemetry off

    Khoj's usage reporting is turned off with KHOJ_TELEMETRY_DISABLE. The admin panel's domain and cookie settings are set to your installation's address.

  • Most memory goes to Khoj

    Idle, Khoj used 1.24 GiB, PostgreSQL 77 MiB and the gate 11 MiB; after uploading documents Khoj sat at 1.12 GiB. Expect more once the embedding model is loaded. Plans offered for Khoj have no less than 4 GB RAM.

Screens

Khoj screens from our test install

Click a screenshot to see it larger.

  • The home screen: question box, Research Mode toggle and starter suggestions; no chat model configured yet.
  • Three sample documents uploaded through Search › Add Documents, shown as cards.
  • Searching "warranty period for lamps": the warranty file first, then the returns and shipping files.
  • Settings with empty Models and Clients sections, Export Chats and the long-term Memories switch.

Use cases

What Khoj is good for

  • Searching your own documents

    The README lists PDF, Markdown, org-mode, Word and Notion among the sources Khoj reads. The Search screen looks for meaning rather than exact words, and Select file narrows a search to chosen files. We tried .md and .txt.

  • Agents of your own

    Create Agent on the Agents screen builds agents with their own knowledge, persona, chat model and tools, according to the README. Without a chat model we did not create one.

  • Scheduled research

    Khoj's docs describe Automations as queries that run on a schedule and send the results by e-mail. This installation has no e-mail service, and we did not check whether automation results get delivered.

  • Commands in chat

    Per the docs, /notes answers only from your notes, /general only from the model's general knowledge, and /research goes deeper into a topic. /online and /code rely on search and code services that this installation leaves out.

Steps

From order to the first search

  1. 01

    Order

    Ordering starts with Khoj already filled in; you decide on location and plan, and plans with too little memory cannot be picked. Plans suitable for Khoj begin at $15.

  2. 02

    Installation

    The server comes up with Khoj, PostgreSQL and the gate, and the gate and admin panel are probed with four requests. With a clean result the service normally goes live.

  3. 03

    Upload documents

    After the browser's credentials dialog, use Search › Add Documents and run your first search.

  4. 04

    Chat model

    Chatting needs a chat model and provider defined in the /server/admin panel. Going by our installation settings, you sign in there with your e-mail address and the installation password; we have not tried that login.

Packages

Packages for Khoj

Only packages that meet the minimum Khoj needs are listed; prices are monthly.

  • USA 1

    Lowest-priced package that runs this app

    $15/mo

    4 vCPU4 GB RAM30 GB NVMe

    Install
  • USA 2

    $18/mo

    4 vCPU6 GB RAM40 GB NVMe

    Install
  • USA 3

    $22/mo

    4 vCPU8 GB RAM50 GB NVMe

    Install
  • USA 4

    $27/mo

    4 vCPU10 GB RAM60 GB NVMe

    Install
  • USA 5

    $33/mo

    4 vCPU12 GB RAM70 GB NVMe

    Install
  • USA 6

    $37/mo

    6 vCPU14 GB RAM80 GB NVMe

    Install
  • USA 7

    $40/mo

    6 vCPU16 GB RAM90 GB NVMe

    Install
  • USA 8

    $46/mo

    8 vCPU18 GB RAM100 GB NVMe

    Install

Technical

Technical details

App version
2.0.0-beta.28
Operating system
Ubuntu Server 24.04 LTS (Noble Numbat) - 64bit
Minimum CPU
2 vCPU
Minimum memory
4 GB
Minimum disk
30 GB

Two logins: the gate and the admin panel

There are two separate logins on this installation. The first is your browser's credentials dialog, filled in with the details from the handover message; the password shows once you open the link inside it. Everyone who gets through it is the same "default" user in Khoj, because anonymous mode has no per-person accounts.

The second is Khoj's Django admin panel at /server/admin, where chat models and providers are defined. Khoj's setup guide explains that the admin password exists so you can customise Khoj later through this panel. Our installation settings make its username the e-mail address given when ordering and its password the gate's first password. We did not try logging in to the panel or defining a model there on our test install.

  • Renewing the gate password

    Log in over SSH as root and start altinsoft-app-password with sudo. It does not want the current password and reads a replacement twice, between 12 and 72 characters long, without blanks, accented letters, quote marks, \, $ or #.

  • The admin panel password is separate

    altinsoft-app-password only touches the browser gate. The Django admin panel's password is changed from the panel's own user screen, so treat the two as independent.

  • Desktop and plugin clients

    Khoj's desktop, Obsidian and Emacs clients authenticate with a Bearer key and cannot get through a browser gate. On this installation you use the web interface only.

  • Shared conversation links

    Khoj's docs say a conversation can be shared through a public link. Here the address sits behind the gate, so whoever opens such a link also needs the gate password. We did not try it.

On this installation, and missing from it
PartStatusDetail
Khoj server and web appInstalledAnonymous mode, gate in front
PostgreSQL 17 + pgvectorInstalledDocuments, chats, settings
Chat model and keyMissingYou add one in the admin panel
Code execution sandboxMissingUpstream example service not added
Web search (SearXNG)MissingCan be set up later; untested
Computer use serviceMissingWould need the host's Docker socket

Release, data and upgrades

  • A release named beta

    2.0.0-beta.28 is marked "latest" on GitHub rather than as a pre-release, yet carries beta in its name. Keep in mind that behaviour may shift in later releases.

  • Where data lives

    Documents and conversations are in the PostgreSQL volume; Khoj's own settings and downloaded models are on separate Docker volumes. Make sure your server backup covers them.

  • Exporting chats

    Export Chats under Settings › Account › Export Data downloads every conversation. With no conversations yet, we did not try it.

  • Upgrades

    The image is pinned and never upgrades itself. Moving to a newer release, and when, is your decision; back up the database volume first.

FAQ

Frequently asked questions

8 questions

What is the way into Khoj?

Your browser pops up a login box on the first visit; enter the account name and password delivered at handover. Khoj itself then asks for nothing. According to our installation settings, the admin panel at /server/admin takes your e-mail address with the same original password; we have not tried that login.

Does chat work straight away?

No. The Models section in Settings is empty at handover, because no chat model or provider key is included. Once you define a model in the admin panel you can chat. Uploading and searching documents works without any key.

Can Khoj search the web?

Not on this installation. We left out the SearXNG search service from the project's example, and we have not tried the /online command or online research here; do not expect them to work until a search service is configured.

Can it run code?

There is no code execution sandbox here. The project's sandbox service is only published under a latest tag, so we did not add it, and we have not tried the /code command.

Can each team member have an account?

No. Khoj runs in anonymous mode, and whoever gets through the browser login acts as one shared "default" user and sees the same documents and conversations.

Can I use it from Obsidian or the desktop app?

Not here. Those clients connect with a key and cannot pass a browser gate, so Khoj is used through its web interface only.

Which release is installed?

The one currently published in our catalogue. Right now: 2.0.0-beta.28. Despite the beta in its name, GitHub marks it as the latest release.

What if something goes wrong during setup?

The service normally stays off until the gate and admin panel checks pass. Your customer panel shows where it stopped; our team reinstalls Khoj or hands over the server without it and sends you an e-mail.

Catalogue

Khoj

Get Khoj installed on your server

Pick your package and pay; the app's installation starts with your order.