{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dd4599d7-fb67-455b-9773-9dd0eca57d96",
    "slug": "cairn",
    "name": "Cairn",
    "description": "Your own self-hosted coach for training, nutrition and longevity.",
    "url": "https://railway.com/deploy/cairn",
    "upstream": {
      "image": "ghcr.io/zilet/cairn:latest"
    }
  },
  "services": [
    {
      "name": "cairn",
      "source": {
        "image": "ghcr.io/zilet/cairn:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "cairn",
      "description": "The port Cairn listens on.",
      "secret": false,
      "strategy": "default",
      "default": "8787"
    },
    {
      "key": "CAIRN_PLATFORM",
      "service": "cairn",
      "description": "Tells Cairn how it was deployed.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "CAIRN_AUTH_TOKEN",
      "service": "cairn",
      "description": "Your sign-in token. Copy it from this tab to sign in; it is also your recovery key.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CAIRN_FEEDBACK_URL",
      "service": "cairn",
      "description": "Where Send feedback delivers (only when you press Send). Delete it to open a GitHub issue instead.",
      "secret": false,
      "strategy": "default",
      "default": "https://feedback.cairn.fit"
    },
    {
      "key": "CAIRN_REQUIRE_AUTH",
      "service": "cairn",
      "description": "Refuse to start without a token: a Railway URL is public.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CAIRN_BLANK_PROFILE",
      "service": "cairn",
      "description": "Start with an empty profile, with no demo data.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CAIRN_SINGLE_VOLUME",
      "service": "cairn",
      "description": "Keep sign-ins and AI tools on the one volume at /data.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CAIRN_MAX_AGENT_PROCS",
      "service": "cairn",
      "description": "Runs one background AI task at a time to keep memory low.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "CAIRN_SETTINGS_SECRET_KEY",
      "service": "cairn",
      "description": "Encrypts stored integration passwords. Leave it as generated.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "cairn"
      }
    },
    "cli": "railway deploy --template cairn",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dd4599d7-fb67-455b-9773-9dd0eca57d96",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3b8d0262-26f7-44fb-9cf6-f6631588bbe8": {
                  "icon": null,
                  "name": "cairn",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/zilet/cairn:latest",
                    "autoUpdates": {
                      "type": "patch",
                      "schedule": [
                        {
                          "day": 0,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 1,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 2,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 3,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 4,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 5,
                          "endHour": 6,
                          "startHour": 2
                        },
                        {
                          "day": 6,
                          "endHour": 6,
                          "startHour": 2
                        }
                      ]
                    }
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "The port Cairn listens on.",
                      "defaultValue": "8787"
                    },
                    "CAIRN_PLATFORM": {
                      "isOptional": false,
                      "description": "Tells Cairn how it was deployed.",
                      "defaultValue": "railway"
                    },
                    "CAIRN_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Your sign-in token. Copy it from this tab to sign in; it is also your recovery key.",
                      "defaultValue": "{{CAIRN_AUTH_TOKEN}}"
                    },
                    "CAIRN_FEEDBACK_URL": {
                      "isOptional": false,
                      "description": "Where Send feedback delivers (only when you press Send). Delete it to open a GitHub issue instead.",
                      "defaultValue": "https://feedback.cairn.fit"
                    },
                    "CAIRN_REQUIRE_AUTH": {
                      "isOptional": false,
                      "description": "Refuse to start without a token: a Railway URL is public.",
                      "defaultValue": "1"
                    },
                    "CAIRN_BLANK_PROFILE": {
                      "isOptional": false,
                      "description": "Start with an empty profile, with no demo data.",
                      "defaultValue": "1"
                    },
                    "CAIRN_SINGLE_VOLUME": {
                      "isOptional": false,
                      "description": "Keep sign-ins and AI tools on the one volume at /data.",
                      "defaultValue": "1"
                    },
                    "CAIRN_MAX_AGENT_PROCS": {
                      "isOptional": false,
                      "description": "Runs one background AI task at a time to keep memory low.",
                      "defaultValue": "1"
                    },
                    "CAIRN_SETTINGS_SECRET_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored integration passwords. Leave it as generated.",
                      "defaultValue": "{{CAIRN_SETTINGS_SECRET_KEY}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8787": {
                        "port": 8787
                      }
                    }
                  },
                  "volumeMounts": {
                    "3b8d0262-26f7-44fb-9cf6-f6631588bbe8": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "cairn",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-08T16:14:40.577Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-08T14:11:37.576Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c931f73415884f24a9ff",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 58,
    "typical_build_seconds": 0,
    "typical_start_seconds": 42,
    "slowest_service": "cairn"
  }
}
