Skip to main content
SQLite is fine for local use. Use PostgreSQL when you need durable, shared storage.

Prerequisites

  • A PostgreSQL database reachable from the Fleet host
  • Fleet RLM installed with uv sync --dev
  • Daytona and model credentials configured as in the quickstart

Point Fleet at PostgreSQL

Set FLEET_DATABASE_URL in .env. Fleet normalizes postgres:// and postgresql:// URLs to the postgresql+asyncpg:// driver.
.env
Apply migrations. Fleet never migrates on startup.
upgrade also accepts --database-url to override FLEET_DATABASE_URL for one run, and --env-file to load a different environment file.
Managed deployments that use the Lakebase preflight must connect as the fleet_app role with TLS (ssl=require, verify-ca, or verify-full).

Database commands

scripts/database.py provides four operations.

Move data from SQLite

import-sqlite reads both URLs from environment variables, creates a verified SQLite backup, and writes a receipt.
The backup path must not exist yet. Stop Fleet before you import.

Run the backend

Or run the ASGI app directly:
The Fleet API has no caller authentication. Fleet refuses to bind to a non-loopback host unless you pass --allow-non-loopback-bind. Only do that behind a trusted network boundary or an authenticating proxy. See Security.

Health checks

Upgrade

  1. Stop Fleet.
  2. Pull the new release and run uv sync --dev.
  3. Run uv run python scripts/database.py upgrade.
  4. Rebuild Daytona snapshots if the release changes them. See Sandbox execution.
  5. Start Fleet.
Last modified on October 9, 2026