tutorial

How to Deploy Temporal Self-Hosted on a Single Server in 2026

A step-by-step tutorial for self-hosting the open-source Temporal Server on a single Linux server using Docker Compose. Covers cluster bring-up, namespace registration, worker deployment, security hardening, and scaling caveats. Suitable for development environments and low-volume production workloads up to approximately 100 workflow executions per second.

Overview

Temporal is a durable workflow engine that orchestrates long-running, fault-tolerant business processes. While Temporal Cloud provides a fully managed offering, many teams prefer to self-host the open-source Temporal Server for cost control, data residency, or compliance reasons. This tutorial walks through deploying Temporal on a single Linux server using Docker Compose, suitable for development environments and small production workloads.

Prerequisites

  • A Linux server with at least 4 GB RAM and 2 vCPU (Ubuntu 22.04 LTS recommended)
  • Docker Engine 24.0+ and Docker Compose v2 installed
  • A non-root user with sudo and Docker group membership
  • Inbound firewall rules permitting access on port 7233 (gRPC) and 8080 (Web UI), restricted to trusted IP ranges

Architecture

A minimal self-hosted Temporal stack consists of four containers:

  1. temporal — The Temporal Server (history, matching, frontend, worker services bundled in auto-setup mode)
  2. postgresql — Persistence backend for workflow state (alternative: MySQL or Cassandra)
  3. temporal-admin-tools — tctl and temporal CLI utilities
  4. temporal-ui — Web UI for inspecting workflow executions

Step 1: Create the docker-compose.yml

Create a directory /opt/temporal and inside it a docker-compose.yml:

version: "3.5"
services:
  postgresql:
    image: postgres:15
    environment:
      POSTGRES_PASSWORD: temporal
      POSTGRES_USER: temporal
    volumes:
      - temporal-pg:/var/lib/postgresql/data
    restart: unless-stopped

  temporal:
    image: temporalio/auto-setup:1.24
    environment:
      DB: postgres12
      DB_PORT: 5432
      POSTGRES_USER: temporal
      POSTGRES_PWD: temporal
      POSTGRES_SEEDS: postgresql
    depends_on:
      - postgresql
    ports:
      - "7233:7233"
    restart: unless-stopped

  temporal-admin-tools:
    image: temporalio/admin-tools:1.24
    depends_on:
      - temporal
    stdin_open: true
    tty: true

  temporal-ui:
    image: temporalio/ui:2.27.0
    environment:
      TEMPORAL_ADDRESS: temporal:7233
      TEMPORAL_CORS_ORIGINS: http://localhost:3000
    depends_on:
      - temporal
    ports:
      - "8080:8080"
    restart: unless-stopped

volumes:
  temporal-pg:

Pin image tags rather than using latest so that future restarts do not silently upgrade the cluster.

Step 2: Start the Cluster

cd /opt/temporal
docker compose up -d
docker compose logs -f temporal

Wait until log output stabilises with messages such as Frontend service started and no further errors. Initial schema setup typically takes 30-60 seconds.

Step 3: Verify the Cluster

From the host:

docker compose exec temporal-admin-tools temporal operator cluster health

A healthy cluster returns SERVING. Open http://<server-ip>:8080 in a browser to confirm the Web UI loads. Restrict this port to a VPN or office IP range; the UI ships without authentication by default.

Step 4: Register a Namespace

Each application runs inside a namespace. Create one for the first application:

docker compose exec temporal-admin-tools \
  temporal operator namespace create --namespace=default --retention=7d

Retention controls how long completed workflow histories are kept. Seven days is appropriate for most non-regulated workloads.

Step 5: Deploy a Worker

Workers are application processes that poll Temporal for tasks. They run alongside the application code in any supported SDK (Go, Java, TypeScript, Python, .NET, PHP). A minimal Python worker:

from temporalio.client import Client
from temporalio.worker import Worker
import asyncio

