Prefect appeals to Python teams because ordinary code becomes an orchestrated workflow with little ceremony: no special DAG files, dynamic task creation, and easy local testing. Self-hosting the open-source server on a VPS keeps your data and runs on your infrastructure; Prefect Cloud is the managed option with extra features such as user management and audit capabilities.
Key Concepts
- Flows: Python functions decorated with
@flow, the unit of orchestration. - Tasks: functions decorated with
@taskinside flows, with their own retries and caching. - Deployments: a flow plus configuration (schedule, parameters, infrastructure) registered with the server.
- Work pools and workers: pools describe where runs execute; workers poll pools and start runs.
- Blocks: stored configuration and credentials for external systems.
Running the Server
The server provides the API and UI (port 4200 by default with prefect server start). For production:
- Use PostgreSQL as the database by setting the database connection URL; SQLite is the default and suits only light use.
- Run the server as a systemd service or container with automatic restarts.
- Set the API URL that clients and workers use, and the UI's API URL when behind a proxy.
- Put Nginx in front for HTTPS and add authentication (basic auth or an authenticating proxy with SSO), keeping it reachable only from your team and workers where possible.
Check the documentation for the Prefect version you install; Prefect 3 changed several APIs compared with Prefect 2.
Work Pools and Workers
Create a process work pool for flows that run directly on a server, or Docker or Kubernetes pools for isolated runs. Start workers as supervised services on the VPS (or other servers) with the dependencies your flows need. Deployments point at a pool; workers pick up scheduled runs. Separate pools for heavy and light flows prevent a large job from blocking quick ones, and pool concurrency limits protect the server.
Deployments and Code
Keep flow code in Git. Deployments can pull code from a repository at run time, or use a Docker image built in CI. Pin dependencies so runs are reproducible, and test flows locally before deploying, since flows are plain Python functions.
Retries, Timeouts and Caching
- Set retries and retry delays on tasks that call unreliable services.
- Set timeouts on flows and tasks so hung runs fail visibly.
- Use task caching to skip expensive steps when inputs have not changed.
- Make tasks idempotent so reruns are safe.
- Use concurrency limits (global or by tag) to protect databases and APIs.
Secrets
Store credentials in Secret blocks or provide them as environment variables on workers. The self-hosted server stores block data in its database, so protect the database and its backups accordingly. Do not commit credentials to flow code.
Security
The open-source server's API can create and run deployments, so anyone who reaches it can trigger code on your workers. Keep it on a private network or behind authentication, use HTTPS, restrict worker servers' outbound access to what flows need, and keep Prefect and dependencies updated.
Monitoring
The UI shows flow runs, task states and logs. Configure automations or notifications to alert on failed or late flow runs, monitor worker processes and server health externally, and track database size, since run history grows over time. Clean old runs periodically (see our monitoring guide).
Sizing
| Setup | Suggested plan |
|---|---|
| Server, PostgreSQL and a worker for light flows | 2 vCores / 8 GB |
| Data processing flows with pandas or similar | 4 vCores / 16 GB worker |
| Many parallel or heavy flows | Server on one VPS, workers on 8 vCore / 32 GB servers |
Prefect, Airflow or Temporal?
Prefect suits Python teams who want dynamic, code-first pipelines with little boilerplate. Airflow offers maturity and a large provider ecosystem (see our Airflow guide). Temporal targets long-running business processes with strong durability (see our Temporal guide).
Example: Marketing Data Sync
A marketing team runs Prefect server with PostgreSQL on a 2 vCore / 8 GB VPS, reachable only over VPN. A process work pool runs hourly flows that pull ad platform data, clean it with pandas and load it into an analytics database. Tasks retry three times with backoff, a concurrency limit protects the database, and failed runs notify the team chat.
Common Mistakes
- Exposing the server API publicly without authentication.
- SQLite for a busy server.
- Workers missing dependencies that flows need.
- No timeouts, leaving hung runs.
- Credentials inside flow code.
In Short
Run Prefect server with PostgreSQL behind HTTPS and authentication, execute deployments through work pools and supervised workers, add retries, timeouts and concurrency limits, keep secrets out of code and monitor failures.
Testing Flows
Because flows and tasks are ordinary Python functions, you can unit test the logic directly and run whole flows locally against test data before deploying. Add a CI step that imports every flow, runs fast tests and builds the deployment image, so broken dependencies are caught before the scheduled run fails at night. Keep a staging work pool that runs new versions against a copy of real data before switching production deployments.
Upgrades and Maintenance
Upgrade the server and workers together to compatible versions, after reading the release notes, and back up the PostgreSQL database first. Database migrations run when the new server starts, so take a snapshot beforehand. Periodically delete old flow runs and logs to keep the database small and the UI responsive.
SkyRainCloud Plans for This Workload
Prefect server with PostgreSQL is light: 2 vCores / 8 GB runs the server and a worker for many flows. Data-heavy flows decide the worker size; 4–8 vCores for heavier Python processing.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.