Skip to content

Self-host Typesense

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A C++ search engine, billed upstream as an open-source Algolia alternative: typo-tolerant instant search, facets, geo search, vector and hybrid search with built-in embedding models, and scoped API keys for multi-tenancy. GPL-3.0, one binary, with Raft clustering for high availability in the open-source build. The whole search index is held in RAM.

Key facts

CategorySearch engine
LicenseGPL-3.0
StackC++
Min RAM1024 MB
Official imageyes
Measured idle RAM29 MB
Difficulty
Our recommendation

Pick Typesense when you want an open-source Algolia alternative with high availability in the free build: a single C++ binary with typo-tolerant instant search, facets and grouping, geo search, vector and hybrid search with built-in embedding models, scoped API keys for multi-tenant data, and Raft clustering under GPL-3.0. Much of the ranking — field weights, sorting, grouping — is set per query rather than baked into the index. The trade-off is memory: Typesense keeps the entire search index in RAM, so size the server to your searchable data.

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# Typesense — official Docker image, per typesense.org/docs/guide/install-typesense.html
export TYPESENSE_API_KEY="$(openssl rand -hex 24)" && echo "$TYPESENSE_API_KEY"
mkdir -p "$(pwd)"/typesense-data
docker run -d --name typesense --restart unless-stopped \
  -p 8108:8108 \
  -v "$(pwd)"/typesense-data:/data typesense/typesense:30.2 \
  --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors
# the bootstrap key is admin-level: create scoped search-only keys for your app (upstream strongly recommends it)
# API on http://SERVER_IP:8108 — needs at least 2 vCPUs and RAM for the whole index

What you take on

Typesense's docs are unusually concrete about what it needs; read these before sizing a VPS:

non-negotiableThe whole search index lives in RAM. Upstream's sizing rule is 2–3× the size of the fields you search on, 7 bytes per vector dimension per record, and another 2–6 GB for a built-in embedding model (remote models such as OpenAI add nothing beyond the vectors). Leave display-only fields out of the schema to keep them on disk. The 1 GB floor in our catalog is our estimate for a small index.
non-negotiableTypesense "requires at least 2 vCPUs", so the smallest 1-vCPU VPS plans are out. Keep RAM use under 85% and treat any swap use as a signal to add memory, per the production guide.
non-negotiableThe --api-key you start with is an admin bootstrap key. Upstream strongly recommends never using it in an application: create scoped keys, generate scoped search keys (with embedded filter_by) in your backend for multi-tenant data, and rotate them with expires_at.
non-negotiableDo not copy the data directory while Typesense is running; take a snapshot through the snapshot API and archive that. After a restart, Typesense rebuilds the in-memory index from disk, which takes longer as the data grows.
non-negotiableHigh availability means a Raft cluster of at least 3 nodes (5 to survive two failures), each holding the full dataset in RAM — there is no sharding. Keep --peering-address on a private network, and upgrade followers first and the leader last.

An alternative to

Head-to-head

More self-hosted tools

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.