{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7094d94e-3485-40d0-88c7-3bf94cb7bc9e",
    "slug": "clickhouse-olap-database",
    "name": "ClickHouse | Open Source OLAP Database for Analytics",
    "description": "Column-oriented OLAP database for fast analytics on large datasets",
    "url": "https://railway.com/deploy/clickhouse-olap-database",
    "upstream": {
      "image": "clickhouse/clickhouse-server:26.8.2.7-alpine"
    }
  },
  "services": [
    {
      "name": "ClickHouse",
      "source": {
        "image": "clickhouse/clickhouse-server:26.8.2.7-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "tcp_ports": [
        9000
      ],
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ClickHouse",
      "description": "Port Railway routes HTTP traffic and healthchecks to. ClickHouse ignores this variable; it exists because the image also exposes the native protocol on 9000. Do not change it.",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "ClickHouse",
      "description": "ClickHouse account created at first boot. Keep 'default' unless you have a reason to rename it: every driver and connection string assumes it.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "ClickHouse",
      "description": "Password for the ClickHouse user. Generated per deployment. Change it later with ALTER USER, not by editing this variable — it is applied to the server's user config at boot.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "ClickHouse",
      "description": "Allows managing users, roles and grants with SQL (CREATE USER, GRANT). Set to 0 to lock access management down to the config files.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "clickhouse-olap-database"
      }
    },
    "cli": "railway deploy --template clickhouse-olap-database",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7094d94e-3485-40d0-88c7-3bf94cb7bc9e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "a0036887-64db-479c-be48-f4d8fd9671ab": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/clickhouse.svg",
                  "name": "ClickHouse",
                  "deploy": {
                    "startCommand": "/entrypoint.sh -- --logger.console=1 --logger.level=information",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 2
                  },
                  "source": {
                    "image": "clickhouse/clickhouse-server:26.8.2.7-alpine"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes HTTP traffic and healthchecks to. ClickHouse ignores this variable; it exists because the image also exposes the native protocol on 9000. Do not change it.",
                      "defaultValue": "8123"
                    },
                    "CLICKHOUSE_USER": {
                      "isOptional": false,
                      "description": "ClickHouse account created at first boot. Keep 'default' unless you have a reason to rename it: every driver and connection string assumes it.",
                      "defaultValue": "default"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the ClickHouse user. Generated per deployment. Change it later with ALTER USER, not by editing this variable — it is applied to the server's user config at boot.",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "isOptional": false,
                      "description": "Allows managing users, roles and grants with SQL (CREATE USER, GRANT). Set to 0 to lock access management down to the config files.",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "9000": {}
                    },
                    "serviceDomains": {
                      "<hasDomain>:8123": {
                        "port": 8123
                      }
                    }
                  },
                  "volumeMounts": {
                    "a0036887-64db-479c-be48-f4d8fd9671ab": {
                      "mountPath": "/var/lib/clickhouse"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-18T22:14:40.474Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T10:12:22.328Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0a187577199b42f58059",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 40,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "ClickHouse"
  }
}
