{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e5cd8d8e-f1d3-4fd5-81da-06cafefb868e",
    "slug": "komari-panel",
    "name": "Komari",
    "description": "Server monitoring dashboard with agents, charts and latency checks",
    "url": "https://railway.com/deploy/komari-panel",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/komari-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "komari",
      "source": {
        "repo": "https://github.com/gridalpha/komari-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "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": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "komari",
      "description": "HTTP port the panel listens on",
      "secret": false,
      "strategy": "default",
      "default": "25774"
    },
    {
      "key": "KOMARI_DATA_DIR",
      "service": "komari",
      "description": "Volume path for the configuration database",
      "secret": false,
      "strategy": "default",
      "default": "/app/data"
    },
    {
      "key": "KOMARI_SITE_NAME",
      "service": "komari",
      "description": "Site name shown in the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "Komari"
    },
    {
      "key": "KOMARI_METRIC_DSN",
      "service": "komari",
      "description": "Monitoring database connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "KOMARI_ADMIN_PASSWORD",
      "service": "komari",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "KOMARI_ADMIN_USERNAME",
      "service": "komari",
      "description": "First administrator, created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "KOMARI_SITE_DESCRIPTION",
      "service": "komari",
      "description": "Site tagline",
      "secret": false,
      "strategy": "default",
      "default": "A simple server monitor tool."
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "komari",
      "description": "First boot waits for Postgres",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "komari",
      "description": "Clean shutdown for agent sockets",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "komari-panel"
      }
    },
    "cli": "railway deploy --template komari-panel",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e5cd8d8e-f1d3-4fd5-81da-06cafefb868e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "07ed7770-84da-45ce-832f-24323e732733": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "07ed7770-84da-45ce-832f-24323e732733": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "ca2e0008-bde3-4b97-8e69-a78663c0afb6": {
                  "icon": "https://cdn.jsdelivr.net/gh/komari-monitor/komari-web@d54ce1288df41ead08aa19f8700186e68028a889/public/favicon.png",
                  "name": "komari",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/public",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/komari-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the panel listens on",
                      "defaultValue": "25774"
                    },
                    "KOMARI_DATA_DIR": {
                      "isOptional": false,
                      "description": "Volume path for the configuration database",
                      "defaultValue": "/app/data"
                    },
                    "KOMARI_SITE_NAME": {
                      "isOptional": true,
                      "description": "Site name shown in the dashboard",
                      "defaultValue": "Komari"
                    },
                    "KOMARI_METRIC_DSN": {
                      "isOptional": false,
                      "description": "Monitoring database connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "KOMARI_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{KOMARI_ADMIN_PASSWORD}}"
                    },
                    "KOMARI_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "First administrator, created on first boot",
                      "defaultValue": "admin"
                    },
                    "KOMARI_SITE_DESCRIPTION": {
                      "isOptional": true,
                      "description": "Site tagline",
                      "defaultValue": "A simple server monitor tool."
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot waits for Postgres",
                      "defaultValue": "600"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown for agent sockets",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:25774": {
                        "port": 25774
                      }
                    }
                  },
                  "volumeMounts": {
                    "ca2e0008-bde3-4b97-8e69-a78663c0afb6": {
                      "mountPath": "/app/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "komari",
      "method": "GET",
      "path": "/api/public",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T10:14:39.124Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-15T07:20:29.618Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_1aca7dc4dd4f48e3881d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 37,
    "typical_build_seconds": 10,
    "typical_start_seconds": 10,
    "slowest_service": "komari"
  }
}
