Railway

Deploy Temporal Production

Self-hosted Temporal cluster with PostgreSQL and a protected Web UI.

Deploy Temporal Production

Setup & Access

temporal-ui-auth

caddy:2.11.4-alpine

Just deployed

Just deployed

API & Console

Just deployed

temporal-frontend

temporalio/server:1.31.2

Just deployed

Persistence

Just deployed

/var/lib/postgresql/data

Temporal Core

Just deployed

temporal-system-worker

temporalio/server:1.31.2

Just deployed

temporal-matching

temporalio/server:1.31.2

Just deployed

temporal-history

temporalio/server:1.31.2

Just deployed

Deploy and Host Temporal Production on Railway

Temporal Production is a self-hosted Temporal cluster for running durable, fault-tolerant applications on Railway. It preserves Workflow state, timers, retries, and event histories through failures and restarts. The template includes independently scalable Temporal services, PostgreSQL persistence, automatic schema initialization, Namespace creation, health checks, and an authenticated Web UI.

About Hosting Temporal Production

Hosting Temporal Production requires multiple coordinated services rather than a single development server. This template deploys the Temporal Frontend, History, Matching, and System Worker roles as independent Railway services connected through private networking. PostgreSQL provides durable persistence for Workflow state, event history, Namespace metadata, and Visibility records. Dedicated setup services initialize and upgrade the required database schemas and create the default Namespace. A private Temporal Web UI is exposed through a Basic Auth-protected gateway. Application-specific Workers are deployed separately and connect to the private Frontend endpoint. Operators remain responsible for backups, monitoring, resource sizing, retention policies, and controlled upgrades.

Common Use Cases

  • Orchestrate durable AI, UGC, image, audio, and video-generation pipelines that may run for minutes or hours.
  • Coordinate long-running business processes such as approvals, payments, onboarding, fulfillment, and data synchronization.
  • Run reliable background jobs, schedules, retries, timeout handling, and multi-service Workflows without losing progress after failures.

Dependencies for Temporal Production Hosting

  • PostgreSQL with persistent storage for Workflow state, event history, Namespace metadata, and Visibility records. PostgreSQL is included and configured by this template.
  • Application Workers created with a supported Temporal SDK. Workers contain your application-specific Workflows and Activities and must be deployed separately.
  • Railway private networking for communication between Temporal services, PostgreSQL, the Web UI, and application Workers.

Implementation Details

The template deploys the following services:

  • temporal-db: PostgreSQL persistence and advanced Visibility storage.
  • temporal-schema: Creates and upgrades the Temporal database schemas.
  • temporal-frontend: Private gRPC endpoint for SDK clients, Workers, CLI tools, and the Web UI.
  • temporal-history: Maintains Workflow state, event histories, timers, and state transitions.
  • temporal-matching: Routes Workflow, Activity, and Nexus tasks to application Workers.
  • temporal-system-worker: Runs Temporal internal system Workflows and maintenance tasks.
  • temporal-bootstrap: Waits for cluster readiness and creates the default Namespace.
  • temporal-ui: Provides the Temporal Web UI for inspecting Workflows, schedules, failures, and event histories.
  • temporal-ui-auth: Protects the Web UI with HTTP Basic Authentication.

Application Workers deployed in the same Railway project should use the following configuration:

TEMPORAL_ADDRESS=${{temporal-frontend.RAILWAY_PRIVATE_DOMAIN}}:7233

TEMPORAL_NAMESPACE=default

The Temporal Frontend remains private by default. Only the authenticated Web UI gateway requires a public Railway domain.

The template automatically generates database and Web UI passwords, initializes the persistence and Visibility schemas, creates the configured default Namespace, and configures deployment health checks.

Before running critical production workloads, configure PostgreSQL backups, monitoring and alerts, suitable service resource limits, Namespace retention, and a tested sequential upgrade procedure.

Why Deploy Temporal Production on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Temporal Production on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
smoothmq
A drop-in replacement for AWS SQS

poundifdef
7
View Template
Kafka UI
Kafbat UI — Open-source web UI to monitor and manage Apache Kafka clusters

codestorm
0
View Template
Hatchet Lite
Hatchet Lite with postgres

prncd
1