{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2959abc1-7def-4c53-8fb4-4cf3417d5a16",
    "slug": "ubuntu-ssh-and-ai-cli-starter",
    "name": "Ubuntu SSH and AI CLI Starter",
    "description": "SSH development container with generated credentials and durable workspace.",
    "url": "https://railway.com/deploy/ubuntu-ssh-and-ai-cli-starter",
    "upstream": {
      "repo_url": "https://github.com/parham7991/railway-ubuntu-ssh-claude"
    }
  },
  "services": [
    {
      "name": "ubuntu(ssh+claude)",
      "source": {
        "repo": "https://github.com/parham7991/railway-ubuntu-ssh-claude"
      },
      "needs_volume": true,
      "volume_mount_path": "/workspace",
      "tcp_ports": [
        22
      ],
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "APP_LANG",
      "service": "ubuntu(ssh+claude)",
      "description": "Runtime message language: en or fa. / زبان پیام‌ها: en یا fa.",
      "secret": false,
      "strategy": "default",
      "default": "en"
    },
    {
      "key": "SSH_PASSWORD",
      "service": "ubuntu(ssh+claude)",
      "description": "Generated password for the optional operator account.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SSH_USERNAME",
      "service": "ubuntu(ssh+claude)",
      "description": "Provide a value for SSH_USERNAME.",
      "secret": false,
      "strategy": "default",
      "default": "operator"
    },
    {
      "key": "ROOT_PASSWORD",
      "service": "ubuntu(ssh+claude)",
      "description": "Generated root SSH password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ubuntu-ssh-and-ai-cli-starter"
      }
    },
    "cli": "railway deploy --template ubuntu-ssh-and-ai-cli-starter",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2959abc1-7def-4c53-8fb4-4cf3417d5a16",
            "serializedConfig": {
              "services": {
                "e35308e3-7771-59cf-a179-940ca594d757": {
                  "icon": "https://www.svgrepo.com/show/354481/ubuntu.svg",
                  "name": "ubuntu(ssh+claude)",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'mkdir -p /workspace && chown 1000:1000 /workspace && python3 -c '\"'\"'import pathlib\np=pathlib.Path('\"'\"'\"'\"'\"'\"'\"'\"'/usr/local/bin/ssh-user-config.sh'\"'\"'\"'\"'\"'\"'\"'\"')\ntext=p.read_text()\ntext=text.replace('\"'\"'\"'\"'\"'\"'\"'\"'configure_claude_settings() {'\"'\"'\"'\"'\"'\"'\"'\"', '\"'\"'\"'\"'\"'\"'\"'\"'configure_claude_settings() {'\"'\"'\"'\"'\"'\"'\"'\"' + chr(10) + '\"'\"'\"'\"'\"'\"'\"'\"'    return 0'\"'\"'\"'\"'\"'\"'\"'\"' + chr(10))\np.write_text(text)\npathlib.Path('\"'\"'\"'\"'\"'\"'\"'\"'/root/.claude'\"'\"'\"'\"'\"'\"'\"'\"').mkdir(exist_ok=True)\npathlib.Path('\"'\"'\"'\"'\"'\"'\"'\"'/root/.claude/settings.json'\"'\"'\"'\"'\"'\"'\"'\"').write_text('\"'\"'\"'\"'\"'\"'\"'\"'{}'\"'\"'\"'\"'\"'\"'\"'\"')\n'\"'\"' && exec /usr/local/bin/ssh-user-config.sh'",
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "repo": "parham7991/railway-ubuntu-ssh-claude",
                    "branch": "main",
                    "commitSha": "1067e8aa8c2648698d6f014d885c445ede5b2270",
                    "rootDirectory": null
                  },
                  "variables": {
                    "APP_LANG": {
                      "isOptional": true,
                      "description": "Runtime message language: en or fa. / زبان پیام‌ها: en یا fa.",
                      "defaultValue": "en"
                    },
                    "GITHUB_TOKEN": {
                      "isOptional": true,
                      "description": "GitHub token (repo scope). When set, /root/src is auto-backed up to a private repo ara-tm-src-<id> and restored on every redeploy — your files survive container rebuilds. / توکن GitHub (scope: repo). وقتی ست شود، پوشه src به صورت خودکار در مخزنی خصوصی پشتیبان‌گیری و روی هر بازسازی بازیابی می‌شود.",
                      "defaultValue": ""
                    },
                    "SSH_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the optional operator account.",
                      "defaultValue": "{{SSH_PASSWORD}}"
                    },
                    "SSH_USERNAME": {
                      "isOptional": false,
                      "description": "",
                      "defaultValue": "operator"
                    },
                    "ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated root SSH password.",
                      "defaultValue": "{{ROOT_PASSWORD}}"
                    },
                    "AUTHORIZED_KEYS": {
                      "isOptional": true,
                      "description": "SSH public key(s) for root key-based auth (password login stays on). / کلید(های) عمومی SSH برای root.",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "22": {}
                    }
                  },
                  "volumeMounts": {
                    "bc49d374-733a-55bf-9439-7b2816b28d86": {
                      "mountPath": "/workspace"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-18T10:14:45.913Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-18T09:06:48.185Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_e79e8e8c5feb4822a4d8",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 387,
    "typical_build_seconds": 267,
    "typical_start_seconds": 10,
    "slowest_service": "ubuntu(ssh+claude)"
  }
}
