Self-host Typesense
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
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
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 indexWhat you take on
Typesense's docs are unusually concrete about what it needs; read these before sizing a VPS: