This message was deleted.
# ask-marvin
s
This message was deleted.
m
thought for 191.1 seconds
Short answer: No. Elasticsearch isn’t supported as a database backend for Prefect. Prefect requires a relational database; in 3.x only PostgreSQL and SQLite are supported. What you can use: - PostgreSQL (recommended for production/HA). Uses the async driver
postgresql+asyncpg
. The
pg_trgm
extension is recommended for search features. - SQLite (good for local dev/testing or single-process setups). Uses
sqlite+aiosqlite
. Not suitable for multi-process/HA deployments. Not supported: Elasticsearch, MySQL/MariaDB, or other databases. How to configure (examples):
Copy code
# PostgreSQL (production)
PREFECT_API_DATABASE_CONNECTION_URL=<postgresql+asyncpg://USER:PASS@HOST:5432/prefect>

# SQLite (development)
PREFECT_API_DATABASE_CONNECTION_URL=sqlite+aiosqlite:////path/to/prefect.db
Docs and references: - Server overview and production guidance: Prefect Server concepts - Database settings (drivers and env vars): Settings reference - Database configuration classes: Database configurations API - Self-hosted (Docker Compose example with PostgreSQL): Self-hosted with Docker Compose If you’re on PostgreSQL already, you’re on the right track. If you need help wiring the connection URL or enabling
pg_trgm
, let me know your environment and I can provide exact steps.