Run your own FlexStore sync server with Docker — one multi-tenant image, sync API only (no dashboard).
- Send
X-Api-Key,X-Tenant-Id, andX-Device-Idon every/sync/*request - Auto-provision: unknown credentials are created on first request (unless external management is enabled)
- Optional SSE pub/sub for fast cross-device sync
- Works with
@flexstore/reactand@flexstore/core
Images: stanleykariuki/flexstoreserver · stanleykariuki/flexstorerealtime
Docs: Request headers · Postman collections
| Folder | Containers | Use when |
|---|---|---|
simple/ |
flexstore + postgres | Polling only |
with-pubsub-service/ |
flexstore + realtime + postgres | SSE sync hints |
cd simple # or with-pubsub-service/
cp .env.example .env
docker compose up -d
curl -s http://localhost:8088/healthzImport from postman/:
- todos — single
todosresource - school —
schools,faculty,teachers,students,support_ticketswith nested pulls
Set variables apiKey, tenantId, deviceId to any strings — the server provisions them on first call.
const config = {
baseUrl: "http://localhost:8088",
pubsubUrl: "http://localhost:8090", // omit for simple stack
apiKey: "my-app-key",
tenantId: "workspace-acme",
resources: [{ name: "todos", attributes: { title: "string", done: "boolean" } }],
};tenantId and device id are sent as headers only — not in JSON bodies.
When OFS_EXTERNAL_MANAGEMENT=true, credentials are validated by your URL before provision. See docs/21-external-management.md.
MIT — see LICENSE.