{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a0b92ac6-4d65-4093-ad59-c1a958883a39",
    "slug": "langfuse-v4-llm-observability",
    "name": "Langfuse v4 LLM Observability",
    "description": "Self-host Langfuse v4 with ClickHouse, Redis and S3 storage.",
    "url": "https://railway.com/deploy/langfuse-v4-llm-observability",
    "upstream": {
      "repo_url": "https://github.com/Amritasha/langfuse-railway"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "langfuse-worker",
      "source": {
        "repo": "https://github.com/Amritasha/langfuse-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "clickhouse",
      "source": {
        "repo": "https://github.com/Amritasha/langfuse-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "langfuse-web",
      "source": {
        "repo": "https://github.com/Amritasha/langfuse-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port that Redis listens on",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Username for authenticating with Redis",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to Redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Randomly generated password for authenticating with Redis",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "langfuse-worker",
      "description": "Port this service listens on. Leave as set.",
      "secret": false,
      "strategy": "default",
      "default": "3030"
    },
    {
      "key": "SALT",
      "service": "langfuse-worker",
      "description": "Salts hashed API keys. Shared with the worker so both agree.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "HOSTNAME",
      "service": "langfuse-worker",
      "description": "Bind address inside the container. Leave as 0.0.0.0.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "DATABASE_URL",
      "service": "langfuse-worker",
      "description": "Postgres connection string. Wired to the Postgres service in this template.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "langfuse-worker",
      "description": "Node.js heap limit. Raise it as ingestion volume grows.",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=3072"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "langfuse-worker",
      "description": "ClickHouse database holding traces and spans.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "CLICKHOUSE_URL",
      "service": "langfuse-worker",
      "description": "ClickHouse HTTP endpoint used for queries.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "langfuse-worker",
      "description": "256-bit hex key that encrypts stored secrets. Shared with the worker.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "langfuse-worker",
      "description": "ClickHouse username. Wired to the clickhouse service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "langfuse-worker",
      "description": "ClickHouse password. Generated for you at deploy time.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_CONNECTION_STRING",
      "service": "langfuse-worker",
      "description": "Redis connection string. Carries the ingestion queue and cache.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_MIGRATION_URL",
      "service": "langfuse-worker",
      "description": "ClickHouse native endpoint used to run schema migrations.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLICKHOUSE_CLUSTER_ENABLED",
      "service": "langfuse-worker",
      "description": "Must stay false for a single ClickHouse node, or the migration fails.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_BUCKET",
      "service": "langfuse-worker",
      "description": "Bucket name for batch exports, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_PREFIX",
      "service": "langfuse-worker",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "exports/"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_REGION",
      "service": "langfuse-worker",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_BUCKET",
      "service": "langfuse-worker",
      "description": "Bucket name for raw event payloads, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_PREFIX",
      "service": "langfuse-worker",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "events/"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_REGION",
      "service": "langfuse-worker",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_BUCKET",
      "service": "langfuse-worker",
      "description": "Bucket name for uploaded media, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_PREFIX",
      "service": "langfuse-worker",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "media/"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_REGION",
      "service": "langfuse-worker",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ENABLED",
      "service": "langfuse-worker",
      "description": "Turns batch exports on. Set to false to disable them.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ENDPOINT",
      "service": "langfuse-worker",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT",
      "service": "langfuse-worker",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT",
      "service": "langfuse-worker",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID",
      "service": "langfuse-worker",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID",
      "service": "langfuse-worker",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID",
      "service": "langfuse-worker",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_FORCE_PATH_STYLE",
      "service": "langfuse-worker",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE",
      "service": "langfuse-worker",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE",
      "service": "langfuse-worker",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY",
      "service": "langfuse-worker",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY",
      "service": "langfuse-worker",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY",
      "service": "langfuse-worker",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "clickhouse",
      "description": "ClickHouse database holding traces and spans.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "clickhouse",
      "description": "ClickHouse username. Wired to the clickhouse service.",
      "secret": false,
      "strategy": "default",
      "default": "clickhouse"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "clickhouse",
      "description": "ClickHouse password. Generated for you at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "clickhouse",
      "description": "Lets the ClickHouse user manage grants on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "langfuse-web",
      "description": "Port the service listens on. Leave as set.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "SALT",
      "service": "langfuse-web",
      "description": "Salts hashed API keys. Shared with the worker so both agree.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "HOSTNAME",
      "service": "langfuse-web",
      "description": "Bind address inside the container. Leave as 0.0.0.0.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "DATABASE_URL",
      "service": "langfuse-web",
      "description": "Postgres connection string. Wired to the Postgres service in this template.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_URL",
      "service": "langfuse-web",
      "description": "Public URL of the Langfuse web app, used for sign-in callbacks.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "langfuse-web",
      "description": "Node.js heap limit. Raise it as ingestion volume grows.",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=3072"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "langfuse-web",
      "description": "ClickHouse database holding traces and spans.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "CLICKHOUSE_URL",
      "service": "langfuse-web",
      "description": "ClickHouse HTTP endpoint used for queries.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "langfuse-web",
      "description": "256-bit hex key that encrypts stored secrets. Shared with the worker.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "langfuse-web",
      "description": "ClickHouse username. Wired to the clickhouse service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "NEXTAUTH_SECRET",
      "service": "langfuse-web",
      "description": "Signs session cookies. Generated for you at deploy time.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "langfuse-web",
      "description": "ClickHouse password. Generated for you at deploy time.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_CONNECTION_STRING",
      "service": "langfuse-web",
      "description": "Redis connection string. Carries the ingestion queue and cache.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLICKHOUSE_MIGRATION_URL",
      "service": "langfuse-web",
      "description": "ClickHouse native endpoint used to run schema migrations.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLICKHOUSE_CLUSTER_ENABLED",
      "service": "langfuse-web",
      "description": "Must stay false for a single ClickHouse node, or the migration fails.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_BUCKET",
      "service": "langfuse-web",
      "description": "Bucket name for batch exports, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_PREFIX",
      "service": "langfuse-web",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "exports/"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_REGION",
      "service": "langfuse-web",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_BUCKET",
      "service": "langfuse-web",
      "description": "Bucket name for raw event payloads, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_PREFIX",
      "service": "langfuse-web",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "events/"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_REGION",
      "service": "langfuse-web",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_BUCKET",
      "service": "langfuse-web",
      "description": "Bucket name for uploaded media, wired to the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_PREFIX",
      "service": "langfuse-web",
      "description": "Key prefix that keeps this data separate inside the shared bucket.",
      "secret": false,
      "strategy": "default",
      "default": "media/"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_REGION",
      "service": "langfuse-web",
      "description": "S3 region reported by the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ENABLED",
      "service": "langfuse-web",
      "description": "Turns batch exports on. Set to false to disable them.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ENDPOINT",
      "service": "langfuse-web",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT",
      "service": "langfuse-web",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT",
      "service": "langfuse-web",
      "description": "S3 endpoint of the Railway bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID",
      "service": "langfuse-web",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID",
      "service": "langfuse-web",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID",
      "service": "langfuse-web",
      "description": "S3 access key id for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_FORCE_PATH_STYLE",
      "service": "langfuse-web",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE",
      "service": "langfuse-web",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE",
      "service": "langfuse-web",
      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY",
      "service": "langfuse-web",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY",
      "service": "langfuse-web",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY",
      "service": "langfuse-web",
      "description": "S3 secret key for the Railway bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "langfuse-v4-llm-observability"
      }
    },
    "cli": "railway deploy --template langfuse-v4-llm-observability",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a0b92ac6-4d65-4093-ad59-c1a958883a39",
            "serializedConfig": {
              "buckets": {
                "90d4070c-2223-4280-a2af-f65bddf6dbfb": {
                  "name": "Bucket"
                }
              },
              "services": {
                "07c5a059-4670-4545-ba57-450009cd3ca7": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\""
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private network hostname of the Redis service, only resolvable from services in the same environment",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port that Redis listens on",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Username for authenticating with Redis",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to Redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of REDIS_PASSWORD for clients that expect the unseparated name",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Randomly generated password for authenticating with Redis",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "07c5a059-4670-4545-ba57-450009cd3ca7": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha"
                },
                "3611662f-7bc7-4451-bff1-80eebcbabf44": {
                  "name": "langfuse-worker",
                  "source": {
                    "repo": "Amritasha/langfuse-railway",
                    "rootDirectory": "worker"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port this service listens on. Leave as set.",
                      "defaultValue": "3030"
                    },
                    "SALT": {
                      "description": "Salts hashed API keys. Shared with the worker so both agree.",
                      "defaultValue": "${{langfuse-web.SALT}}"
                    },
                    "HOSTNAME": {
                      "description": "Bind address inside the container. Leave as 0.0.0.0.",
                      "defaultValue": "0.0.0.0"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection string. Wired to the Postgres service in this template.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NODE_OPTIONS": {
                      "description": "Node.js heap limit. Raise it as ingestion volume grows.",
                      "defaultValue": "--max-old-space-size=3072"
                    },
                    "CLICKHOUSE_DB": {
                      "description": "ClickHouse database holding traces and spans.",
                      "defaultValue": "default"
                    },
                    "CLICKHOUSE_URL": {
                      "description": "ClickHouse HTTP endpoint used for queries.",
                      "defaultValue": "http://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:8123"
                    },
                    "ENCRYPTION_KEY": {
                      "description": "256-bit hex key that encrypts stored secrets. Shared with the worker.",
                      "defaultValue": "${{langfuse-web.ENCRYPTION_KEY}}"
                    },
                    "CLICKHOUSE_USER": {
                      "description": "ClickHouse username. Wired to the clickhouse service.",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_USER}}"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "description": "ClickHouse password. Generated for you at deploy time.",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "REDIS_CONNECTION_STRING": {
                      "description": "Redis connection string. Carries the ingestion queue and cache.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "CLICKHOUSE_MIGRATION_URL": {
                      "description": "ClickHouse native endpoint used to run schema migrations.",
                      "defaultValue": "clickhouse://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "CLICKHOUSE_CLUSTER_ENABLED": {
                      "description": "Must stay false for a single ClickHouse node, or the migration fails.",
                      "defaultValue": "false"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_BUCKET": {
                      "description": "Bucket name for batch exports, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "exports/"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_BUCKET": {
                      "description": "Bucket name for raw event payloads, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "events/"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_BUCKET": {
                      "description": "Bucket name for uploaded media, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "media/"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ENABLED": {
                      "description": "Turns batch exports on. Set to false to disable them.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    }
                  }
                },
                "84aa4248-57d3-45d5-a3fe-ce10de6b949c": {
                  "name": "clickhouse",
                  "source": {
                    "repo": "Amritasha/langfuse-railway",
                    "rootDirectory": "clickhouse"
                  },
                  "variables": {
                    "CLICKHOUSE_DB": {
                      "description": "ClickHouse database holding traces and spans.",
                      "defaultValue": "default"
                    },
                    "CLICKHOUSE_USER": {
                      "description": "ClickHouse username. Wired to the clickhouse service.",
                      "defaultValue": "clickhouse"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "description": "ClickHouse password. Generated for you at deploy time.",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "description": "Lets the ClickHouse user manage grants on first boot.",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "84aa4248-57d3-45d5-a3fe-ce10de6b949c": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                },
                "9d4c855a-9156-48e3-9910-551b4934c558": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "9d4c855a-9156-48e3-9910-551b4934c558": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "d02d6ed0-176d-4c26-afbe-9650b9ebe3ae": {
                  "name": "langfuse-web",
                  "source": {
                    "repo": "Amritasha/langfuse-railway",
                    "rootDirectory": "web"
                  },
                  "variables": {
                    "PORT": {
                      "description": "Port the service listens on. Leave as set.",
                      "defaultValue": "3000"
                    },
                    "SALT": {
                      "description": "Salts hashed API keys. Shared with the worker so both agree.",
                      "defaultValue": "{{SALT}}"
                    },
                    "HOSTNAME": {
                      "description": "Bind address inside the container. Leave as 0.0.0.0.",
                      "defaultValue": "0.0.0.0"
                    },
                    "DATABASE_URL": {
                      "description": "Postgres connection string. Wired to the Postgres service in this template.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "NEXTAUTH_URL": {
                      "description": "Public URL of the Langfuse web app, used for sign-in callbacks.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NODE_OPTIONS": {
                      "description": "Node.js heap limit. Raise it as ingestion volume grows.",
                      "defaultValue": "--max-old-space-size=3072"
                    },
                    "CLICKHOUSE_DB": {
                      "description": "ClickHouse database holding traces and spans.",
                      "defaultValue": "default"
                    },
                    "CLICKHOUSE_URL": {
                      "description": "ClickHouse HTTP endpoint used for queries.",
                      "defaultValue": "http://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:8123"
                    },
                    "ENCRYPTION_KEY": {
                      "description": "256-bit hex key that encrypts stored secrets. Shared with the worker.",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "CLICKHOUSE_USER": {
                      "description": "ClickHouse username. Wired to the clickhouse service.",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_USER}}"
                    },
                    "NEXTAUTH_SECRET": {
                      "description": "Signs session cookies. Generated for you at deploy time.",
                      "defaultValue": "{{NEXTAUTH_SECRET}}"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "description": "ClickHouse password. Generated for you at deploy time.",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "REDIS_CONNECTION_STRING": {
                      "description": "Redis connection string. Carries the ingestion queue and cache.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "CLICKHOUSE_MIGRATION_URL": {
                      "description": "ClickHouse native endpoint used to run schema migrations.",
                      "defaultValue": "clickhouse://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "CLICKHOUSE_CLUSTER_ENABLED": {
                      "description": "Must stay false for a single ClickHouse node, or the migration fails.",
                      "defaultValue": "false"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_BUCKET": {
                      "description": "Bucket name for batch exports, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "exports/"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_BUCKET": {
                      "description": "Bucket name for raw event payloads, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "events/"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_BUCKET": {
                      "description": "Bucket name for uploaded media, wired to the Railway bucket.",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_PREFIX": {
                      "description": "Key prefix that keeps this data separate inside the shared bucket.",
                      "defaultValue": "media/"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_REGION": {
                      "description": "S3 region reported by the Railway bucket.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ENABLED": {
                      "description": "Turns batch exports on. Set to false to disable them.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT": {
                      "description": "S3 endpoint of the Railway bucket.",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID": {
                      "description": "S3 access key id for the Railway bucket.",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, which the Railway bucket endpoint requires.",
                      "defaultValue": "true"
                    },
                    "LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    },
                    "LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY": {
                      "description": "S3 secret key for the Railway bucket.",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-11-05T16:15:12.578Z",
  "generator_version": "0.1.0"
}
