Self-hosted search engine with an Algolia-compatible API. Single binary, no dependencies.
Drop-in replacement for Algolia β works with InstantSearch.js and the algoliasearch client. Typo-tolerant full-text search with faceting, geo search, and custom ranking. Single static binary, runs anywhere, data stays on disk.
Live Demo Β· Geo Demo Β· API Docs
curl -fsSL https://install.flapjack.foo | sh #install
flapjack #run the server
open http://127.0.0.1:7700/dashboard #load the dashboard
# Add documents
curl -X POST http://localhost:7700/indexes/movies/documents \
-d '[
{"objectID":"1","title":"The Matrix","year":1999},
{"objectID":"2","title":"Inception","year":2010}
]'
# Search
curl "http://localhost:7700/indexes/movies/search?q=matrxi"
flapjack uninstallQuickstart API
| Method | Endpoint | Description |
|---|---|---|
GET |
/indexes |
List all indexes |
GET |
/indexes/:name/search?q=... |
Search (query params) |
POST |
/indexes/:name/search |
Search (JSON body) |
POST |
/indexes/:name/documents |
Add/update documents |
GET |
/indexes/:name/documents/:id |
Get a document |
DELETE |
/indexes/:name/documents/:id |
Delete a document |
POST |
/indexes/:name/documents/delete |
Bulk delete by ID array |
GET |
/indexes/:name/settings |
Get index settings |
PUT |
/indexes/:name/settings |
Update index settings |
DELETE |
/indexes/:name |
Delete an index |
GET |
/tasks/:taskId |
Check task status |
POST |
/migrate |
Migrate from Algolia |
These are convenience endpoints with no auth required in dev mode. The full Algolia-compatible API lives under /1/ with support for API keys, secured keys, filters, facets, and everything else.
Note:
Binaries: Releases.
# Install specific version
curl -fsSL https://install.flapjack.foo | sh -s -- v0.2.0
# Custom install directory
FLAPJACK_INSTALL=/opt/flapjack curl -fsSL https://install.flapjack.foo | sh
# Skip PATH modification
NO_MODIFY_PATH=1 curl -fsSL https://install.flapjack.foo | shflapjack
curl -X POST http://localhost:7700/migrate \
-d '{"appId":"YOUR_ALGOLIA_APP_ID","apiKey":"YOUR_ALGOLIA_ADMIN_KEY","sourceIndex":"products"}'Search:
curl "http://localhost:7700/indexes/products/search?q=widget"Then point your frontend at Flapjack instead of Algolia:
import algoliasearch from 'algoliasearch';
// app-id can be any string, api-key is your FLAPJACK_ADMIN_KEY or a search key
const client = algoliasearch('my-app', 'your-flapjack-api-key');
client.transporter.hosts = [{ url: 'localhost:7700', protocol: 'http' }];
// Everything else stays the sameInstantSearch.js widgets work as-is β SearchBox, Hits, RefinementList, Pagination, GeoSearch, etc.
| Feature | Details |
|---|---|
| Full-text search | Prefix matching, typo tolerance (Levenshtein β€1/β€2) |
| Filters | Numeric, string, boolean, date β AND/OR/NOT |
| Faceting | Hierarchical, searchable, filterOnly, wildcard * |
| Geo search | aroundLatLng, insideBoundingBox, insidePolygon, auto-radius |
| Highlighting | Typo-aware, supports nested objects and arrays |
| Custom ranking | Multi-field, asc/desc |
| Synonyms | One-way, multi-way, alternative corrections |
| Query rules | Rewrite queries, pin/hide results |
| Pagination | page/hitsPerPage and offset/length |
| Distinct | Deduplication by attribute |
| Stop words & plurals | English built-in |
| Batch operations | Add, update, delete, clear, browse |
| API keys | ACL, index patterns, TTL, secured keys (HMAC) |
| S3 backup/restore | Scheduled snapshots, auto-restore on startup |
Algolia-compatible REST API under /1/ β works with InstantSearch.js v5, the algoliasearch client, and Laravel Scout.
| Flapjack | Algolia | Meilisearch | Typesense | Elasticsearch | OpenSearch | |
|---|---|---|---|---|---|---|
| Self-hosted | β | β | β | β | β | β |
| License | MIT | Proprietary | MIT | GPL-3 | ELv2 / SSPL / AGPL | Apache 2.0 |
| Algolia-compatible API | β | β | β | β | β | β |
| InstantSearch.js | Native | Native | Adapter | Adapter | Community | Community |
| One-click Algolia migration | β | β | β | β | β | β |
| Typo tolerance | β | β | β | β | β | β |
| Faceting (hierarchical) | β | β | β | β | β | β |
| Filters (numeric, string, bool, date) | β | β | β | β | β | β |
| Geo search | β | β | β | β | β | β |
| Synonyms | β | β | β | β | β | β |
| Query rules (pin/hide) | Basic | β | β | β | β | β |
| Custom ranking | β | β | β | β | β | β |
| Analytics | Basic | β | Cloud only | β | β | β |
| Scoped API keys (HMAC) | β | β | β | β | β | β |
| S3 backup/restore | β | N/A | β | β | Snapshots | Snapshots |
| Dashboard UI | β | β | β | Cloud only | Kibana | Dashboards |
| Embeddable as library | β | β | β | β | β | β |
| HA / clustering | β | β | Cloud only | β | β | β |
| Multi-language | English only | 60+ | Many | Many | Many | Many |
| Vector / semantic search | β | β | β | β | β | β |
| AI search (RAG) | β | β | β | β | β | β |
| Hybrid search (keyword + vector) | β | β | β | β | β | β |
| A/B testing | β | β | β | β | β | Partial |
cargo build --release
./target/release/flapjackRequires Rust 1.70+. Pre-built binaries for Linux x86_64 (static musl), Linux ARM64, macOS Intel, and macOS Apple Silicon on the releases page.
Docker
# docker-compose.yml
services:
flapjack:
image: flapjack/flapjack:latest
ports:
- "7700:7700"
volumes:
- ./data:/data
environment:
FLAPJACK_DATA_DIR: /data
FLAPJACK_ADMIN_KEY: ${ADMIN_KEY}
restart: unless-stoppedSystemd
# /etc/systemd/system/flapjack.service
[Unit]
Description=Flapjack Search Server
After=network.target
[Service]
Type=simple
User=flapjack
WorkingDirectory=/var/lib/flapjack
Environment=FLAPJACK_DATA_DIR=/var/lib/flapjack/data
Environment=FLAPJACK_ADMIN_KEY=your-key
ExecStart=/usr/local/bin/flapjack
Restart=always
[Install]
WantedBy=multi-user.target| Variable | Default | Description |
|---|---|---|
FLAPJACK_DATA_DIR |
./data |
Index storage directory |
FLAPJACK_BIND_ADDR |
127.0.0.1:7700 |
Listen address |
FLAPJACK_ADMIN_KEY |
β | Admin API key (enables auth) |
FLAPJACK_ENV |
development |
production requires auth on all endpoints |
FLAPJACK_S3_BUCKET |
β | S3 bucket for snapshots |
FLAPJACK_S3_REGION |
us-west-1 |
S3 region |
FLAPJACK_SNAPSHOT_INTERVAL |
β | Auto-snapshot interval (e.g. 6h) |
FLAPJACK_SNAPSHOT_RETENTION |
β | Retention period (e.g. 30d) |
Data stored in FLAPJACK_DATA_DIR. Mount as a volume in Docker.
- Online API docs
- Swagger UI (local)
Flapjack's core can be embedded directly:
[dependencies]
flapjack = { version = "0.1", default-features = false }See LIB.md for the embedding guide.
Built on Tantivy (forked for edge-ngram prefix search). Axum + Tokio HTTP server. Supports 600+ indexes per 4GB node.
flapjack/ # Core library (search, indexing, query execution)
flapjack-http/ # HTTP server (Axum handlers, routing)
flapjack-replication/ # Cluster coordination
flapjack-ssl/ # TLS (Let's Encrypt, ACME)
flapjack/ # Binary entrypoint
cargo install cargo-nextest
cargo nextest runSecurity
- Hash API keys at rest (salted SHA-256)
- Admin key on first boot only
- Key type prefixes (
fj_admin_,fj_search_)
Infrastructure
- High availability β multi-node replication
- Managed cloud (SaaS)
Search
- Vector / hybrid search
- AI search (RAG)
- A/B testing
- Multi-language support
Platform
- Webhooks
- Role-based access control
Flapjack includes a built-in dashboard UI served at http://localhost:7700 when the server is running.


