Every team ends up with the same pile: a Python script that fetches something, another that calls a model, a third that formats the result — and a cron entry, a README, and a prayer holding them together. Windmill is the open-source answer to that pile: a code-first platform where a plain script becomes a shareable UI, an API endpoint, and a scheduled job, and where scripts chain into flows that run on a real orchestrator. It has 18,732 stars on GitHub, 1,175 forks, and 15,980 commits; version 1.885.0 shipped on November 25, 2026, and the project is currently fifth on GitHub's weekly trending list.

The pitch is specific, and it is what separates Windmill from the visual workflow tools it is usually compared with. You write code — Python, TypeScript, Go, Bash, SQL, and fifteen more languages — and Windmill reads the function signature and generates the form, the HTTP endpoint, and the CLI command for it. A flow is code too: steps, branches, loops, and approvals, all versioned and reviewable. Underneath is a Rust backend and workers pulling jobs from a Postgres queue, with about 50 ms of added latency per job. This tutorial runs the real thing from the release binary, builds a three-step AI news digest with a local model, and wires it to a schedule and a webhook — every command below was executed against a live instance.

What you'll need#

  • A Linux or macOS machine with Python 3.12 and Postgres 16 — the tutorial uses the release binary, so there is no Docker and no build step. The verification ran on a 2-core Linux VM with 6 GB of RAM; the whole stack used under 100 MB at idle.
  • Ollama with a small model — qwen3:0.6b (522 MB) for the classification step. Any OpenAI-compatible endpoint works in its place, including a hosted API key.
  • Node 20 or newer — only for the wmill CLI in Step 7.
  • About 20 minutes — most of it is the first model download and the first flow run, which takes around two minutes on a small CPU.

There is no account to create and no credit card. The Community Edition binary is free under AGPLv3, and everything in this tutorial runs on localhost.

Step 1 — Run the server#

Windmill's documented quick start is Docker Compose — three files, docker compose up -d, and the UI at http://localhost. This machine has no Docker, so this tutorial uses the other official distribution: the prebuilt server binary from the GitHub releases. The binary is the same server the container runs, and it needs exactly one thing Docker would have provided for free: a Postgres database.

Install Postgres 16, create the database, and download the matching release binary (v1.885.0, 716 MB):

sudo apt-get install -y postgresql postgresql-contrib
sudo -u postgres psql -c "CREATE USER windmill WITH PASSWORD 'windmill' SUPERUSER;"
sudo -u postgres psql -c "CREATE DATABASE windmill OWNER windmill;"
curl -sL -o windmill-amd64 \
  https://github.com/windmill-labs/windmill/releases/download/v1.885.0/windmill-amd64
chmod +x windmill-amd64

Start it in standalone mode — one process that runs the API server and a worker together:

DATABASE_URL='postgres://windmill:windmill@localhost:5432/windmill' \
  MODE=standalone \
  PYTHON_PATH=/usr/bin/python3.12 \
  UV_NATIVE_TLS=true \
  ./windmill-amd64

Two of those variables deserve an explanation, because they are the difference between a server that starts and one that fails in a confusing way. PYTHON_PATH tells Windmill's Python workers to use the system Python instead of asking uv to download one; without it, the first script deploy fails while uv tries to fetch a Python build. UV_NATIVE_TLS=true makes uv trust the system certificate store — behind a TLS-inspecting corporate proxy, uv otherwise dies with invalid peer certificate: UnknownIssuer. Both are covered in the troubleshooting section.

Verify the server is up before going further:

curl -s http://localhost:8000/api/version
# expect: CE v1.885.0
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8000/
# expect: 200

Open http://localhost:8000 in a browser and log in with the default superadmin credentials, [email protected] / changeme. Change them before exposing the instance anywhere: the first thing to do in production is to rotate that password in the superadmin settings. The rest of this tutorial drives Windmill through its REST API, so every step below is copy-pasteable from a terminal — the same calls the web UI makes.

Architecture diagram: database, Rust engine, and a laptop with a local language model chip connected inside one box
AI-generated illustration for AI Frontier Post: the self-hosted stack — Postgres holds the queue and all state, the Rust server and workers do the work, and a local model supplies the AI step.

Step 2 — Your first script: fetch the news#

A Windmill script is a plain function. Its typed arguments become the form fields of an auto-generated UI, and its return value becomes the job result. Log in through the API and create a workspace, then create a script that fetches the five top headlines from Hacker News:

