Algolia
Algolia is our hosted search layer for fast, typo-tolerant lookup over documents and knowledge bases—not a database replacement, but the index users query in the UI.
APIs sync data into Algolia; front-ends use search-only keys. Standards here are still developing.
What we use Algolia for
Section titled “What we use Algolia for”| Use | Plain English |
|---|---|
| Knowledge / document search | APIs index content after create/update/delete (e.g. Atlas knowledge base) |
| Admin and portal UIs | React apps call Algolia from the browser with a search-only key |
| Index configuration | One-time or scripted setup for index settings and replicas |
Not every repo uses Algolia—check each project’s .env.example before assuming these secrets exist.
Typical secrets (by layer)
Section titled “Typical secrets (by layer)”Fly APIs (runtime)
Section titled “Fly APIs (runtime)”Set with fly secrets set on each tier’s app—same as other runtime secrets on the Fly checklist.
| Secret | Purpose |
|---|---|
ALGOLIA_APP_ID | Algolia application ID |
ALGOLIA_ADMIN_API_KEY | Server-side index/write access—never ship to the browser |
ALGOLIA_INDEX_NAME | Index name for that product (e.g. knowledge_base) |
The admin API key can modify indexes and records. Keep it on the API only.
Front-end apps (build-time)
Section titled “Front-end apps (build-time)”Admin and static apps often use Vite-prefixed variables at build time (Cloudflare Pages, etc.)—not GitHub Actions deploy secrets for Fly APIs:
| Variable | Purpose |
|---|---|
VITE_ALGOLIA_APP_ID | Same app ID, safe to expose in the client bundle |
VITE_ALGOLIA_SEARCH_API_KEY or VITE_ALGOLIA_SEARCH_KEY | Search-only key for in-browser queries |
VITE_ALGOLIA_INDEX_NAME | Index the UI searches |
Use Algolia’s search-only API key in front-ends. Do not put ALGOLIA_ADMIN_API_KEY in a VITE_* variable.
Environments
Section titled “Environments”- Prefer separate indexes or API keys per tier (staging / UAT / production) where product policy requires it—do not point staging UIs at production indexes by mistake.
- Align index names with Naming conventions (repo name + tier when you split indexes).
Rotation and ownership
Section titled “Rotation and ownership”Algolia admin and search keys are app-specific secrets on the Rotation inventory—priority and schedule TBD. Rotating the admin key requires updating Fly secrets and redeploying APIs that sync to Algolia; rotating search keys requires rebuilding front-end apps that embed them.
Related
Section titled “Related”- Fly.io — where API runtime secrets live
- Rotation inventory — credentials calendar
- Naming conventions — repo and tier naming
- Fly checklist — Fly environment variables panel