Prefect deployment options: which model fits your team
The host model matters less for a self-hosted Prefect server than the PostgreSQL database, the Redis and load balancer layer that multi-server setups need, and the people who will run upgrades. Prefect server uses SQLite by default and expects PostgreSQL in production, and the self-hosted documentation names PostgreSQL 14.9 or later, Redis for event messaging and a load balancer for multi-server deployments. Settle those three components and name an upgrade owner before you size any host, because they drive most of the operating effort. Confirm the exact requirements for the Prefect release line you plan to run.
Choose Kubernetes when your team already operates clusters and has the platform skills to run the Prefect server workloads, their PostgreSQL and Redis dependencies, and the ingress in front of the load balancer. In that case, scaling, restarts and rolling upgrades rely on tooling you already run, so the new work is mostly Prefect-specific configuration. Choose Docker when you want containers on hosts your team already manages with its existing monitoring and patching. Docker fits a smaller footprint owned by one team, but the restarts, backups and version pinning are scripts your team must write and maintain. Ask for those steps to be written into the scope before work starts.
Choose virtual machines when you want the fewest moving parts or when server changes must pass through an existing VM change control process. Running the server, PostgreSQL and Redis on VMs under your current patching and backup schedule keeps the change record familiar to your change board. High availability across several servers still means configuring the load balancer and failover yourself, so check that your team can own that work. Before you decide, list who owns each layer, which change window applies to each upgrade and where PostgreSQL backups are stored. The final answer depends on a written scope that names the hosts, data volumes, availability target and upgrade process.
Prefect deployment options side by side: Docker, Kubernetes and VMs
This table compares how a self-hosted Prefect server and its workers run on Docker, Kubernetes and virtual machines. Read each row as the operating work your team takes on under that model, from high availability and upgrades to skills and cost drivers. The main takeaway is that the PostgreSQL, Redis and upgrade requirements stay the same across all three, so the choice mainly changes who operates the platform layer.
| Area | Docker | Kubernetes | Virtual machines |
|---|---|---|---|
| Host architecture | Prefect server, workers and PostgreSQL run as containers on one or more Docker hosts you manage. | Prefect server and workers run as pods, with PostgreSQL, Redis and the load balancer as services you attach. | Prefect installed in a Python 3.11 or later environment on each host, run as a managed service. |
| High availability setup | Multi-server runs need PostgreSQL 14.9 or later, Redis for event messaging and a load balancer, all operated by your team. | Same requirements, with replicas and health checks handled by the cluster. Confirm how your chosen setup handles failover. | Same requirements, with failover between hosts provided by your load balancer and tooling you select. |
| Upgrade path | Pull a new image tag and recreate containers. Confirm which container images Prefect publishes in the self-hosted documentation. | Roll out new versions through your manifests or charts. Confirm which Helm charts Prefect publishes before relying on them. | Upgrade the package on each host in turn. Upgrade servers before clients, since new clients can fail against old servers. |
| Backup approach | Back up the PostgreSQL database for production. A SQLite file inside a container volume is the default, not a production choice. | Back up PostgreSQL with your cluster backup tooling and confirm the snapshots are consistent with the database. | Back up PostgreSQL and host configuration together, then test restores on a second host. |
| Sizing inputs | Concurrent flow runs, worker count, log and run-history retention and database size per Docker host. | Concurrent flow runs, worker count, retention settings and node capacity available to the Prefect pods. | Concurrent flow runs, worker count, retention settings and CPU and memory on each host. |
| Operating skills | Container images, Compose or runtime configuration, Linux networking and PostgreSQL administration. | Cluster operations, manifests or charts, secrets, ingress, storage classes and PostgreSQL administration. | Linux administration, Python environments, service management and PostgreSQL administration. |
| Cost drivers | Host count, PostgreSQL and Redis operation and the time spent maintaining images and orchestration config. | Existing cluster footprint, platform staffing for cluster upgrades and managed PostgreSQL or Redis if you use them. | Host count, OS patching across every host and hands-on upgrade time per host. |
| Cost of switching later | Deployment config is rebuilt for another model. The PostgreSQL data is the main item that carries over. | Manifests and charts are tied to the cluster, so moving to VMs means rebuilding the host layer. | Moving to containers means repackaging the environment and service definitions. The PostgreSQL data carries over. |
The components every Prefect model must run
Every self-hosted Prefect model runs the same core components, whether on Docker, Kubernetes or virtual machines. What changes is who operates each piece, how it is reached and how it is upgraded. Read the four cards in order, because the server, database, messaging and workers depend on each other.
API and UI server
The self-hosted Prefect server bundles an API, a UI and the database that records run state, logs, deployments, concurrency limits, automations and more. Every worker and user reaches this process, so where it runs sets your network paths and your upgrade order. Decide who owns the server image, how users reach the UI and how fleet versions are kept aligned. New clients can be incompatible with old servers, so confirm your upgrade sequence with your platform team before you choose a model.
Prefect server docsState database and run history
Prefect server uses SQLite by default and PostgreSQL for production, so the database is the component you must back up and restore. On Docker or Kubernetes, decide whether PostgreSQL is a managed service outside the cluster or a stateful workload you operate yourself. On VMs, decide who owns the database host, its patching and its backup schedule. Check your managed database offering against the documented minimum for multi-server setups before you commit.
Redis for event messaging
Multi-server Prefect deployments use Redis for event messaging, and event-based automations depend on that path. Decide how many API servers you plan to run, since this component only enters the design once you run more than one. On Kubernetes, Redis becomes another stateful service with its own persistence and failover choices. On Docker or VMs, place it so every server can reach it, and confirm with your security team who owns its access controls and patching.
Self-hosted Prefect docsLoad balancer and workers
Multi-server deployments place a load balancer in front of the API servers, and workers run the flows. Prefect requires Python 3.11 or later on worker hosts, so every VM template, container image or node image needs that interpreter pinned. Docker, Kubernetes and VM models differ in how workers are replaced, so decide who builds worker images and how Python upgrades reach them. Confirm health checks and timeout behavior for long-running flows with your platform team before go-live.
Where each component sits in a multi-server Prefect setup
This illustrative diagram traces traffic through a multi-server Prefect setup inside the client's trust boundary. Users reach the load balancer from outside, while workers inside the network call the server API through the same entry point. The load balancer spreads requests across two or more server nodes. Each node reads and writes run state, deployments and logs in PostgreSQL, and uses Redis for event messaging. Before go-live, confirm that every node points at the same database and Redis instances, that the load balancer health-checks each node, and that workers reach the API only through the load balancer.
Illustrative: the same connections apply whether hosts run on Docker, Kubernetes or VMs.
Why PostgreSQL and Redis set the availability plan
The availability plan for a self-hosted Prefect server is set by two stateful services that sit outside the Prefect containers or virtual machines. Prefect server bundles an API, a UI and a database that records flow and task run state, logs, deployments, concurrency limits, variables, artifacts, work pool status, events and automations. It uses SQLite by default, which suits a single evaluation server. For production, the database should be PostgreSQL. A multi-server deployment needs PostgreSQL 14.9 or later, Redis for event messaging and a load balancer in front of the API servers. If the database fails, the team loses run history, deployment definitions, concurrency settings and automation state until it returns, and the API that workers and clients call has nothing to read or write. The Prefect self-hosted documentation lists these requirements.
Choosing Docker, Kubernetes or virtual machines changes how the Prefect server processes restart and move, but the host model does not remove the need for PostgreSQL high availability. A container rescheduled onto another node reconnects to the same database, so if that database has a single primary with no standby, the service still stops when the primary is lost. The same holds on VMs: a second Prefect host behind the load balancer helps only if both hosts share a database and a Redis service that survive the loss of one node. Kubernetes restart policies and health probes keep API processes running, but the database failover path is a separate design owned by whoever runs PostgreSQL. Treat the Prefect hosts and the data tier as two availability problems with two owners, and write the recovery steps for each.
Before the team sets an availability target, confirm the failover behavior with the people who run PostgreSQL and Redis, because their answers decide what the Prefect side can promise. Ask how failover is triggered, how long clients can be unavailable during a switch, and whether a virtual endpoint or connection string points Prefect at the new primary without a manual restart. For Redis, ask whether event messages survive a restart and what happens to queued automation events if the instance is lost. Ask which PostgreSQL major version they will support given the 14.9 minimum for multi-server use. Finally, agree on restore tests that include the Prefect database, and run them on the same schedule as the failover tests, so the team learns the recovery steps before an incident.
How Docker, Kubernetes and VMs change upgrades and backups
On a Docker host, an upgrade means pulling or building a new image with a new Prefect version and recreating the containers that run the server and workers. The host operating system is a separate routine, so the image tag is the unit you change, pin and record. Backups split between any volumes on the host and the PostgreSQL database that the containers connect to.
- Image tags: Pin the server and worker images to an exact Prefect release, such as 3.8.8, so a rollback means starting the previous tag. Confirm whether the new server runs database migrations on startup and whether those migrations can be reversed.
- Single-node sequence: With one host there is no rolling order, so stop the server, take the database backup, start the new image, then restart workers. Downtime is the restart window, which the team should measure in its own environment.
- Volume snapshots: A snapshot of the host disk captures SQLite files if you use SQLite, but a production PostgreSQL database needs a backup taken through the database tooling or a storage snapshot that the database team has confirmed is consistent.
- Client order: Upgrade the server image first, then workers and flow images. The Prefect server documentation says old clients work with new servers, but new clients can fail against old servers.
Whatever the host, the database holds the state to back up and the server upgrades before clients, so before trusting a backup, restore it into a separate container set and confirm the UI loads, past flow runs appear and a scheduled run executes.
On Kubernetes, an upgrade is a rolling replacement of pods, and during the rollout old and new server replicas can run side by side. That makes API and schema compatibility a live concern for the whole rollout, not only for the moment of cutover. Node maintenance and cluster version upgrades are separate routines that also move pods, so they need their own checks. Backups cover two kinds of storage: cluster volumes and the external database.
- Replica overlap: Multi-server deployments need PostgreSQL 14.9 or later, Redis for event messaging and a load balancer, according to the self-hosted Prefect documentation. Plan the rollout so the old and new server versions can share that database during the overlap.
- Node rotation: Draining a node for patching reschedules server and worker pods. Confirm the disruption budgets so enough API replicas stay available during each drain.
- Snapshot scope: Volume snapshots and cluster backup tools capture manifests and persistent volumes, but the PostgreSQL backup is what restores run history, deployments and concurrency limits.
- Redis state: Confirm with the Prefect documentation whether anything in Redis needs restoring, or whether it only carries transient event messages that a rebuilt cluster can recreate.
- Version ordering: Roll server replicas first, then workers. Workers pinned to an older client can fail against new server fields.
Whatever the host, the database holds the state to back up and the server upgrades before clients, so before trusting a backup, restore the database and manifests into a separate namespace and confirm the UI loads, past runs appear and a worker picks up a test run.
On virtual machines, an upgrade usually changes the Prefect package inside a virtual environment or system install, and it may also change operating system packages on the same guest. Because the guest holds the whole runtime, a hypervisor snapshot captures the operating system, Python environment and configuration together. A logical database dump captures only the state, which makes it the more portable copy for restoring to a new machine or a new version.
- Package replacement: Install the new Prefect version into a new virtual environment and switch the service to it, keeping the previous environment for rollback. Python 3.11 or later must be present on the guest.
- Whole-machine snapshots: A snapshot restores the OS, Python packages and config as one unit, which helps fast rollback, but it is larger and tied to the hypervisor and guest state.
- Database dump: A logical PostgreSQL dump restores to a new VM or a new server version without carrying the old guest, which suits teams that rebuild machines instead of reverting them.
- Server group order: When several server VMs sit behind a load balancer, drain one at a time, upgrade it, return it to the pool, then move to the next. Multi-server setups also need PostgreSQL 14.9 or later and Redis.
- Config drift: Service unit files, environment files and TLS settings live outside the database, so back them up or keep them in version control and confirm what your configuration management captures.
Whatever the host, the database holds the state to back up and the server upgrades before clients, so before trusting a backup, restore both a snapshot and a dump to separate test machines and confirm the server starts, the UI loads and existing deployments still run.
Operating effort for each model: upgrades, backups, monitoring and skills
This table compares what each hosting model asks your team to run over time: upgrades, backups, monitoring, rollback, skills and on-call. Effort grows with the number of server nodes and the PostgreSQL and Redis layer, and Kubernetes mostly pays off when your team already runs a cluster. Where a detail is not documented here, confirm it with Prefect or in your own environment before you commit.
| Area | Docker | Kubernetes | Virtual machines |
|---|---|---|---|
| Upgrade path | Change the image tag in a staged copy, test against a PostgreSQL copy, then swap containers. | Roll a new server image through your release pipeline. Confirm with Prefect how database migrations run during rolling updates. | Upgrade the package in a maintenance window, then confirm with Prefect how database migrations run. |
| Client and server order | Upgrade the server first; old clients work with new servers, but new clients can fail on old ones. | Upgrade the server before workers; old clients work with new servers, but new clients can fail on old ones. | Upgrade the server before workers; old clients work with new servers, but new clients can fail on old ones. |
| Backup and restore | Back up the PostgreSQL database and the image tags in use. Include restore tests in each change window. | Use cluster backup tooling for the PostgreSQL service and its volumes. Restore tests belong in the change plan. | Dump PostgreSQL and snapshot the host on a schedule you set. Test restores on a second host before relying on them. |
| Monitoring | Container health checks, API responsiveness and database connections. Prefect's UI shows run state and work pool status. | Pod health, restarts and node pressure in your cluster stack, plus the Prefect UI for run state. | Host metrics, service status and PostgreSQL health in your existing agent, plus the Prefect UI. |
| Rollback | Redeploy the previous image tag. Database changes may not reverse with the image, so restore from backup if needed. | Roll back the deployment revision. Confirm with Prefect whether schema changes allow a downgrade. | Reinstall the previous package and restore the database snapshot taken before the upgrade. |
| Multi-server stack | Adds PostgreSQL 14.9 or later, Redis for event messaging and a load balancer in front of containers. | Same PostgreSQL 14.9 or later and Redis needs; confirm the balancing design with Prefect. | Same PostgreSQL 14.9 or later and Redis needs, with a balancer in front of the server hosts. |
| Skills needed | Container images, Compose or orchestrator basics, PostgreSQL administration and Python 3.11 or later for Prefect. | Kubernetes manifests or Helm charts, PostgreSQL and Redis operations and Python 3.11 or later. | Linux service management, PostgreSQL administration, load balancer setup and Python 3.11 or later. |
| On-call duty | Usually the team that owns the Docker hosts. Name a separate owner for the database. | Usually the cluster platform team for nodes and workloads. Name an owner for the Prefect server and database. | Usually the team that patches the host, which often also covers the database. Confirm the split. |
| Effort drivers | Pinned image tags and a shared registry keep changes small. Hand edits on hosts add effort. | Existing cluster tooling, GitOps and change control lower effort; a dedicated Prefect cluster raises it. | Configuration management and a patch calendar lower effort; hand-edited hosts raise it. |
Upgrading the Prefect server before its clients
The sequence upgrades the Prefect server first, verifies it, then moves workers and flow-running clients, with a backup and a tested rollback path at each boundary. Server-first order follows the documented compatibility direction: old clients work with new servers, while new clients can be incompatible with old servers. The result is a server, workers and flows on a known version with a tested way back.
Confirm the target release in release notes
The platform owner picks the target version from the Prefect GitHub releases page and reads its release notes before changing any node. Prefect 3.8.8 was released on October 6, 2026, after 3.8.7 on September 26, 2026, but confirm that the version you choose suits your environment. Record the server version now running, the Python and Prefect versions used by workers and flows, and any notes on database migrations or REST API changes. The step is done when the team has a written target version and an inventory of every client that talks to the server.
Back up the PostgreSQL database
The database owner takes a full backup of the PostgreSQL instance that holds Prefect server state before any server node changes. That database records flow and task run state, logs, deployments, concurrency limits, variables, work pool status and automations, so it is the record you would need to restore. Use the backup method your database team already runs, such as a logical dump or a physical backup, and confirm the backup file can be read. If your standards require it, restore the backup into a separate non-production instance. The step is done when a verified backup is stored with its timestamp and location.
Upgrade server nodes one at a time
The platform owner removes one Prefect server node from the load balancer pool, upgrades it to the target version and returns it to the pool before moving to the next node. Multi-server deployments need PostgreSQL 14.9 or later, Redis for event messaging and a load balancer, so confirm that your load balancer can drain connections and run health checks for this rolling method. Check the release notes for whether the release applies schema migrations, which node should run them, and whether mixed versions can run side by side during the rollout. The step is done when every server node reports the target version and is back in the pool.
Verify the API and UI
The platform owner checks the API and UI on each upgraded node and through the load balancer address that users and automations use. Confirm that the server reports the target version, the UI loads and shows recent flow runs, and a test deployment can be read through the API. Trigger a known test flow and confirm that events and automations fire, since Redis carries event messaging in multi-server setups. Review server logs for migration errors or repeated connection failures to PostgreSQL. The step is done when the test set passes on every node and through the load balancer, and the results are saved with the change record.
Upgrade workers and flow-running clients
The platform engineer upgrades Prefect in worker images, virtual environments and flow-running hosts once the server passes verification. Whether workers run as Docker containers, Kubernetes deployments or VM services, rebuild the image or update the package and restart the worker. This order follows the documented compatibility direction: old clients work with new servers, but new clients can be incompatible with old servers because new fields are added to the REST API. Upgrade one work pool at a time and run a short test flow on each pool. The step is done when every worker and flow environment reports the target version and a test flow completes on each pool.
Keep the previous version for rollback
The platform owner keeps the previous server image or package, the previous worker artifacts and the pre-upgrade database backup until the team agrees the upgrade is stable. Write down the rollback path for each deployment model: restoring a prior container image, redeploying a previous Kubernetes release, or reinstalling the prior package on a VM. Check the release notes before relying on a binary rollback alone, because a release that applies database migrations may require the backup to return to the earlier state. The step is done when the rollback steps have been tested once in a non-production environment and the team has agreed how long to keep the old artifacts.
Questions teams ask before choosing a Prefect host model
What drives the cost of self-hosting Prefect compared with Prefect Cloud?
Self-hosting removes the Prefect Cloud subscription but moves the spend into infrastructure and staff time. The Prefect pricing page lists the Team plan at $100 per user per month and the Starter plan at $100 per month, so a Team bill grows with each seat. A self-hosted server costs the hosts, PostgreSQL, Redis, load balancer and storage you run, plus the engineering time to install, upgrade, back up and monitor them. Some of that is one-time, such as design, build and hardening. Much of it recurs, including patching, upgrades, on-call and capacity changes. On the self-hosted side, the biggest drivers are the size of the workload (workers, flows and run volume), how many environments you operate, the retention you set for logs and run history, and whether your team already runs PostgreSQL and container clusters. Ask any quote to show the recurring run cost beside the plan price.
How much effort does each Prefect hosting model need to run?
Effort depends mainly on the host platform underneath the server and on how much of that platform your team already runs. Docker is often the smallest new surface for a team that already runs containers on hosts it manages. Kubernetes adds cluster work such as manifests or Helm charts, ingress, storage classes and secrets, so it suits teams that already operate clusters. Virtual machines give direct control over the operating system and services, but provisioning, patching and scaling are more manual. Across all three, recurring effort comes from the same places: upgrades (checking client and server compatibility first), PostgreSQL backups and restore tests, monitoring of workers and work pools, and keeping the number of environments in step. Test each model in a staging environment that matches production before you choose one.
What does a self-hosted Prefect server need from my team?
For production, the server needs a PostgreSQL database. The self-hosted Prefect documentation says SQLite is the default and PostgreSQL is the production choice. Multi-server deployments need PostgreSQL 14.9 or later, Redis for event messaging and a load balancer in front of the servers. Clients and workers need Python 3.11 or later. Your team also needs these skills:
- PostgreSQL: backups, restore tests, version upgrades and connection limits.
- Redis: deployment, persistence settings and failover.
- Load balancing and TLS termination for the API and UI.
- Container or cluster skills for the host model you choose.
Plan for these before you pick a host model, because each one changes the support load after go-live.
Can a team run self-hosted Prefect without outside help?
Yes, a team with the skills listed above can run the server without an outside party. The server is open source under Apache-2.0, so the software itself carries no license fee. The harder question is ongoing ownership: who patches PostgreSQL, tests each upgrade, rotates secrets and responds when a worker pool stops picking up runs. Teams usually choose between an in-house build, an implementation partner or a managed service. DeployOpen plans, implements, customizes, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ongoing support, upgrades and continuous testing are available as retainers. Name the handover owner on your side before any work starts.
Which Prefect server features are Cloud-only, such as SSO and RBAC?
The Prefect server concepts documentation says Prefect Cloud provides features organizations require, such as RBAC, audit logs and SSO, and that self-hosted Prefect server does not include them. The pricing page places SSO on the Team plan and object-level RBAC and multiple workspaces on Enterprise, so the cost of these controls depends on the plan you buy. Self-hosting means you must decide how to meet the same needs with your own identity provider, reverse proxy, database access controls and logging, then document that design. Ask your compliance or audit team which evidence they need for user access and admin actions before you choose the self-hosted route. Check the current feature list on the documentation page before you sign off, since the list can change.
What should I ask for in a written quote for self-hosted Prefect?
Ask for a quote that follows from a written scope, because DeployOpen does not publish a price list and a quote follows from the agreed scope. Ask the proposal to state:
- The host model, environments and components in scope, including Prefect server, PostgreSQL, Redis, the load balancer and workers.
- Which tasks are one-time (design, installation, hardening, documentation and handover) and which recur (support, upgrades, backups and testing).
- Who provides and pays for hosts, licenses and cloud or data center capacity.
- What is excluded, such as SSO integration, custom work or retesting.
- Acceptance criteria, handover owners and retainer terms for work after go-live.
Also ask for the assumptions behind the labor, so you can see which changes in scope would change the price.
How do I check Prefect client and server version compatibility before upgrading?
Upgrade the server before the clients and workers. The server documentation says old clients are compatible with new servers, but new clients can be incompatible with old servers because new fields are added to the REST API. Test that order in staging first and read the release notes for each version. Prefect 3.8.8 was released on October 6, 2026, after 3.8.7 on September 26, 2026, and the Prefect releases page shows the 2.x line still received 2.20.26 on September 2, 2026, so teams on 2.x should plan their own move. Keep a tested PostgreSQL backup before each server upgrade, and record the client and server versions in each environment so a rollback has a known target. Run one representative flow end to end after every change.
How DeployOpen scopes, deploys and supports Prefect on your infrastructure
DeployOpen is a Chainscore Labs company that plans, implements, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Prefect, that means choosing the Docker, Kubernetes or virtual machine layout with your platform team, then building it on your infrastructure. Each engagement starts from a written scope, so the hosting choice, database and support model are settled before work begins.
How we scope
- The written scope records which layout you choose: Docker, Kubernetes or virtual machines, and the reasons behind it.
- Scope covers the Prefect server database, PostgreSQL sizing inputs, Redis, load balancing and whether you need multi-server setups.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- Deploy the Prefect server API, UI and database on the chosen layout, with PostgreSQL configured for production use.
- Set up workers and work pools, secrets handling, and the network paths your flows need to reach data sources.
- Test upgrade and rollback steps in a non-production environment before the first production change.
How we hand over
- Written documentation of the deployed topology, configuration, backup and restore steps, and upgrade procedure.
- Access and admin settings reviewed so your security and compliance teams can check them against their own requirements.
- Clear list of what you own afterward, including the Prefect version and a Python 3.11 or later runtime.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, agreed separately from the initial scope.
- Upgrade order matters: older clients work with newer servers, but newer clients may be incompatible with older servers.
- Retainers can cover upgrades, backup checks and continuous security testing of the deployed Prefect setup, as agreed in writing.

