{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d6fa13aa-e13f-452a-a9e0-0c41beb6f108",
    "slug": "kafka-kafka-ui-kraft",
    "name": "Kafka + Kafka UI (KRaft)",
    "description": "Single-node Kafka in KRaft mode with Kafka UI on Railway",
    "url": "https://railway.com/deploy/kafka-kafka-ui-kraft",
    "upstream": {
      "image": "provectuslabs/kafka-ui:latest"
    }
  },
  "services": [
    {
      "name": "kafka-ui",
      "source": {
        "image": "provectuslabs/kafka-ui:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "cp-kafka",
      "source": {
        "image": "confluentinc/cp-kafka:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/kafka/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "AUTH_TYPE",
      "service": "kafka-ui",
      "description": "Enable username/password login for Kafka UI.",
      "secret": false,
      "strategy": "default",
      "default": "LOGIN_FORM"
    },
    {
      "key": "KAFKA_CLUSTERS_0_NAME",
      "service": "kafka-ui",
      "description": "Display name of the Kafka cluster in the UI.",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "SPRING_SECURITY_USER_NAME",
      "service": "kafka-ui",
      "description": "Auto-generated Kafka UI username.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SPRING_SECURITY_USER_PASSWORD",
      "service": "kafka-ui",
      "description": "Auto-generated Kafka UI password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS",
      "service": "kafka-ui",
      "description": "Internal Kafka bootstrap server for Kafka UI.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CLUSTER_ID",
      "service": "cp-kafka",
      "description": "Valid KRaft cluster ID from Confluent example.",
      "secret": false,
      "strategy": "default",
      "default": "MkU3OEVBNTcwNTJENDM2Qk"
    },
    {
      "key": "KAFKA_NODE_ID",
      "service": "cp-kafka",
      "description": "Unique node ID for this Kafka server.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "KAFKA_LOG_DIRS",
      "service": "cp-kafka",
      "description": "Kafka data directory inside the mounted volume, avoids the lost+found folder problem.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/kafka/data/kraft-combined-logs"
    },
    {
      "key": "KAFKA_LISTENERS",
      "service": "cp-kafka",
      "description": "Internal listeners Kafka binds to.",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "cp-kafka",
      "description": "Helps avoid mounted volume permission issues on Railway.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "KAFKA_PROCESS_ROLES",
      "service": "cp-kafka",
      "description": "Run this single node as both broker and controller in KRaft mode.",
      "secret": false,
      "strategy": "default",
      "default": "broker,controller"
    },
    {
      "key": "KAFKA_ADVERTISED_LISTENERS",
      "service": "cp-kafka",
      "description": "Internal broker address advertised to Railway services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KAFKA_CONTROLLER_QUORUM_VOTERS",
      "service": "cp-kafka",
      "description": "Single-node KRaft controller quorum.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "KAFKA_CONTROLLER_LISTENER_NAMES",
      "service": "cp-kafka",
      "description": "Listener name used for controller traffic.",
      "secret": false,
      "strategy": "default",
      "default": "CONTROLLER"
    },
    {
      "key": "KAFKA_INTER_BROKER_LISTENER_NAME",
      "service": "cp-kafka",
      "description": "Listener used for broker communication.",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT"
    },
    {
      "key": "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP",
      "service": "cp-kafka",
      "description": "Maps listener names to protocols.",
      "secret": false,
      "strategy": "default",
      "default": "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
    },
    {
      "key": "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR",
      "service": "cp-kafka",
      "description": "Internal offsets topic replication factor for one broker.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kafka-kafka-ui-kraft"
      }
    },
    "cli": "railway deploy --template kafka-kafka-ui-kraft",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d6fa13aa-e13f-452a-a9e0-0c41beb6f108",
            "serializedConfig": {
              "services": {
                "9e9925cc-2402-4aee-880d-417ce38a0eca": {
                  "icon": null,
                  "name": "kafka-ui",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "provectuslabs/kafka-ui:latest"
                  },
                  "variables": {
                    "AUTH_TYPE": {
                      "isOptional": false,
                      "description": "Enable username/password login for Kafka UI.",
                      "defaultValue": "LOGIN_FORM"
                    },
                    "KAFKA_CLUSTERS_0_NAME": {
                      "isOptional": false,
                      "description": "Display name of the Kafka cluster in the UI.",
                      "defaultValue": "local"
                    },
                    "SPRING_SECURITY_USER_NAME": {
                      "isOptional": false,
                      "description": "Auto-generated Kafka UI username.",
                      "defaultValue": "{{SPRING_SECURITY_USER_NAME}}"
                    },
                    "SPRING_SECURITY_USER_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated Kafka UI password.",
                      "defaultValue": "{{SPRING_SECURITY_USER_PASSWORD}}"
                    },
                    "KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS": {
                      "isOptional": false,
                      "description": "Internal Kafka bootstrap server for Kafka UI.",
                      "defaultValue": "${{cp-kafka.RAILWAY_PRIVATE_DOMAIN}}:9092"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "b2efafd5-2e18-4cb7-9590-118ff01a413b": {
                  "icon": null,
                  "name": "cp-kafka",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "confluentinc/cp-kafka:latest"
                  },
                  "variables": {
                    "CLUSTER_ID": {
                      "description": "Valid KRaft cluster ID from Confluent example.",
                      "defaultValue": "MkU3OEVBNTcwNTJENDM2Qk"
                    },
                    "KAFKA_NODE_ID": {
                      "description": "Unique node ID for this Kafka server.",
                      "defaultValue": "1"
                    },
                    "KAFKA_LOG_DIRS": {
                      "description": "Kafka data directory inside the mounted volume, avoids the lost+found folder problem.",
                      "defaultValue": "/var/lib/kafka/data/kraft-combined-logs"
                    },
                    "KAFKA_LISTENERS": {
                      "description": "Internal listeners Kafka binds to.",
                      "defaultValue": "PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093"
                    },
                    "RAILWAY_RUN_UID": {
                      "description": "Helps avoid mounted volume permission issues on Railway.",
                      "defaultValue": "0"
                    },
                    "KAFKA_PROCESS_ROLES": {
                      "description": "Run this single node as both broker and controller in KRaft mode.",
                      "defaultValue": "broker,controller"
                    },
                    "KAFKA_ADVERTISED_LISTENERS": {
                      "isOptional": false,
                      "description": "Internal broker address advertised to Railway services.",
                      "defaultValue": "PLAINTEXT://${{cp-kafka.RAILWAY_PRIVATE_DOMAIN}}:9092"
                    },
                    "KAFKA_CONTROLLER_QUORUM_VOTERS": {
                      "description": "Single-node KRaft controller quorum.",
                      "defaultValue": "1@${{cp-kafka.RAILWAY_PRIVATE_DOMAIN}}:9093"
                    },
                    "KAFKA_CONTROLLER_LISTENER_NAMES": {
                      "description": "Listener name used for controller traffic.",
                      "defaultValue": "CONTROLLER"
                    },
                    "KAFKA_INTER_BROKER_LISTENER_NAME": {
                      "description": "Listener used for broker communication.",
                      "defaultValue": "PLAINTEXT"
                    },
                    "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP": {
                      "description": "Maps listener names to protocols.",
                      "defaultValue": "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"
                    },
                    "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR": {
                      "isOptional": false,
                      "description": "Internal offsets topic replication factor for one broker.",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "b2efafd5-2e18-4cb7-9590-118ff01a413b": {
                      "mountPath": "/var/lib/kafka/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T02:16:35.532Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0eb2db389d9148f3a1b1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 76,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "kafka-ui"
  }
}
