{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b6576e7c-eeea-4a0b-8061-2722a8a690dd",
    "slug": "self-hosted-komga",
    "name": "Komga",
    "description": "Media server for comics, manga, magazines and ebooks",
    "url": "https://railway.com/deploy/self-hosted-komga",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/komga-railway"
    }
  },
  "services": [
    {
      "name": "komga",
      "source": {
        "repo": "https://github.com/gridalpha/komga-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "komga",
      "description": "Port Railway probes; Komga's fixed listen port",
      "secret": false,
      "strategy": "default",
      "default": "25600"
    },
    {
      "key": "KOMGA_DATA_DIR",
      "service": "komga",
      "description": "Volume mount point",
      "secret": false,
      "strategy": "default",
      "default": "/data"
    },
    {
      "key": "KOMGA_BOOTSTRAP",
      "service": "komga",
      "description": "Run first-run account and library setup",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "KOMGA_DEMO_MEDIA",
      "service": "komga",
      "description": "Seed public-domain sample library once",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "JAVA_TOOL_OPTIONS",
      "service": "komga",
      "description": "JVM heap ceiling from the cgroup",
      "secret": false,
      "strategy": "default",
      "default": "-XX:MaxRAMPercentage=60"
    },
    {
      "key": "KOMGA_ADMIN_EMAIL",
      "service": "komga",
      "description": "First administrator, must be email-shaped",
      "secret": false,
      "strategy": "default",
      "default": "admin@komga.app"
    },
    {
      "key": "KOMGA_ADMIN_PASSWORD",
      "service": "komga",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "komga",
      "description": "First-boot health check window",
      "secret": false,
      "strategy": "default",
      "default": "300"
    },
    {
      "key": "LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY",
      "service": "komga",
      "description": "Days of rolled logs to keep",
      "secret": false,
      "strategy": "default",
      "default": "3"
    },
    {
      "key": "LOGGING_LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP",
      "service": "komga",
      "description": "Cap rolling logs on the volume",
      "secret": false,
      "strategy": "default",
      "default": "50MB"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "self-hosted-komga"
      }
    },
    "cli": "railway deploy --template self-hosted-komga",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b6576e7c-eeea-4a0b-8061-2722a8a690dd",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "e65141c6-8b8d-475c-b273-29517f07a3c2": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/komga.svg",
                  "name": "komga",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/actuator/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/komga-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway probes; Komga's fixed listen port",
                      "defaultValue": "25600"
                    },
                    "KOMGA_DATA_DIR": {
                      "isOptional": false,
                      "description": "Volume mount point",
                      "defaultValue": "/data"
                    },
                    "KOMGA_BOOTSTRAP": {
                      "isOptional": true,
                      "description": "Run first-run account and library setup",
                      "defaultValue": "true"
                    },
                    "KOMGA_DEMO_MEDIA": {
                      "isOptional": true,
                      "description": "Seed public-domain sample library once",
                      "defaultValue": "true"
                    },
                    "JAVA_TOOL_OPTIONS": {
                      "isOptional": true,
                      "description": "JVM heap ceiling from the cgroup",
                      "defaultValue": "-XX:MaxRAMPercentage=60"
                    },
                    "KOMGA_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First administrator, must be email-shaped",
                      "defaultValue": "admin@komga.app"
                    },
                    "KOMGA_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{KOMGA_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First-boot health check window",
                      "defaultValue": "300"
                    },
                    "LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY": {
                      "isOptional": true,
                      "description": "Days of rolled logs to keep",
                      "defaultValue": "3"
                    },
                    "LOGGING_LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP": {
                      "isOptional": true,
                      "description": "Cap rolling logs on the volume",
                      "defaultValue": "50MB"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:25600": {
                        "port": 25600
                      }
                    }
                  },
                  "volumeMounts": {
                    "e65141c6-8b8d-475c-b273-29517f07a3c2": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "komga",
      "method": "GET",
      "path": "/actuator/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-04T17:54:19.363Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T18:02:55.402Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0ba945cc0f424355b77d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 129,
    "typical_build_seconds": 101,
    "typical_start_seconds": 11,
    "slowest_service": "komga"
  }
}
