Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Pr
Self-host Prefect
updated Oct 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Oct 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
A Python workflow orchestration platform: decorate ordinary functions as flows and tasks, and the server tracks every run, schedules deployments, retries failures and shows state, logs and schedules in a web dashboard. Apache-2.0; `prefect server start` runs the API and UI in one container with SQLite by default, and PostgreSQL for production.
Runs on a VPS from $6/mo (Kamatera 2GB, 2 GB RAM) · prices checked Sep 2026
Our recommendation
Pick Prefect when the automation you want is code you already write in Python: scheduled data jobs, pipelines and glue scripts that need retries, logs and a place to see what failed. The server stores run state and schedules, serves the dashboard and the API; your flows run in separate workers that poll work pools, so the code stays in your repositories and never needs to be pasted into a web editor. It is Apache-2.0, and a hosted Prefect Cloud exists if you would rather not run the server. Our snippet is the docs' single-container server command in Compose form, with the image pinned to a release tag and a volume for the SQLite database. We did not find an upstream RAM minimum, so our 1 GB floor is an estimate. The catalog's n8n and Activepieces are visual builders and Kestra is YAML-first; Prefect is the one for people who want a Python decorator, not a canvas.
What you need
Any VPS with at least 1024 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Prefect — Python workflow orchestration server with a run dashboard — based on the "Run the Prefect server in Docker" docs, pinned to 3.9.0cat > docker-compose.yml <<'EOF'services: prefect: image: prefecthq/prefect:3.9.0-python3.12 restart: unless-stopped command: prefect server start --host 0.0.0.0 environment: PREFECT_UI_API_URL: http://SERVER_IP:4200/api volumes: - prefect_data:/root/.prefect ports: - 4200:4200volumes: prefect_data:EOFdocker compose up -dtimeout 180 bash -c 'until curl -fsS http://localhost:4200/api/health >/dev/null; do sleep 5; done'# → http://SERVER_IP:4200 — set PREFECT_API_URL=http://SERVER_IP:4200/api wherever your flows run
Prefect's server docs and settings reference flag these before you rely on the install:
non-negotiableThe container is the server only, with no worker in it. To run anything you point a worker at a work pool (the prefect CLI on a machine that can run your code) and set PREFECT_API_URL to http://SERVER_IP:4200/api there; deployments and their schedules are created from your own code.
non-negotiableThe default database is SQLite, which the docs call the recommended choice for lightweight single-server deployments; PostgreSQL 14.9 or newer, with the pg_trgm extension enabled, is what they recommend for production, high availability and multiple servers. Our prefect_data volume is mounted at /root/.prefect, where the server keeps its state.
non-negotiableThe dashboard calls the API from your browser, so PREFECT_UI_API_URL must be the address you type in the browser; our compose sets it to the SERVER_IP placeholder. Nothing signs you in by default: the settings reference lists PREFECT_SERVER_API_AUTH_STRING for basic authentication, and the port is plain HTTP, so keep it behind a firewall or a TLS reverse proxy.
non-negotiableThe docs' command uses the moving prefecthq/prefect:3-latest tag; the image is also published per Python version (-python3.12, -python3.13, -python3.14, plus conda and Kubernetes variants), and we pin an exact release with Python 3.12. Upgrading is a tag bump plus docker compose up -d; read the release notes first.