WindowsmacOSLinux

Where Does Prefect Store Profiles and Data?

Prefect keeps profiles in profiles.toml and the local database in prefect.db, both under ~/.prefect. All three desktop paths plus overrides.

Last updated

Prefect centers on a home directory, ~/.prefect by default. Profiles (server URLs, auth) live in profiles.toml there, and the self hosted run history lives in the prefect.db SQLite file beside it. One home serves the CLI, the local server and your flows.

Overrides exist at every level: PREFECT_HOME moves the directory, PREFECT_PROFILES_PATH moves the profiles file, and prefect.toml adds project settings. Check which layer you edited when a setting seems ignored. Flow run logs stream to the UI from the API, but the database below is what survives a restart.

Where Prefect stores this, by platform

Windows
%USERPROFILE%\.prefect

profiles.toml plus prefect.db SQLite. Paste %USERPROFILE%\.prefect into the Explorer bar. Override with PREFECT_HOME. Add the folder to antivirus exclusions for better flow performance.

macOS
~/.prefect

Same layout: profiles.toml, prefect.db, memo_store.toml. The ephemeral profile is active fresh after install until you create and select a real one.

Linux
~/.prefect

Identical home on Linux. Server deployments often move the database to Postgres via the connection URL setting, leaving profiles.toml as the main local file.

Frequently asked questions

How do I reset the local Prefect database?

Run prefect server database reset -y, which clears data and reapplies the schema. This destroys local run history, so export anything you need first. Cloud backed workspaces are unaffected.

Can I configure Prefect per project instead of globally?

Create a prefect.toml in the project root (needs Prefect 3.1 or newer). Project settings apply automatically in that directory, while profiles.toml keeps the environment switching.

Notice an outdated path? Let us know.