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:
- The Khoj server. FastAPI plus the search and chat orchestration. 300 to 500 MB resident at normal use.
- 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.
- 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
| Provider | Plan | vCPU | RAM | Disk | Monthly | Best fit |
|---|---|---|---|---|---|---|
| Hetzner Cloud | CCX13 | 2 | 8 GB | 80 GB NVMe | 14.86 EUR | Default for personal use |
| Contabo VPS | VPS S | 4 | 8 GB | 100 GB NVMe | 4.50 EUR | Budget pick, single user |
| DigitalOcean | Premium AMD 4 GB | 2 | 8 GB | 100 GB NVMe | 28 USD | US team, mid corpus |
| Hetzner Cloud | CCX23 | 4 | 16 GB | 160 GB NVMe | 29.74 EUR | Large 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:
- Sub 80 ms latency to OpenAI, Anthropic, and most model providers from Falkenstein
- Snapshots make it easy to roll back after a bad Khoj upgrade
- 20 TB outbound is generous unless you do heavy embedding regeneration
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:
- Provisioning is slow, sometimes hours
- Outbound latency to model APIs is 100 to 200 ms slower than Hetzner from European data centers
- The cheapest tier is shared CPU, which means embedding regeneration on a busy host takes longer
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
- 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.
- 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.
- 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:
- EU, personal use: Hetzner CCX13
- EU, lowest spend: Contabo VPS S
- US east: DigitalOcean Premium AMD 8 GB
- 30K plus docs: Hetzner CCX23 or larger
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.