~/projects/temporal-standalone

Temporal running at home: server, custom UI with overlays, Casdoor OIDC and the rules for running orchestration in your own lab.

Why run it at home

There is no point studying workflow orchestration without running an orchestrator. temporal-standalone came from wanting a Temporal that runs the way the cloud does (isolated namespaces, API keys) without starting one server per project in the lab. The repository is public: one docker compose up starts the server, the UI, Casdoor and PostgreSQL.

It is the kind of project that comes out of the learning system: study Temporal from the inside, then build a real environment. Running it, the real limits show up, along with bugs that only appear once the system is up and customizations that do not exist upstream. All of that becomes a skill.

The architecture

one lab serverBrowserWorker / SDKTemporal UI:8080 · overlaysCasdoor:8000 · OIDCTemporal Server:7233 · v1.31.0PostgreSQL 18:5432HTTPgRPCOIDCgRPCSQLSQL

Custom UI: submodule and overlays

The temporalio/ui repo comes in as a git submodule at ui-custom/upstream/, and the customizations live in ui-custom/overlays/ with the same folder layout. A git pull in the submodule updates upstream without touching the customizations.

upstream/overlays/nodefrontend with pnpmgobackendalpinefinal image
docker compose build temporal-ui && docker compose up -d temporal-ui

API keys

The overlays' main feature is an API key system, with three endpoints (list, create and delete at /api/v1/api-keys). Keys are JWTs signed with HS256, and the middleware tells three kinds of token apart:

MiddlewareOIDC cookieset by the server itselfOIDC bearerverified against Casdoor's JWKSAPI key bearerHS256 + JWT_SECRET

The fixed rules

Running Temporal locally has rules the agent always follows:

A server version upgrade always means a schema migration, in the right order and without skipping versions:

docker run --rm --network temporal-network \
  -e DB=postgres12 -e DB_PORT=5432 -e POSTGRES_SEEDS=postgresql \
  -e DBNAME=temporal ... \
  temporalio/admin-tools:latest \
  temporal-sql-tool update-schema -d /etc/temporal/schema/postgresql/v12/temporal/versioned

Standalone Activities

Temporal 1.31 brought Standalone Activities in public preview: running an Activity straight from the client, with no Workflow around it. It is handy for one-off scripts, maintenance and testing an Activity from the CLI without setting up a whole workflow.

The detail that only shows up when you run it: it is turned on through dynamic config, per namespace, not through gRPC. The standaloneActivities field in DescribeNamespace is computed from the config at query time.

# config/temporal/dynamicconfig/docker.yaml
activity.enableStandalone:
  - value: true
    constraints:
      namespace: "default"

Agent-readable

The whole project is documented as a skill, in the format of the Agentic Workflow Blueprint. An orchestrator classifies the task and sends it to the right workflow. Need an upgrade? It loads server-upgrade. A UI rebuild? ui-rebuild. Never the whole structure.

WorkflowWhat for
enable-featurenamespace capabilities
fix-api-keyspersistence, JWT and auth
server-upgradeupgrade and schema migration
ui-rebuildrebuild after overlay changes
namespace-opsnamespace CRUD

The skill that leaves the lab

The skill with the most potential in this stack is Temporal orchestration for agents: cron pipelines, multi-step DAGs and retries with backoff running on top of the standalone, with no improvised setTimeout. Temporal makes sure the workflow finishes, even if the worker dies halfway. With no billing and no cloud latency, the standalone is the playground: the agent deploys, tests, breaks and fixes, all locally. A real use of it is in the onchain block scanner.

References