Floe is a backend for uploading, finalizing, and reading large files with Walrus and Sui.
It supports resumable chunk uploads, asynchronous finalize flow, stable file metadata, and byte-range reads through a versioned API.
- resumable upload sessions for large files
- chunk uploads with SHA-256 validation
- asynchronous finalize flow backed by Walrus
- Sui-based file metadata with stable
fileIdlookup - metadata, manifest, and stream endpoints
- CLI and SDK clients in this workspace
The current server API contract is v1.
Compatibility window:
- SDK:
>=0.2.0 <0.3.0 - CLI:
>=0.2.0 <0.3.0
- A client creates an upload session.
- The client uploads chunks in any order.
- Floe validates and stores uploaded chunks.
- The client requests finalize.
- Floe publishes the assembled file to Walrus.
- Floe records metadata on Sui and returns a
fileId. - Clients read the file through the file endpoints.
- API: Fastify server and route handlers
- Redis: upload state, chunk indexes, locks, queue state, and rate limiting
- Postgres: optional cache for file lookups
- Chunk store:
s3/R2/MinIO-compatible storage by default,diskoptional - Walrus: blob storage for finalized files
- Sui: file metadata and ownership anchor
- Node.js
>=20 - Redis access
- Walrus aggregator access
- Sui RPC access and a signing key
- Walrus upload access through:
sdkmode withFLOE_WALRUS_SDK_BASE_URL, orclimode with a localwalrusbinary
git clone https://github.com/floehq/floe.git
cd floe
npm installMinimal environment example:
PORT=3001
NODE_ENV=development
UPLOAD_TMP_DIR=/var/lib/floe/upload
FLOE_CHUNK_STORE_MODE=s3
FLOE_S3_BUCKET=floe-staging
FLOE_REDIS_PROVIDER=upstash
UPSTASH_REDIS_REST_URL=https://<your-upstash-url>.upstash.io
UPSTASH_REDIS_REST_TOKEN=<your-upstash-token>
WALRUS_AGGREGATOR_URL=https://walrus-testnet-aggregator.nodes.guru
FLOE_WALRUS_STORE_MODE=sdk
FLOE_WALRUS_SDK_BASE_URL=https://publisher.walrus-testnet.walrus.space
FLOE_NETWORK=testnet
SUI_PRIVATE_KEY=suiprivkey...
SUI_PACKAGE_ID=0x<your-package-id>Floe can also load a topology config file:
npm run dev -- --config ./config/floe.example.yaml --role readRedis modes:
FLOE_REDIS_PROVIDER=upstashwithUPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENFLOE_REDIS_PROVIDER=nativewithREDIS_URL=redis://host:6379
npm run devExamples:
npm run dev -- --role read
npm run dev -- --role write
npm run dev -- --config ./config/floe.example.yamlnpm run build --workspace=apps/api
npm run startdocker build -t floe-api:latest .For container deployments:
- mount a persistent writable path at
UPLOAD_TMP_DIR - use
/healthfor health checks - if local MinIO runs on the host, use
host.docker.internalinstead of127.0.0.1
Floe includes a root launcher at ./floe.sh that delegates to scripts/floe.sh.
./floe.sh "path/to/file.mp4" --parallel 3 --epochs 3
npm run upload -- "path/to/file.mp4" --parallel 3 --epochs 3Resume or override the API base:
./floe.sh "path/to/file.mp4" --resume <uploadId>
./floe.sh "path/to/file.mp4" --api http://localhost:3001/v1/uploadsPrepare a non-faststart MP4 before upload:
./floe.sh "path/to/file.mp4" --faststartnpm run bench:stream -- --base http://localhost:3001 --file <fileId>This writes CSV output under tmp/stream-load/<timestamp>/.
docs/API.md- API routes and response contractdocs/DEPLOYMENT.md- deployment and restart flowdocs/OPERATIONS.md- runtime model, configuration, metrics, and runbook notesdocs/SECURITY.md- auth model and security notes
MIT (LICENSE)