We recommend using the same version of
prefect
for the client and server.
Old clients are compatible with new servers, but new clients can be incompatible with old servers as new fields are added to the REST API.
The server will typically return a 422 status code if any issues occur.The Prefect database
The Prefect database persists data to track the state of your flow runs and related Prefect concepts, including:- Flow run and task run state
- Run history
- Logs
- Deployments
- Flow and task run concurrency limits
- Storage blocks for flow and task results
- Variables
- Artifacts
- Work pool status
- Events
- Automations
- SQLite (default): Recommended for lightweight, single-server deployments. SQLite requires essentially no setup.
- PostgreSQL: Best for production use, high availability, and multi-server deployments. Requires PostgreSQL 14.9 or higher. Prefect uses the
pg_trgm
extension, so it must be installed and enabled.
Database migrations
Prefect uses Alembic to manage database migrations. Alembic is a database migration tool that provides a framework for generating and applying schema changes to a database. When you start a Prefect server, it automatically runs any necessary migrations. You can also manage migrations manually using the CLI.How to guides
- Self-host via CLI - Start a local server instance
- Self-host via Docker - Run server in containers
- Scale self-hosted Prefect - Deploy multiple server instances for high availability