{
  "manifest_version": "1.0.0",
  "template": {
    "id": "50116d35-3bd0-4990-98ec-e7baaac175fc",
    "slug": "temporal-server",
    "name": "Temporal | Durable Workflow Engine on Postgres (No Elasticsearch)",
    "description": "Durable workflows with Web UI and Postgres visibility, no Elasticsearch",
    "url": "https://railway.com/deploy/temporal-server",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/temporal-railway"
    }
  },
  "services": [
    {
      "name": "Temporal",
      "source": {
        "repo": "https://github.com/nomideusz/temporal-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Gateway",
      "source": {
        "repo": "https://github.com/nomideusz/temporal-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Temporal-UI",
      "source": {
        "image": "temporalio/ui:2.55.0"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Temporal",
      "description": "Frontend HTTP API port, used by Railway's health check - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "7243"
    },
    {
      "key": "DB_PORT",
      "service": "Temporal",
      "description": "Postgres port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_PWD",
      "service": "Temporal",
      "description": "Postgres password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Temporal",
      "description": "Postgres user (creates the temporal and temporal_visibility databases)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_SEEDS",
      "service": "Temporal",
      "description": "Postgres host on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DEFAULT_NAMESPACE",
      "service": "Temporal",
      "description": "Namespace created on first boot (3 day retention)",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "NUM_HISTORY_SHARDS",
      "service": "Temporal",
      "description": "History shards. Fixed when the cluster is first created and can NEVER be changed later - raise it before the first deploy if you expect heavy load (Temporal suggests 512+ for large production clusters)",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "Temporal",
      "description": "Every deploy runs the schema migrations before the health check can pass",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "temporal"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "temporal"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Gateway",
      "description": "Port Railway routes to - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "UI_UPSTREAM",
      "service": "Gateway",
      "description": "Temporal UI on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "BASIC_AUTH_PASSWORD",
      "service": "Gateway",
      "description": "Password for the Temporal Web UI (the UI has no login of its own). The Gateway refuses to start without one",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BASIC_AUTH_USERNAME",
      "service": "Gateway",
      "description": "Username for the Temporal Web UI",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "PORT",
      "service": "Temporal-UI",
      "description": "Port the UI listens on - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TEMPORAL_ADDRESS",
      "service": "Temporal-UI",
      "description": "Temporal frontend (gRPC) on the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TEMPORAL_UI_PORT",
      "service": "Temporal-UI",
      "description": "Must match PORT",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "TEMPORAL_AUTH_SCOPES",
      "service": "Temporal-UI",
      "description": "OIDC scopes",
      "secret": false,
      "strategy": "default",
      "default": "openid,profile,email"
    },
    {
      "key": "TEMPORAL_AUTH_ENABLED",
      "service": "Temporal-UI",
      "description": "Set to true to require OIDC sign-in (Google, Auth0, Keycloak, Okta, ...) on top of the Gateway password",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "TEMPORAL_CORS_ORIGINS",
      "service": "Temporal-UI",
      "description": "Public URL the UI is opened from - add your custom domain here after adding one",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TEMPORAL_AUTH_CALLBACK_URL",
      "service": "Temporal-UI",
      "description": "OIDC redirect URI to register with your provider",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "temporal-server"
      }
    },
    "cli": "railway deploy --template temporal-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "50116d35-3bd0-4990-98ec-e7baaac175fc",
            "serializedConfig": {
              "services": {
                "746944e3-3271-4820-b393-d1d745a7d304": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/temporal-railway/main/icon.svg",
                  "name": "Temporal",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/system-info",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/temporal-railway",
                    "rootDirectory": "/server"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Frontend HTTP API port, used by Railway's health check - leave as is",
                      "defaultValue": "7243"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_PWD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user (creates the temporal and temporal_visibility databases)",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "POSTGRES_SEEDS": {
                      "isOptional": false,
                      "description": "Postgres host on the private network",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DEFAULT_NAMESPACE": {
                      "isOptional": false,
                      "description": "Namespace created on first boot (3 day retention)",
                      "defaultValue": "default"
                    },
                    "NUM_HISTORY_SHARDS": {
                      "isOptional": false,
                      "description": "History shards. Fixed when the cluster is first created and can NEVER be changed later - raise it before the first deploy if you expect heavy load (Temporal suggests 512+ for large production clusters)",
                      "defaultValue": "4"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "Every deploy runs the schema migrations before the health check can pass",
                      "defaultValue": "300"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                },
                "74ff63d6-4081-404f-81dc-880d329ca383": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "temporal"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "temporal"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "b840e9a3-de59-4938-b21b-80dafa9e084c": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "7fc10f76-2a64-4268-bfcd-480b57461d0d": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "Gateway",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/temporal-railway",
                    "rootDirectory": "/gateway"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to - leave as is",
                      "defaultValue": "8080"
                    },
                    "UI_UPSTREAM": {
                      "isOptional": false,
                      "description": "Temporal UI on the private network",
                      "defaultValue": "${{Temporal-UI.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "BASIC_AUTH_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Temporal Web UI (the UI has no login of its own). The Gateway refuses to start without one",
                      "defaultValue": "{{BASIC_AUTH_PASSWORD}}"
                    },
                    "BASIC_AUTH_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the Temporal Web UI",
                      "defaultValue": "admin"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {}
                },
                "ab52fd30-7445-418d-b4e3-0d7665438e54": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/temporal-railway/main/icon.svg",
                  "name": "Temporal-UI",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "temporalio/ui:2.55.0"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the UI listens on - leave as is",
                      "defaultValue": "8080"
                    },
                    "TEMPORAL_ADDRESS": {
                      "isOptional": false,
                      "description": "Temporal frontend (gRPC) on the private network",
                      "defaultValue": "${{Temporal.RAILWAY_PRIVATE_DOMAIN}}:7233"
                    },
                    "TEMPORAL_UI_PORT": {
                      "isOptional": false,
                      "description": "Must match PORT",
                      "defaultValue": "8080"
                    },
                    "TEMPORAL_AUTH_SCOPES": {
                      "isOptional": true,
                      "description": "OIDC scopes",
                      "defaultValue": "openid,profile,email"
                    },
                    "TEMPORAL_AUTH_ENABLED": {
                      "isOptional": true,
                      "description": "Set to true to require OIDC sign-in (Google, Auth0, Keycloak, Okta, ...) on top of the Gateway password",
                      "defaultValue": "false"
                    },
                    "TEMPORAL_CORS_ORIGINS": {
                      "isOptional": false,
                      "description": "Public URL the UI is opened from - add your custom domain here after adding one",
                      "defaultValue": "https://${{Gateway.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "TEMPORAL_AUTH_CLIENT_ID": {
                      "isOptional": true,
                      "description": "OIDC client ID",
                      "defaultValue": ""
                    },
                    "TEMPORAL_AUTH_CALLBACK_URL": {
                      "isOptional": true,
                      "description": "OIDC redirect URI to register with your provider",
                      "defaultValue": "https://${{Gateway.RAILWAY_PUBLIC_DOMAIN}}/auth/sso/callback"
                    },
                    "TEMPORAL_AUTH_PROVIDER_URL": {
                      "isOptional": true,
                      "description": "OIDC issuer URL, e.g. https://accounts.google.com",
                      "defaultValue": ""
                    },
                    "TEMPORAL_AUTH_CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "OIDC client secret",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-12T04:14:37.344Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-12T03:34:55.426Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_9a588848483c45939f77",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 88,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "Temporal-UI"
  }
}
