Prerequisites
- An existing PostgreSQL database reachable from the Fleet host. Fleet creates its tables, but not the database.
- Fleet RLM installed with
uv sync --dev - Daytona and model credentials configured as in the quickstart
Point Fleet at PostgreSQL
SetFLEET_DATABASE_URL in .env. Without it, Fleet uses postgresql://postgres:postgres@localhost:5432/fleet.
.env
config/fleet.toml puts Fleet’s tables in the fleet_rlm_lite schema (storage.database_schema). The schema name must be a lowercase PostgreSQL identifier.
Schema migrations
Fleet applies its schema when the API server starts. It takes a transaction-scoped advisory lock, reads thefleet_lite_schema_migrations ledger, and applies each pending numbered migration once. You don’t run a separate migration command.
To run DDL as a different role, set FLEET_DATABASE_MIGRATION_URL. It must point at the same host, port, and database as FLEET_DATABASE_URL. Fleet closes the migration connection once startup migrations finish.
If the database already has a newer schema than your Fleet version, startup fails with Database schema version <n> is newer than this Fleet version <m>. Upgrade Fleet instead of downgrading the database.
Fleet RLM Lite’s tables use
fleet_lite_* names, separate from tables created by earlier Fleet releases. Fleet doesn’t migrate data from those tables or delete them.Connection handling
Fleet uses one connection pool for all queries.- Fleet recycles pooled connections after 50 minutes and closes surplus connections idle for more than 10 minutes.
- Fleet checks each connection when it takes it from the pool, so it never hands out a connection the server closed while idle.
- A query that fails with a connection error is retried once. Writes are safe to retry: storing a Turn is conditional on its Turn ID, so a retry can’t store it twice.
Use Lakebase
For Databricks Lakebase, connect to the direct PostgreSQL endpoint over TLS. Don’t use Lakebase’s transaction pooler: it doesn’t support the Session-level advisory lock Fleet holds. To authenticate with per-connection Databricks OAuth credentials instead of a password, set the endpoint resource path:.env
storage.lakebase_endpoint. With OAuth enabled, the URL must include a host, a user, and sslmode=require, and must not embed a password. A migration URL must use the same TLS endpoint and database, also without a password.
Run the API server
127.0.0.1:8000 by default ([server]). An invalid --port fails with fleet: error: invalid configuration instead of falling back to the default.
fleet serve needs a reachable MLflow server. With the default local backend, start one with fleet cli or run your own on port 5001. See Observability.
Health check
GET /health returns 200 with status: "ok", the Fleet version, and an mlflow object describing the initialized MLflow destination. mlflow.ready is true once Fleet has initialized its runtime experiment.
Upgrade
- Stop Fleet.
- Pull the new release and run
uv sync --dev. - Start Fleet. It applies any new schema migrations at startup.