Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Typesense
updated Sep 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 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.
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
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.htmlexport TYPESENSE_API_KEY="$(openssl rand -hex 24)" && echo "$TYPESENSE_API_KEY"mkdir -p "$(pwd)"/typesense-datadocker 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
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.
Typesense used 29 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.8.1 (first boot, measured Sep 2026). We list a minimum of 1024 MB.
Is the Typesense install snippet verified?
The Typesense install snippet is marked verified on Ubuntu 26.04 (Nov 2026).