Skip to content
durable-workflowPublic

About

Language-neutral workflow orchestration server for running durable workflows with external workers over HTTP. Supports task polling, schedules, namespaces, history export, role-scoped auth, and Docker/Compose/Kubernetes deployment, with persistence backed by SQLite, MySQL, or PostgreSQL.

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

6,010 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Durable Workflow Server

Quality Gate Tests Release Docker Pulls License

Durable Workflow Server is the self-hosted, language-neutral runtime for durable workflows. It records workflow state and history, matches tasks to workers, fires timers and schedules, manages namespaces, and resumes execution after process or infrastructure restarts.

Applications connect through first-party PHP, Python, and Rust SDKs. Workers run in your application environment and can scale independently from Server. For a managed runtime, use Durable Workflow Cloud. Laravel applications can also run the engine directly in embedded mode.

Documentation | Sample App | CLI | Waterline

Run Server

PHP Server 2.11.8 is retired and contains Laravel dependencies affected by published advisories. Existing PHP installations should follow the PHP retirement and security notice for immediate exposure reduction and the supported native migration guidance.

For the 21 October 2026 critical PHP update, follow the PHP runtime security notice and verify the patched runtime in every deployed role.

The published Compose stack starts the native Server with MySQL. One-shot services prepare the schema before Server starts. The administrator service applies only the staged checkpoint DDL when MySQL requires it. Server runs its API and maintenance loop with the scoped database account. The PHP 2.x stack remains available as docker-compose.php.yml for installations that pin it. See the native takeover runbook to move an existing PHP database to native.

In a repository checkout, docker compose up -d --wait uses the same Native stack under a separate development project. Set DW_AUTH_TOKEN before starting.

curl -fsSLO https://raw.githubusercontent.com/durable-workflow/server/main/docker-compose.published.yml

export DW_AUTH_TOKEN=dev-token
docker compose -f docker-compose.published.yml up -d --wait

curl http://localhost:8080/api/health
curl http://localhost:8080/api/ready
curl -H "Authorization: Bearer $DW_AUTH_TOKEN" \
  http://localhost:8080/api/cluster/info

The file requires DW_AUTH_TOKEN and publishes the API on 127.0.0.1 only; set SERVER_BIND_ADDRESS to a protected private interface for remote access and terminate HTTPS at a reverse proxy. This development configuration uses the shared dev-token. Production deployments must set a strong DW_AUTH_TOKEN (native accepts it for every role), should add role-scoped worker, operator, and administrator tokens, and should pin the Server image by version or digest. See the self-hosting reference for SQLite, production Compose, authentication, backup, upgrade, API, and configuration guidance. For a tested recovery sequence, see the self-hosted backup and restore procedure. Readiness checks database connectivity and setup. A successful check does not verify database write capacity. See database storage recovery for full disks, tablespaces and temporary storage. See PHP database ownership checks for Rust schema refusal, database permissions and SQLite crash-recovery capacity. For terminal summaries that undercount history bytes, follow the selected-run summary repair guide.

Install the current CLI for server administration and workflow inspection:

curl -fsSL https://durable-workflow.com/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

Deploy

Deploy to Render Deploy to DigitalOcean

Both templates run one native Server instance from the published image pinned in Dockerfile.deploy. The provider terminates HTTPS and routes to port 8080. Server initializes a new PostgreSQL database on first start and keeps workflow state there across container replacements. Check /api/health for liveness and /api/ready for database readiness. Use the provider's HTTPS URL in your SDK clients and workers.

  • Render provisions a paid web service and managed PostgreSQL instance. Read the generated DW_AUTH_TOKEN in the web service's Environment tab.
  • DigitalOcean App Platform provisions a paid web service and a PostgreSQL dev database for evaluation. Set DW_AUTH_TOKEN under Environment Variables before deploying, using a random value such as the output of openssl rand -hex 32. Dev databases have no built-in backup feature. Before using it for production, convert it to managed PostgreSQL and confirm your app is a trusted source for the database.
Variable Requirement Purpose
DW_AUTH_TOKEN Required secret Shared bearer token with access to all API roles.
DB_CONNECTION Set by template pgsql selects PostgreSQL.
DB_URL Bound by provider PostgreSQL connection URL. For a new install, use an empty database and grant the Server user permission to create tables in public.
DB_SSLMODE Set by template require enforces TLS for database connections.
DW_BIND_ADDRESS Image default 0.0.0.0:8080. On Render the template also sets the platform's PORT to 8080.
DW_WORKER_TOKEN, DW_OPERATOR_TOKEN, DW_ADMIN_TOKEN Optional secrets Role-scoped bearer tokens. Use the worker token in SDK workers when configured.

