Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

comparison

Best VPS for Khoj (2026): Specs for the Self-Hosted Second Brain

Khoj indexes everything you give it. Here is the VPS spec that actually keeps semantic search fast, plus the cheap one that will choke past 5,000 documents.

Best VPS for Khoj (2026): Specs for the Self-Hosted Second Brain

Khoj is the most polished open source second brain I have used. It indexes your notes, documents, and email, runs a semantic search server on top, and gives you a chat agent that actually grounds in your content. The hosting picture changed in late 2025 when Khoj added scheduled automations and deep research, both of which push the resource curve up.

I have been running Khoj on Hetzner for fourteen weeks, with about 12K documents indexed across Obsidian, PDFs, and a Gmail sync. Here is what the docs do not tell you about VPS picking.

What Khoj Actually Needs

Three things to size for:

  1. The Khoj server. FastAPI plus the search and chat orchestration. 300 to 500 MB resident at normal use.
  2. The embeddings index. This is the big one. Roughly 1.5 GB per 10,000 documents for the default model. Larger corpora and you want it all in RAM.
  3. Background jobs. The automations module, the deep research workflows, and the ingestion pipelines all spawn workers. Plan for headroom even if your steady state is low.

The thing that catches people: Khoj generates embeddings locally by default. On a 2 vCPU box, the initial indexing of a 5K document corpus takes 30 to 90 minutes. Plan for that startup time and do not panic when CPU sits at 100 percent.

VPS Comparison for Khoj

ProviderPlanvCPURAMDiskMonthlyBest fit
Hetzner CloudCCX1328 GB80 GB NVMe14.86 EURDefault for personal use
Contabo VPSVPS S48 GB100 GB NVMe4.50 EURBudget pick, single user
DigitalOceanPremium AMD 4 GB28 GB100 GB NVMe28 USDUS team, mid corpus
Hetzner CloudCCX23416 GB160 GB NVMe29.74 EURLarge corpora past 30K docs

Hetzner Cloud CCX13: The pick most people should make

This is what I run. NVMe makes a real difference for Khoj because the embeddings index reads heavily during search, and Hetznerโ€™s I/O is consistent enough that you do not see the slow afternoons some cloud platforms have. 8 GB RAM holds a 15K document corpus comfortably with room for the chat and automations workers.

Pros for Khoj:

Real downside: the cheapest CCX tier maxes at 8 GB. Past 30K documents I would jump to CCX23.

Get Hetzner: Hetzner Cloud.

Contabo VPS S: Budget pick for solo users

At 4.50 EUR a month, the value is hard to ignore. The newer NVMe Contabo plans handle Khojโ€™s I/O pattern without trouble for small to medium corpora. The trade offs are familiar:

For a single user who indexes their notes once and reads a lot, the price wins.

Get Contabo: Contabo VPS.

DigitalOcean Premium AMD 4 GB: For US east setups

If your model endpoint is in US east, NYC3 trims latency on every chat round trip. The 8 GB Premium AMD plan is enough for a mid sized Khoj corpus and the AMD CPU regenerates embeddings noticeably faster than the older shared plans.

Honest negative: 28 USD a month for 8 GB is steep against Hetzner. You pay for the region.

Get DigitalOcean: DigitalOcean.

Hetzner Cloud CCX23: For heavy corpora

Once you index past 30K documents, the index gets too big for 8 GB to hold comfortably. CCX23 with 16 GB RAM and 4 vCPU gives you the headroom for a corpus that grows. This is also the right pick if you want to enable deep research and have it run smoothly alongside everyday chat.

Get Hetzner: Hetzner Cloud.

Three Things I Wish I Had Known

  1. Initial indexing is slow on shared CPU. Plan for 60 to 90 minutes on a small VPS for a 10K document corpus. After that, incremental indexing is fast.
  2. Embeddings model choice matters. The default model is good. Swapping to a larger model doubles the index size on disk and in memory. Worth it for some use cases, not all.
  3. Backup the data directory. Losing the index means re indexing everything. Set up rsync or volume snapshots from day one.

What I would actually pick

If you are starting today:

For the bigger self hosting picture, see the SelfHostVPS comparison. Khoj keeps shipping new features, so I refresh this page when the indexing or chat layer changes meaningfully.

Frequently asked questions

What is the minimum VPS spec for Khoj?

2 vCPU and 4 GB RAM if you point Khoj at a remote model API and keep your indexed content under a few thousand documents. The Python server, the embeddings cache, and the search index sit comfortably under 2 GB resident at that scale. Larger corpora and you want 8 GB so the vector index stays in memory.

Does Khoj need a GPU on the VPS?

Only if you self-host the language model. The embeddings generation is CPU friendly and Khoj batches it well. The chat side calls whatever provider you configure, which can be Anthropic, OpenAI, a local Ollama, or a remote vLLM endpoint. CPU only VPS plans are the normal setup.

Can Khoj run on a 5 dollar Contabo box?

Yes for a single user with a small personal corpus. It starts to feel slow once you cross 5,000 indexed notes or documents, mostly because the embeddings index runs over the page cache and the slowest Contabo plans were not built for that pattern. Spend the extra 4 EUR and you avoid the slowdown entirely.

How much disk should I plan for Khoj?

Plan for at least 1.5x the size of your raw content for the embeddings index, plus 5 to 10 GB for the Python environment and Khoj itself. 80 GB NVMe is enough for almost everyone. If you ingest large PDFs or a years long Obsidian vault, plan for 160 GB.