TOKEN=$(curl -s -X POST http://localhost:8000/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]","password":"changeme"}')

curl -s -X POST http://localhost:8000/api/workspaces/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"id":"demo","name":"Demo"}'
# expect: "Created workspace demo"
# f/demo/fetch_hn_top — fetch the top headlines from Hacker News
import re
import urllib.request

def main(limit: int = 5):
    with urllib.request.urlopen("https://news.ycombinator.com/", timeout=20) as r:
        html = r.read().decode("utf-8", "replace")
    titles = re.findall(r'class="titleline">([^<]+)', html)
    return {"count": len(titles[:limit]), "titles": titles[:limit]}

Deploy it with the scripts API. The path is the script's address inside the workspace; f/ is the folder, demo is a subfolder, and the name follows:

curl -s -X POST http://localhost:8000/api/w/demo/scripts/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"path":"f/demo/fetch_hn_top","summary":"Fetch top HN headlines",
       "content":"import re\nimport urllib.request\n\ndef main(limit: int = 5):\n    with urllib.request.urlopen(\"https://news.ycombinator.com/\", timeout=20) as r:\n        html = r.read().decode(\"utf-8\", \"replace\")\n    titles = re.findall(r\x27class=\"titleline\">([^<]+)\x27, html)\n    return {\"count\": len(titles[:limit]), \"titles\": titles[:limit]}\n",
       "language":"python3","kind":"script","auto_parent":true}'

That inline JSON is unwieldy in a shell, so for real work, keep the script in a file and build the request with Python, or use the wmill CLI in Step 7. Either way, run it and wait for the result synchronously:

curl -s -X POST \
  http://localhost:8000/api/w/demo/jobs/run_wait_result/p/f/demo/fetch_hn_top \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"limit": 5}'

Expected output — the real headlines from the front page at the time of the run, in about 1.5 seconds:

{"count": 5, "titles": ["Euro-Office comes to your desktop with the Nextcloud Office Desktop app",
  "NP_R ≠ PAR_R", "AMD Specific Patches for Llama.cpp",
  "Holy shit holy shit holy shit holy shit: The magnitude of what's now happening",
  "Intel One Mono font"]}

Two things to notice. First, the script's limit: int = 5 argument was parsed from the function signature and exposed as a typed input — that is the mechanism that turns any script into a form. Second, the deployment is not instant: Windmill runs a lock job when a script is deployed, resolving its dependencies. Until that job succeeds, the script lists with has_deploy_errors: true and cannot run. A script with no third-party dependencies locks in seconds; check the error in the script's lock_error_logs if it ever stalls.

One honest caveat: the scraper parses Hacker News HTML with a regular expression, so it breaks if HN changes its markup. For a tutorial it is the simplest real fetch; for production, use the official Hacker News API instead.

Step 3 — Add the local LLM step#

The second script classifies each headline with a model running on the same machine. Start Ollama and pull the 0.6-billion-parameter Qwen3 — small enough to run on a CPU, honest enough to be a real classifier:

ollama serve &
ollama pull qwen3:0.6b
curl -s http://localhost:11434/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"qwen3:0.6b","messages":[{"role":"user","content":"Reply with one word: tech, science, business, or other. Headline: AMD Specific Patches for Llama.cpp"}],"temperature":0}' \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['choices'][0]['message']['content'])"

Expected output: tech, in about 10 seconds once the model is loaded. The endpoint is OpenAI-compatible, so the script below works unchanged against any OpenAI-compatible backend — swap the base URL and model name to point it at a hosted API instead.

# f/demo/classify_titles — classify headlines with a local LLM
import json
import urllib.request

def main(titles: list):
    out = []
    for title in titles:
        payload = json.dumps({
            "model": "qwen3:0.6b",
            "messages": [
                {"role": "system", "content": "Classify the headline into exactly one word: tech, science, business, or other. Reply with only that word."},
                {"role": "user", "content": title},
            ],
            "temperature": 0,
        }).encode()
        req = urllib.request.Request(
            "http://localhost:11434/v1/chat/completions",
            data=payload, headers={"Content-Type": "application/json"}, method="POST")
        with urllib.request.urlopen(req, timeout=300) as r:
            body = json.loads(r.read())
        cat = body["choices"][0]["message"]["content"].strip().lower().split()[0]
        out.append({"title": title, "category": cat})
    return out

Deploy it the same way as Step 2, then run it against the headlines from the fetch step. The full run — five headlines, five model calls — took 118 seconds on the 2-core VM, and returned:

[{"title": "NP_R ≠ PAR_R", "category": "tech"},
 {"title": "AMD Specific Patches for Llama.cpp", "category": "tech"},
 {"title": "Intel One Mono font", "category": "other"},
 {"title": "Holy shit holy shit holy shit holy shit: The magnitude of what's now happening", "category": "tech"},
 {"title": "Tell HN: Happy Thanksgiving", "category": "other"}]

