After installing Prefect, you have a Python SDK client that can communicate with either Prefect Cloud or a self-hosted Prefect server, backed by a database and a UI. Prefect Cloud and self-hosted Prefect server share a common set of capabilities. Prefect Cloud provides the additional features required by organizations such as RBAC, Audit logs, and SSO. See the Prefect Cloud overview for more information.Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
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_trgmextension, 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