Skip to content

Postgres + S3 (Experimental)

Fluent OSS has an experimental storage backend that replaces SQLite and filesystem storage with Postgres and S3-compatible object storage. The MCP contract and all tool behavior remain identical.

WARNING

This backend is experimental. The default supported production backend is SQLite + filesystem. Use this if you already want managed relational storage or shared object storage.

What This Is

  • Same single-user OSS runtime
  • Same bearer-token auth on /mcp
  • Postgres for relational state (instead of SQLite)
  • S3-compatible storage for artifacts (instead of filesystem)
  • Additive storageBackend: "postgres-s3" in capabilities metadata

Required Environment Variables

Start from the example file:

bash
cp .env.postgres-s3.example .env.postgres-s3

Then fill in the following required variables:

VariablePurpose
FLUENT_POSTGRES_URLPostgres connection string
FLUENT_S3_ENDPOINTS3-compatible endpoint URL
FLUENT_S3_REGIONS3 region
FLUENT_S3_BUCKETS3 bucket name
FLUENT_S3_ACCESS_KEY_IDS3 access key
FLUENT_S3_SECRET_ACCESS_KEYS3 secret key
FLUENT_S3_FORCE_PATH_STYLEUse path-style addressing (for MinIO, etc.)

Optional variables:

VariablePurpose
FLUENT_OSS_HOSTBind address
FLUENT_OSS_PORTListen port
FLUENT_OSS_ROOTStill used for auth state and local operator files

TIP

FLUENT_OSS_ROOT is still used for auth state and local operator files even though relational data and artifacts live outside the filesystem.

Example Local Stack

A practical local setup uses:

ServiceAddress
Postgres127.0.0.1:55432
MinIO127.0.0.1:59000
Fluent OSS127.0.0.1:8788

The example env file is already shaped for this style of stack.

Getting Started

  1. Copy and fill in the environment template:
bash
cp .env.postgres-s3.example .env.postgres-s3
# Edit .env.postgres-s3 with your Postgres and S3 credentials
  1. Export the env vars into your shell.

  2. Validate connectivity, schema bootstrap, and bucket access:

bash
npm run oss:check:postgres-s3 -- --host 127.0.0.1 --port 8788
  1. Start the runtime:
bash
npm run oss:start:postgres-s3 -- --host 127.0.0.1 --port 8788
  1. Verify:
bash
curl http://127.0.0.1:8788/health
curl http://127.0.0.1:8788/codex-probe

Snapshot Import / Export

Export from the Postgres + S3 backend:

bash
npm run oss:export:snapshot -- --backend postgres-s3 \
  --out "./tmp/fluent-oss-postgres-s3-snapshot.json"

Import into the Postgres + S3 backend:

bash
npm run oss:import:snapshot -- --backend postgres-s3 \
  --file "./tmp/fluent-oss-postgres-s3-snapshot.json"

Portability

What moves cleanly:

  • Relational rows
  • Artifact metadata rows

What does not move yet:

  • Artifact binary bytes inside the snapshot JSON
  • Automated object-store-to-object-store blob migration

Technical Notes

  • The bootstrap schema is a current-state Postgres snapshot, not a replay of every historical SQLite migration
  • This backend proves Fluent can run on a third storage stack without changing the MCP contract
  • Cloud and default SQLite OSS remain the supported release paths

Apache 2.0 Licensed (Self-Host) | Fluent Cloud coming soon