The classifications are sensible, and the timing is the honest part of this tutorial: a 0.6B model on two CPU cores is a plumbing test, not a production classifier. The first cold run failed outright — the model load plus the first inference exceeded the original 120-second HTTP timeout, which is why the script above uses 300 seconds. On a laptop with more cores, or against a hosted model, the same five calls take seconds. The lesson to carry into production is that the model is a replaceable resource: the script, the flow, and the schedule do not change when you swap qwen3:0.6b for something larger.

Three-step pipeline diagram: a browser fetching headlines, a robot brain classifying them, and a formatted digest document
AI-generated illustration for AI Frontier Post: the digest flow — fetch, classify with a local model, format.

Step 4 — Chain them into a flow#

Three scripts become one workflow when a flow wires their inputs and outputs together. The third script formats the result as Markdown:

# f/demo/format_digest — format the classified headlines as Markdown
def main(items: list):
    lines = ["# HN digest"]
    for it in items:
        lines.append(f"- [{it['category']}] {it['title']}")
    return "\n".join(lines)

Create the flow. Each module runs one script; input_transforms maps the previous step's output into the next step's arguments, using results.<step-id>:

curl -s -X POST http://localhost:8000/api/w/demo/flows/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"path":"f/demo/hn_digest","summary":"HN digest: fetch, classify with local LLM, format",
  "value":{"modules":[
    {"id":"fetch","value":{"type":"script","language":"python3","path":"f/demo/fetch_hn_top",
      "input_transforms":{"limit":{"type":"static","value":5}}}},
    {"id":"classify","value":{"type":"script","language":"python3","path":"f/demo/classify_titles",
      "input_transforms":{"titles":{"type":"javascript","expr":"results.fetch.titles"}}}},
    {"id":"format","value":{"type":"script","language":"python3","path":"f/demo/format_digest",
      "input_transforms":{"items":{"type":"javascript","expr":"results.classify"}}}}
  ]}}'
# expect: 201

Run it — asynchronously this time. The flow takes about two minutes end to end, and the synchronous wait endpoint cancels the job if your HTTP connection breaks first (see Troubleshooting). Start it, then poll the completed-jobs list:

JOB=$(curl -s -X POST http://localhost:8000/api/w/demo/jobs/run/f/f/demo/hn_digest \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{}' | tr -d '"')
echo "job: $JOB"

curl -s "http://localhost:8000/api/w/demo/jobs/completed/list?per_page=5" \
  -H "Authorization: Bearer $TOKEN" | python3 -c "
import json,sys
for j in json.load(sys.stdin):
    print(j['id'], j.get('script_path'), 'success=', j['success'], 'duration_ms=', j.get('duration_ms'))"

Expected: the flow job completes with success: true in about 117 seconds. Fetch its final result — the output of the format step:

curl -s http://localhost:8000/api/w/demo/jobs/result_by_id/$JOB/format \
  -H "Authorization: Bearer $TOKEN"
# HN digest
- [tech] NP_R ≠ PAR_R
- [tech] AMD Specific Patches for Llama.cpp
- [other] Intel One Mono font
- [tech] Holy shit holy shit holy shit holy shit: The magnitude of what’s now happening
- [other] Tell HN: Happy Thanksgiving

That is the whole point of the platform in one result: three plain functions, composed by data flow, executed by an orchestrator that logs every step, retries failures, and keeps the history of every run. The same flow gains branches, loops, approvals, and error handlers without changing the scripts — those are flow-level concepts, configured in the editor or in the flow JSON.

Step 5 — Schedule it#

A flow that only runs when you trigger it is a demo; a schedule makes it infrastructure. Create one that runs the digest every hour:

curl -s -X POST http://localhost:8000/api/w/demo/schedules/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"path":"f/demo/hn_digest_hourly","schedule":"0 0 * * * *","timezone":"UTC",
       "script_path":"f/demo/hn_digest","is_flow":true,"args":{},"enabled":true}'

The one detail that will bite you: Windmill cron expressions have six fields and start with seconds — sec min hour day-of-month month day-of-week. The five-field crontab syntax is rejected with a clear error telling you to prepend a seconds field, so 0 0 * * * * means "at second 0, minute 0, every hour." Verify it landed:

curl -s http://localhost:8000/api/w/demo/schedules/list \
  -H "Authorization: Bearer $TOKEN"

Expected: one entry, f/demo/hn_digest_hourly, schedule 0 0 * * * *, timezone UTC, enabled: true, pointing at the flow. From here the digest runs itself once an hour until you disable it — no cron daemon, no server to keep awake, no wrapper script.

Step 6 — Trigger it from anywhere#

The same run endpoint is the flow's webhook. Any system that can POST JSON can trigger the digest on demand — a GitHub Action, another service, a button in an internal app:

curl -s -X POST http://localhost:8000/api/w/demo/jobs/run/f/f/demo/hn_digest \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{}'
# expect: 201 and a job id