Keep namespace external payload storage disabled on these templates. They use ephemeral container filesystems. On a Docker host, mount /app/database for SQLite and /app/storage if you enable native local external payload storage. For a single-host MySQL deployment, use the published Compose stack.

Before upgrading, check the release notes and back up PostgreSQL. Run docker buildx imagetools inspect durableworkflow/server:<release-tag> and compare its top-level Digest to the FROM digest in Dockerfile.deploy at the revision you want to deploy.

  • Render has a Deploy a specific commit action under Manual Deploy. Select the verified commit there.
  • DigitalOcean pulls the latest revision of the connected branch when you choose Actions → Deploy. Check that branch’s current revision before deploying.

To control when the pin changes, fork the repository, change the repository URL in your provider manifest to your fork, and deploy from that fork.

Choose an SDK

Language Guide and API reference Package
PHP php.durable-workflow.com durable-workflow/sdk
Python python.durable-workflow.com durable-workflow
Rust rust.durable-workflow.com durable-workflow

SDK clients start and inspect workflows. SDK workers register workflow and activity types, poll named task queues, execute user code, and report results to Server. Type names and portable Avro values form the cross-language contract, so a workflow in one language can dispatch activities to another.

Deployment Paths

Deployment Use it for Guide
SQLite containers Local evaluation with minimal infrastructure Official image and SQLite
Compose with MySQL and Redis Development and single-host production Compose deployment
Small cluster Multiple API nodes with external persistence Small-cluster contract
Kubernetes Native API replicas on Kubernetes, or the PHP 2.x shape for existing installs Helm chart
Active/passive regions Operator-controlled regional failover Multi-region contract

Server supports SQLite for a single-node runtime and MySQL or PostgreSQL for shared durable state. Multi-node deployments use shared Redis for queue and coordination state. The database remains authoritative for workflow history. Namespaces using external payloads in a multi-node deployment should use the built-in S3-compatible shared storage instead of node-local files.

Capabilities

  • Durable workflow and activity execution with retries, timeouts, and heartbeats
  • Signals, queries, updates, timers, schedules, and child workflows
  • Search attributes, memo, history export, and namespace retention policies
  • Worker sessions, task-queue routing, build rollout controls, and backpressure
  • Role-scoped authentication and machine-readable capability discovery
  • External payload storage for large encoded values
  • Waterline-compatible operational APIs and Prometheus metrics

Capacity

Published throughput uses DW Standard Workflow v1, a versioned one-activity workflow with fixed Avro payloads, history shape, concurrency, warmup, measurement, and qualification rules. Timer, signal, query, replay, fanout, and mixed workloads are reported separately so a generic "workflows per second" number cannot hide the workload being measured.

Reference

Optional trace context

A configured application image can persist bounded W3C context across compatible SDK workers. Enable the optional API and discover the actual capability as explained in PHP Server trace context. The guide covers nullable schema migrations, baggage controls and runtime boundaries.

Development

Use the published native Compose stack for local SDK and integration work. To build Server from a checkout, use Dockerfile.native or the pinned Rust toolchain.

Repository checks and focused test commands are documented in CONTRIBUTING.md. Bugs and feature requests belong in GitHub Issues. The native publication and alias-promotion runbook describes the separate qualification and protected release phases.

Published-image qualification runs from the release tag itself, so the runner and the producer are the same commit. The qualification subject is the tag, its commit and the published index, plus the pinned MySQL and QEMU images committed in scripts/ci/native-qualification-subject.json. V2 receipts retain each actual dependency image, the owned resource scope, body observations and verified cleanup. The four Compose cells retain engine target IDs, platform manifests and config digests distinctly, and run on amd64 hosts; their arm64 server cells use the pinned QEMU helper. These receipts do not select alias promotion or a GitHub Release.

License

Durable Workflow Server is released under the MIT License.

About

Language-neutral workflow orchestration server for running durable workflows with external workers over HTTP. Supports task polling, schedules, namespaces, history export, role-scoped auth, and Docker/Compose/Kubernetes deployment, with persistence backed by SQLite, MySQL, or PostgreSQL.

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages