{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7feabb74-117a-4f42-8e92-fcb62c0a3abc",
    "slug": "kim-ai",
    "name": "Kimai",
    "description": "Toggl Alternative. Open source time tracking, timesheets and invoicing",
    "url": "https://railway.com/deploy/kim-ai",
    "upstream": {
      "image": "kimai/kimai2:apache"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "kimai",
      "source": {
        "image": "kimai/kimai2:apache"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/kimai/var",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Private hostname, never publicly exposed",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "MySQL port on the private network",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "Superuser; give the app a scoped user instead",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Private-network connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_USER",
      "service": "MySQL",
      "description": "Superuser; give the app a scoped user instead",
      "secret": false,
      "strategy": "default",
      "default": "kimai"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Alias of the root password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Database created on first init",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PASSWORD",
      "service": "MySQL",
      "description": "Alias of the root password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "External connection string; empty host/port until a TCP proxy exists",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password, generated once at init — read only when the data dir is created",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "kimai",
      "description": "Apache listen port, fixed by image",
      "secret": false,
      "strategy": "default",
      "default": "8001"
    },
    {
      "key": "ADMINMAIL",
      "service": "kimai",
      "description": "Email of first super-admin",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "ADMINPASS",
      "service": "kimai",
      "description": "Password for username admin",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_SECRET",
      "service": "kimai",
      "description": "Signs sessions and CSRF tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MAILER_URL",
      "service": "kimai",
      "description": "SMTP DSN; null discards all mail",
      "secret": false,
      "strategy": "default",
      "default": "null://null"
    },
    {
      "key": "DEFAULT_URI",
      "service": "kimai",
      "description": "Public base URL for generated links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MAILER_FROM",
      "service": "kimai",
      "description": "Sender address on outgoing mail",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "kimai",
      "description": "MySQL connection DSN",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TRUSTED_PROXIES",
      "service": "kimai",
      "description": "Trust Railway edge for client IP",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0/0,::/0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "kim-ai"
      }
    },
    "cli": "railway deploy --template kim-ai",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7feabb74-117a-4f42-8e92-fcb62c0a3abc",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "145b4eac-569a-4cbc-8f29-515312a90f36": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Private hostname, never publicly exposed",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MySQL port on the private network",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Superuser; give the app a scoped user instead",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Private-network connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "Superuser; give the app a scoped user instead",
                      "defaultValue": "kimai"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Alias consumers reference as ${{MySQL.MYSQLDATABASE}}",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Alias of the root password",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created on first init",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PASSWORD": {
                      "isOptional": false,
                      "description": "Alias of the root password",
                      "defaultValue": "{{MYSQL_PASSWORD}}"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "description": "External connection string; empty host/port until a TCP proxy exists",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, generated once at init — read only when the data dir is created",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "145b4eac-569a-4cbc-8f29-515312a90f36": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "a9fe84db-072c-45f7-aab3-6e90d61effaf": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/kimai.svg",
                  "name": "kimai",
                  "deploy": {
                    "startCommand": "/bin/bash -c 'echo \"boot: mpm modules before =\"$(ls /etc/apache2/mods-enabled/ | grep -i mpm | tr \"\\n\" \" \"); a2dismod mpm_event mpm_worker >/dev/null 2>&1 || true; rm -f /etc/apache2/mods-enabled/mpm_event.* /etc/apache2/mods-enabled/mpm_worker.*; a2enmod mpm_prefork >/dev/null 2>&1 || true; echo \"boot: mpm modules after =\"$(ls /etc/apache2/mods-enabled/ | grep -i mpm | tr \"\\n\" \" \"); exec /entrypoint.sh'",
                    "healthcheckPath": "/en/login",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "kimai/kimai2:apache"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Apache listen port, fixed by image",
                      "defaultValue": "8001"
                    },
                    "ADMINMAIL": {
                      "isOptional": false,
                      "description": "Email of first super-admin",
                      "defaultValue": "admin@example.com"
                    },
                    "ADMINPASS": {
                      "isOptional": false,
                      "description": "Password for username admin",
                      "defaultValue": "{{ADMINPASS}}"
                    },
                    "APP_SECRET": {
                      "isOptional": false,
                      "description": "Signs sessions and CSRF tokens",
                      "defaultValue": "{{APP_SECRET}}"
                    },
                    "MAILER_URL": {
                      "description": "SMTP DSN; null discards all mail",
                      "defaultValue": "null://null"
                    },
                    "DEFAULT_URI": {
                      "isOptional": false,
                      "description": "Public base URL for generated links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MAILER_FROM": {
                      "isOptional": false,
                      "description": "Sender address on outgoing mail",
                      "defaultValue": "kimai@${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "MySQL connection DSN",
                      "defaultValue": "mysql://${{MySQL.MYSQL_USER}}:${{MySQL.MYSQL_PASSWORD}}@${{MySQL.RAILWAY_PRIVATE_DOMAIN}}:3306/${{MySQL.MYSQL_DATABASE}}?charset=utf8mb4&serverVersion=9.4.0"
                    },
                    "TRUSTED_PROXIES": {
                      "isOptional": false,
                      "description": "Trust Railway edge for client IP",
                      "defaultValue": "0.0.0.0/0,::/0"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8001": {
                        "port": 8001
                      }
                    }
                  },
                  "volumeMounts": {
                    "a9fe84db-072c-45f7-aab3-6e90d61effaf": {
                      "mountPath": "/opt/kimai/var"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "kimai",
      "method": "GET",
      "path": "/en/login",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-05T17:54:19.086Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-04T12:55:31.028Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c35afea30c1742fb80ac",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 92,
    "typical_build_seconds": 0,
    "typical_start_seconds": 40,
    "slowest_service": "kimai"
  }
}