async def main():
    client = await Client.connect("temporal:7233", namespace="default")
    worker = Worker(client, task_queue="my-task-queue", workflows=[], activities=[])
    await worker.run()

asyncio.run(main())

Run the worker as a separate container or systemd unit. Workers connect outbound to port 7233; they do not need to be exposed externally.

Security Considerations

  • Authentication: The default Temporal Server has no auth. For production, configure mTLS using the --tls-cert-path and --tls-key-path flags or front the gRPC port with an authenticating proxy.
  • Web UI: The UI is unauthenticated by default. Restrict access via VPN, place behind an authenticating reverse proxy (Caddy with basic auth, Cloudflare Access), or build a custom OIDC integration.
  • Database backups: Temporal stores all workflow state in PostgreSQL. Daily pg_dump backups (or WAL archiving) are essential; losing the database loses all workflow history.
  • Encryption: Use the data converter pattern in the SDK to encrypt sensitive payloads before they reach the server.

Scaling Caveats

A single-server deployment is suitable for development and workloads under approximately 100 workflow executions per second. Production deployments at higher throughput should:

  • Run separate frontend, history, matching, and worker services rather than the bundled auto-setup image
  • Use a managed PostgreSQL cluster (RDS, Cloud SQL) or migrate to Cassandra for horizontal write scaling
  • Place workers in a separate cluster from the Temporal Server cluster
  • Monitor service_pending_requests, persistence_latency, and workflow_task_schedule_to_start_latency Prometheus metrics

Common Errors

  • connection refused on port 7233 — server not yet ready or DB schema setup still running
  • namespace not found — register the namespace before connecting workers
  • task queue not configured — workers must be running and polling the same task queue the workflow targets

Operating Cost

A self-hosted Temporal cluster on a single Hetzner CCX13 (4 vCPU, 16 GB RAM, approximately €15/month as of 2026) handles low-volume production workloads. Compared to Temporal Cloud (starting at $200/month minimum), self-hosting is cheaper at small scale; at high scale the operational overhead typically outweighs savings.

Editor's Note: We deployed this stack at ShadowGen for an internal automation platform handling roughly 8,000 workflow executions per day. Hardware: a single Hetzner CCX23 (8 vCPU, 32 GB RAM) at approximately €30/month. Total deployment time: 2 hours including TLS configuration via a Caddy reverse proxy. The biggest gotcha was DB backup discipline — the first month we ran without WAL archiving and a single docker compose down -v would have wiped 30 days of workflow history. Since adding pgBackRest with hourly archives, recovery testing has been clean. Caveat: at this scale the operational cost (monitoring, upgrades, schema migrations during minor version bumps) is roughly 4-6 engineer-hours per month, which exceeds the licence savings versus Temporal Cloud Starter for some teams.

Written & reviewed by Rafal Fila · Last updated:

Tools Mentioned

Related Guides

comparison

Moxo vs Lindy in 2026: Who Presses Approve When the Agent Asks

Lindy, founded in 2023, sells an AI teammate that lives in Slack and in each person's inbox; Moxo, whose predecessor Moxtra was co-founded in 2012, runs multi-party processes where approvals are steps only a person can close. Moxo wins three rounds to two: who closes the step, work across companies and the record. Lindy wins reach and testing. Vendor pages and docs read 28 September 2026.

comparison

Moxo vs Kissflow in 2026: What an Outside Approver Costs, and What the Record Proves

Moxo and Kissflow both sell approvals to people who do not write code, and each wins one round outright: Moxo's Web and Headless SDKs run the approval inside the buyer's own product, under the buyer's own sign-in. Kissflow's portal audit log stamps every event with an actor, a device and an IP, where Moxo publishes no field list. Both answers are quoted, not priced, and both meters punish a one-step request sent to hundreds of clients. Cost, the decision record, rejection routes, AI metering and governance, verified 14 to 23 September 2026.

comparison

Moxo vs Camunda 8 in 2026: BPMN User Tasks for Staff, Step Types for Outsiders

