{
  "manifest_version": "1.0.0",
  "template": {
    "id": "92112bd5-9cbe-4c23-ad93-11ea0779be26",
    "slug": "camofox-browser",
    "name": "camofox-browser",
    "description": "Camoufox — anti-detection browser automation for stealth scraping",
    "url": "https://railway.com/deploy/camofox-browser",
    "upstream": {
      "repo_url": "https://github.com/INAPP-Mobile/camofox-browser"
    }
  },
  "services": [
    {
      "name": "camofox-browser",
      "source": {
        "repo": "https://github.com/INAPP-Mobile/camofox-browser"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/profiles",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "camofox-browser",
      "description": "Port the Camofox Browser server listens on. Railway injects this automatically.",
      "secret": false,
      "strategy": "default",
      "default": "9377"
    },
    {
      "key": "MAX_SESSIONS",
      "service": "camofox-browser",
      "description": "Maximum number of concurrent browser sessions. Each session uses significant memory (500MB+). Reduce if memory-constrained.",
      "secret": false,
      "strategy": "default",
      "default": "50"
    },
    {
      "key": "CAMOFOX_API_KEY",
      "service": "camofox-browser",
      "description": "API key for authentication. Auto-generated on deploy. Set to empty string to disable auth (anyone with the URL can use the service).",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CAMOFOX_ADMIN_KEY",
      "service": "camofox-browser",
      "description": "Admin key for privileged operations (stats, management). Auto-generated on deploy. Set to empty string to disable admin endpoints.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CAMOFOX_INTERACTIVE",
      "service": "camofox-browser",
      "description": "Interactive mode: 'off' (headless only), 'desktop' (always interactive), 'novnc' (VNC via browser), 'auto' (detect based on capabilities).",
      "secret": false,
      "strategy": "default",
      "default": "off"
    },
    {
      "key": "CAMOFOX_PROFILE_DIR",
      "service": "camofox-browser",
      "description": "Directory for storing browser profiles (cookies, localStorage, IndexedDB). Set to /data/profiles to use a Railway volume for persistence across restarts.",
      "secret": false,
      "strategy": "default",
      "default": "/data/profiles"
    },
    {
      "key": "BROWSER_IDLE_TIMEOUT_MS",
      "service": "camofox-browser",
      "description": "Browser idle timeout in milliseconds (5 minutes). Browsers with no activity are shut down to save resources.",
      "secret": false,
      "strategy": "default",
      "default": "300000"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "camofox-browser"
      }
    },
    "cli": "railway deploy --template camofox-browser",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "92112bd5-9cbe-4c23-ad93-11ea0779be26",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "f2e94db0-b261-4e56-9e66-f4016838fc99": {
                  "icon": null,
                  "name": "camofox-browser",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/INAPP-Mobile/camofox-browser",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the Camofox Browser server listens on. Railway injects this automatically.",
                      "defaultValue": "9377"
                    },
                    "MAX_SESSIONS": {
                      "description": "Maximum number of concurrent browser sessions. Each session uses significant memory (500MB+). Reduce if memory-constrained.",
                      "defaultValue": "50"
                    },
                    "CAMOFOX_API_KEY": {
                      "description": "API key for authentication. Auto-generated on deploy. Set to empty string to disable auth (anyone with the URL can use the service).",
                      "defaultValue": "{{CAMOFOX_API_KEY}}"
                    },
                    "CAMOFOX_ADMIN_KEY": {
                      "description": "Admin key for privileged operations (stats, management). Auto-generated on deploy. Set to empty string to disable admin endpoints.",
                      "defaultValue": "{{CAMOFOX_ADMIN_KEY}}"
                    },
                    "CAMOFOX_INTERACTIVE": {
                      "description": "Interactive mode: 'off' (headless only), 'desktop' (always interactive), 'novnc' (VNC via browser), 'auto' (detect based on capabilities).",
                      "defaultValue": "off"
                    },
                    "CAMOFOX_PROFILE_DIR": {
                      "description": "Directory for storing browser profiles (cookies, localStorage, IndexedDB). Set to /data/profiles to use a Railway volume for persistence across restarts.",
                      "defaultValue": "/data/profiles"
                    },
                    "BROWSER_IDLE_TIMEOUT_MS": {
                      "description": "Browser idle timeout in milliseconds (5 minutes). Browsers with no activity are shut down to save resources.",
                      "defaultValue": "300000"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:9377": {
                        "port": 9377
                      }
                    }
                  },
                  "volumeMounts": {
                    "f2e94db0-b261-4e56-9e66-f4016838fc99": {
                      "mountPath": "/data/profiles"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T15:43:15.688Z",
  "success_rate_30d": 0.8333,
  "validation": {
    "last_run_id": "run_2bc1e39a4cb84729aaef",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 273,
    "typical_build_seconds": 204,
    "typical_start_seconds": 20,
    "slowest_service": "camofox-browser"
  }
}
