{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1e1e5e8c-d583-4075-ab44-9a30e8b09421",
    "slug": "logchef",
    "name": "Logchef",
    "description": "Log exploration and dashboards with private, persistent ClickHouse",
    "url": "https://railway.com/deploy/logchef",
    "upstream": {
      "repo_url": "https://github.com/monotykamary/railway-template-logchef"
    }
  },
  "services": [
    {
      "name": "logchef",
      "source": {
        "repo": "https://github.com/monotykamary/railway-template-logchef"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "clickhouse",
      "source": {
        "repo": "https://github.com/monotykamary/railway-template-logchef"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/clickhouse",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "logchef",
      "description": "HTTP port used by Logchef and the Railway public domain.",
      "secret": false,
      "strategy": "default",
      "default": "8125"
    },
    {
      "key": "LOGCHEF_SERVER__PORT",
      "service": "logchef",
      "description": "Logchef HTTP listener port; keep synchronized with PORT.",
      "secret": false,
      "strategy": "default",
      "default": "8125"
    },
    {
      "key": "LOGCHEF_AUTH__ADMIN_EMAILS",
      "service": "logchef",
      "description": "Makes the bootstrap local user a global Logchef administrator.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOGCHEF_CLICKHOUSE_PASSWORD",
      "service": "logchef",
      "description": "Shared ClickHouse password reference; do not replace with an unrelated value.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LOGCHEF_AUTH__LOCAL__ENABLED",
      "service": "logchef",
      "description": "Enable Logchef built-in email and password authentication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LOGCHEF_SERVER__FRONTEND_URL",
      "service": "logchef",
      "description": "Public Logchef origin used for browser links and runtime settings.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LOGCHEF_CLICKHOUSE_HEALTH_URL",
      "service": "logchef",
      "description": "Private authenticated ClickHouse readiness endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LOGCHEF_SERVER__SECURE_COOKIE",
      "service": "logchef",
      "description": "Require HTTPS-only authentication cookies on the Railway domain.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LOGCHEF_AUTH__API_TOKEN_SECRET",
      "service": "logchef",
      "description": "Generated secret used to hash Logchef API tokens.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LOGCHEF_AUTH__LOCAL__ADMIN_EMAIL",
      "service": "logchef",
      "description": "Bootstrap administrator email. Change this before the first login.",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "LOGCHEF_CLICKHOUSE_WAIT_ATTEMPTS",
      "service": "logchef",
      "description": "Maximum two-second readiness attempts before Logchef exits for Railway to retry.",
      "secret": false,
      "strategy": "default",
      "default": "150"
    },
    {
      "key": "LOGCHEF_AUTH__LOCAL__ADMIN_PASSWORD",
      "service": "logchef",
      "description": "Generated bootstrap administrator password. Read it from the Logchef service variables.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "clickhouse",
      "description": "ClickHouse HTTP port used by Railway health checks.",
      "secret": false,
      "strategy": "default",
      "default": "8123"
    },
    {
      "key": "CLICKHOUSE_DB",
      "service": "clickhouse",
      "description": "Database initialized for the Logchef logs table.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "CLICKHOUSE_USER",
      "service": "clickhouse",
      "description": "Private ClickHouse account used by Logchef.",
      "secret": false,
      "strategy": "default",
      "default": "logchef"
    },
    {
      "key": "CLICKHOUSE_PASSWORD",
      "service": "clickhouse",
      "description": "Generated password shared with Logchef through a service reference.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CLICKHOUSE_INIT_TIMEOUT",
      "service": "clickhouse",
      "description": "Maximum startup wait in seconds for first-boot initialization scripts.",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT",
      "service": "clickhouse",
      "description": "Enable access management for the generated ClickHouse user.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "logchef"
      }
    },
    "cli": "railway deploy --template logchef",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1e1e5e8c-d583-4075-ab44-9a30e8b09421",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "339b758e-4363-4c90-85fa-94676dedd177": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-logchef/f6d6d4841fc26133e5adaad4531c01ffe9d5e970/assets/logchef-icon-v202.png",
                  "name": "logchef",
                  "build": {
                    "builder": "DOCKERFILE",
                    "watchPatterns": [
                      "/logchef/**"
                    ],
                    "dockerfilePath": "/logchef/Dockerfile",
                    "buildEnvironment": "V3"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/monotykamary/railway-template-logchef",
                    "rootDirectory": "/logchef"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port used by Logchef and the Railway public domain.",
                      "defaultValue": "8125"
                    },
                    "LOGCHEF_SERVER__PORT": {
                      "isOptional": false,
                      "description": "Logchef HTTP listener port; keep synchronized with PORT.",
                      "defaultValue": "8125"
                    },
                    "LOGCHEF_AUTH__ADMIN_EMAILS": {
                      "isOptional": false,
                      "description": "Makes the bootstrap local user a global Logchef administrator.",
                      "defaultValue": "${{logchef.LOGCHEF_AUTH__LOCAL__ADMIN_EMAIL}}"
                    },
                    "LOGCHEF_CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Shared ClickHouse password reference; do not replace with an unrelated value.",
                      "defaultValue": "${{clickhouse.CLICKHOUSE_PASSWORD}}"
                    },
                    "LOGCHEF_AUTH__LOCAL__ENABLED": {
                      "isOptional": false,
                      "description": "Enable Logchef built-in email and password authentication.",
                      "defaultValue": "true"
                    },
                    "LOGCHEF_SERVER__FRONTEND_URL": {
                      "isOptional": false,
                      "description": "Public Logchef origin used for browser links and runtime settings.",
                      "defaultValue": "https://${{logchef.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LOGCHEF_CLICKHOUSE_HEALTH_URL": {
                      "isOptional": false,
                      "description": "Private authenticated ClickHouse readiness endpoint.",
                      "defaultValue": "http://${{clickhouse.RAILWAY_PRIVATE_DOMAIN}}:8123/ping"
                    },
                    "LOGCHEF_SERVER__SECURE_COOKIE": {
                      "isOptional": false,
                      "description": "Require HTTPS-only authentication cookies on the Railway domain.",
                      "defaultValue": "true"
                    },
                    "LOGCHEF_AUTH__API_TOKEN_SECRET": {
                      "isOptional": false,
                      "description": "Generated secret used to hash Logchef API tokens.",
                      "defaultValue": "{{LOGCHEF_AUTH__API_TOKEN_SECRET}}"
                    },
                    "LOGCHEF_AUTH__LOCAL__ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Bootstrap administrator email. Change this before the first login.",
                      "defaultValue": "admin@example.com"
                    },
                    "LOGCHEF_CLICKHOUSE_WAIT_ATTEMPTS": {
                      "isOptional": false,
                      "description": "Maximum two-second readiness attempts before Logchef exits for Railway to retry.",
                      "defaultValue": "150"
                    },
                    "LOGCHEF_AUTH__LOCAL__ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated bootstrap administrator password. Read it from the Logchef service variables.",
                      "defaultValue": "{{LOGCHEF_AUTH__LOCAL__ADMIN_PASSWORD}}"
                    }
                  },
                  "configFile": "/logchef/railway.json",
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8125": {
                        "port": 8125
                      }
                    }
                  },
                  "volumeMounts": {
                    "339b758e-4363-4c90-85fa-94676dedd177": {
                      "mountPath": "/data",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                },
                "6c7c5024-f22e-4c04-a401-411c4080d79d": {
                  "icon": "https://raw.githubusercontent.com/monotykamary/railway-template-logchef/f6d6d4841fc26133e5adaad4531c01ffe9d5e970/assets/clickhouse-icon-v263.png",
                  "name": "clickhouse",
                  "build": {
                    "builder": "DOCKERFILE",
                    "watchPatterns": [
                      "/clickhouse/**"
                    ],
                    "dockerfilePath": "/clickhouse/Dockerfile",
                    "buildEnvironment": "V3"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/monotykamary/railway-template-logchef",
                    "rootDirectory": "/clickhouse"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "ClickHouse HTTP port used by Railway health checks.",
                      "defaultValue": "8123"
                    },
                    "CLICKHOUSE_DB": {
                      "isOptional": false,
                      "description": "Database initialized for the Logchef logs table.",
                      "defaultValue": "default"
                    },
                    "CLICKHOUSE_USER": {
                      "isOptional": false,
                      "description": "Private ClickHouse account used by Logchef.",
                      "defaultValue": "logchef"
                    },
                    "CLICKHOUSE_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password shared with Logchef through a service reference.",
                      "defaultValue": "{{CLICKHOUSE_PASSWORD}}"
                    },
                    "CLICKHOUSE_INIT_TIMEOUT": {
                      "isOptional": false,
                      "description": "Maximum startup wait in seconds for first-boot initialization scripts.",
                      "defaultValue": "300"
                    },
                    "CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT": {
                      "isOptional": false,
                      "description": "Enable access management for the generated ClickHouse user.",
                      "defaultValue": "1"
                    }
                  },
                  "configFile": "/clickhouse/railway.json",
                  "volumeMounts": {
                    "6c7c5024-f22e-4c04-a401-411c4080d79d": {
                      "mountPath": "/var/lib/clickhouse",
                      "backupSchedules": [
                        "DAILY"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "logchef",
      "method": "GET",
      "path": "/api/v1/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T20:06:59.681Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c00ab44eeda6428cb103",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 120,
    "typical_build_seconds": 41,
    "typical_start_seconds": 10,
    "slowest_service": "logchef"
  }
}