Camunda 8 can fix a process under cases already running, since active instances migrate onto a corrected definition and, for Camunda user tasks, "a migrated active user task remains assigned to the same user". Moxo keeps the shared queue that Camunda's Tasklist V2 stops evaluating, with desks that are "a shared inbox that multiple users can pick work from". Those are the two knockouts in a fight Moxo takes three rounds to two, with one section left unscored. Portability, AI review gates and a published price decide the rest, verified 14 to 23 September 2026.

Related Rankings

Best Human-in-the-Loop Automation Platforms 2026

Eight platforms are ranked here on a single mechanism: how a person enters an automated path, and what the system can prove afterward about the decision they made. Moxo scores 7.7 and ranks first; Camunda 8 scores 7.2, Microsoft Power Automate 7.1, Pega 6.9, n8n 6.7, Zapier 5.9, Kissflow 5.8 and ServiceNow 4.8, scored 22 September 2026 on the five weighted criteria. Those criteria cover the step type, the approver's account or licence, the routes available on a rejection, the audit record, and the meter that charges for the decision, and none of them can tell a review from a rubber stamp, so the methodology adds a check readers can run on any product in a few minutes: whether the decision record tells a considered approval from an instant one. Every figure was read from a vendor-owned surface and carries its own date.

Best Automation Platforms for AI Orchestration 2026

This ranking answers one question: how many real business applications can an AI agent act on out of the box? It evaluates nine platforms as of August 2026 on the reach they give an agent, not on the workflow logic they can express. That boundary is deliberate, because two neighbouring pages on this site answer different questions. Best Process Orchestration Platforms 2026 scores multi-step process control, error handling and state management. Best AI Agent Platforms 2026 scores building and hosting the agent itself. This page scores the layer between them: the connective tissue that lets an agent already built elsewhere reach the applications a business actually runs on. A platform that leads one of those pages can place low here, and two of them do. Scores derive from application and action catalogue counts, the exposure model each platform uses to publish those catalogues to an agent, setup effort, failure handling and cost per agent action. Every figure was retrieved from a vendor-owned surface on 11 August 2026 unless an earlier date is stated against it.

Common Questions

Can you automate a platform with no API using Zapier?

Not as a proper Zapier app. Zapier's help centre, updated 29 May 2026, says a private app can be built "for any service with a public API", and its fallbacks for a missing app are email parsing, RSS, webhooks, asking Zapier to add the app, or using a different app. Those let a no-API platform tell a Zap that something happened; none of them lets a Zap act inside the platform. The Zapier Agents Chrome extension can "run actions" on a page open in your own browser (help article updated 27 April 2026), but that is hands-on help, not a reusable Zap step.

How does Moxo keep humans in control when AI agents run a workflow?

Moxo keeps people on the decisions by design: approvals and other human steps are ones its product page says "only a person can close", and AI agents can fill preparer, advisor or reviewer slots around them (both read 15 September 2026). The checks on AI output are opt-in, though. In synthetic AutomationAtlas tests that day, an AI extract step's "Human review" and "Supervisor Agent" switches were both off by default, and the builder accepted the same role as a form's submitter and its approver.

How much does Moxo cost in 2026?

Moxo's only published price is Team: $5,000 a year, billed annually with no monthly option, for 100 flows and $100 of AI a year with unlimited seats (moxo.com/pricing, 28 September 2026). Scale (500 flows and $500 of AI a year) and Enterprise are custom quotes. There is no free plan, no published overage rate and no stated trial length, and the dollar AI allowance has no published conversion to the credits Moxo's product logs.

What is Moxo?

Moxo AI (app.moxo.com) is a process orchestration platform from Moxo, formerly Moxtra, for work where several parties, approvals and documents meet. You build templates of human steps, AI steps and automations, each run is a Flow with its own data and status, and outsiders act through account-free Magic Links. Its only published price is Team, and the AI agents start on the custom-quoted Scale plan (moxo.com/pricing, 15 September 2026). It is not Moxo Classic, the older app.