In production, do not use the admin login token for this. Create a dedicated token for the integration (user settings → tokens) with access to just the workspace it needs, and pass it as the Bearer token. Windmill also supports native HTTP routes that expose a flow at a clean URL, and triggers from Kafka, WebSockets, and email — the run endpoint is the simplest webhook and the one every other trigger is built on.

Step 7 — Develop locally with the wmill CLI#

Editing scripts in a browser is fine for a first draft; for real work you want your editor, your tests, and your Git history. The wmill CLI syncs a workspace to a local folder of plain files. Install it (Node 20 or newer) and connect it to the instance:

npm install -g windmill-cli
wmill --version
# expect: CLI version: 1.885.0

wmill workspace add demo http://localhost:8000 --token "$TOKEN"
# expect: Added workspace demo for demo on http://localhost:8000/

List what is on the server, then pull it down:

wmill script list
wmill flow list
wmill sync pull

Expected: script list shows the three scripts and flow list shows the flow, in tables. sync pull downloads the whole workspace — scripts as .py files with a .script.yaml and a lock file each, flows as flow.yaml — and then asks for confirmation before writing anything to disk. Edit locally, then wmill sync push deploys. wmill init goes one step further and generates AGENTS.md and skill files so Claude Code or Cursor can work in the synced folder with full context.

One thing the CLI also gives you: the version check. wmill --version prints both the CLI version and the backend version, and warns if they drift apart — worth running after every server upgrade, since the CLI and the server release together.

When to use this vs alternatives#

ToolBest whenWatch out for
WindmillYour automations are code, you want them versioned and reviewed, and one platform should cover scripts, flows, schedules, and internal appsYou operate the server (or pay for Cloud); the AI builder needs an LLM key of your own
n8nThe team building automations is not writing code, and the workflow is mostly connecting SaaS appsComplex logic in a visual canvas gets hard to review; AI steps are nodes, not code you own
Airflow / Prefect / TemporalYou run large data pipelines or durable, long-lived workflows with strict orchestration needsHeavier to operate; no built-in UI generation from scripts, no app builder
RetoolThe deliverable is an internal dashboard or admin tool, and the logic is mostly CRUDNot a workflow engine; scheduled jobs and multi-step agents are not its job
Cron + scripts on a serverOne job, one machine, no audienceNo UI, no history, no retries, no permissions — the pile this tutorial replaces

The honest summary: if the people building the automation write code, Windmill is the smallest thing that does the whole job. If they do not write code, n8n's canvas is the better tool — and Windmill's own AI sessions, which let business users build in the browser with a review step before anything deploys, are the bridge between the two.

Troubleshooting#

  • Script shows has_deploy_errors: true and will not run. The deploy-time lock job failed. Read the script's lock_error_logs via the API — in this tutorial's sandbox the cause was uv failing to download Python behind a TLS-inspecting proxy. The fixes, in order: set PYTHON_PATH to the system Python when starting the server, set UV_NATIVE_TLS=true, or pre-install the Python version with uv python install 3.13 so no download is needed.
  • run_wait_result cancels a long job. The synchronous wait holds an HTTP connection open; if it breaks — including on a client timeout — Windmill cancels the job with reason http connection broke. For anything that runs longer than a couple of minutes, start the job asynchronously with /jobs/run/f/… or /jobs/run/p/… and poll /jobs/completed/list.
  • Schedule rejected: "Windmill cron expressions have 6 fields". Prepend a seconds field. Hourly is 0 0 * * * *, not 0 * * * *.
  • First LLM call times out. A cold model load on a small CPU can take a minute or more before the first token. Give the HTTP call a generous timeout (300 seconds in the script above) and expect the first run of the day to be slow; later calls reuse the loaded model.
  • wmill sync pull seems to hang. It is waiting at an interactive confirmation prompt listing the changes it will write. Answer it, or look for a non-interactive flag in wmill sync pull --help for scripted use.
  • Server will not start: database connection timeout. Check Postgres is actually running (pg_lsclusters) and that DATABASE_URL points at a database the user owns. The server runs migrations on first boot, so a fresh database takes a few seconds longer.

The takeaway#

You now have a self-hosted automation platform that treats your code as the source of truth: three scripts, one flow, one schedule, one webhook, and a CLI that keeps it all in Git. The digest in this tutorial is deliberately small — the same pattern scales to the jobs Windmill is actually bought for: nightly ETL that writes to a data table, an approval flow where a human signs off before a deploy, or an agent loop where each step calls a model and the next step acts on the result.

The habits to keep: pin the Python version the workers use, keep secrets out of scripts (Windmill variables and resources exist for exactly that), run long jobs asynchronously, and remember that the cron has six fields. Everything else — the queue, the retries, the UI, the history — is the platform's job now, and that is the whole point.