{
  "manifest_version": "1.0.0",
  "template": {
    "id": "5a5dbb5d-e2fa-4720-9d48-9f78ea5a5a1b",
    "slug": "tubearchivist",
    "name": "TubeArchivist | Your Own YouTube Archive",
    "description": "Self-hosted YouTube archive: subscribe, download, search, stream ad-free.",
    "url": "https://railway.com/deploy/tubearchivist",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/tubearchivist-railway"
    }
  },
  "services": [
    {
      "name": "tubearchivist",
      "source": {
        "repo": "https://github.com/nomideusz/tubearchivist-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "archivist-redis",
      "source": {
        "image": "redis:7"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "archivist-es",
      "source": {
        "repo": "https://github.com/nomideusz/tubearchivist-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/usr/share/elasticsearch/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "tubearchivist",
      "description": "Time zone for download schedules.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "tubearchivist",
      "description": "Port for Railway healthcheck probing. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "ES_URL",
      "service": "tubearchivist",
      "description": "Elasticsearch connection. Do not change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TA_HOST",
      "service": "tubearchivist",
      "description": "Public URL of this instance. Do not change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_CON",
      "service": "tubearchivist",
      "description": "Redis connection. Do not change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "TA_PASSWORD",
      "service": "tubearchivist",
      "description": "Initial admin password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "TA_USERNAME",
      "service": "tubearchivist",
      "description": "Initial admin username.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "ELASTIC_PASSWORD",
      "service": "tubearchivist",
      "description": "Elasticsearch password, shared with the archivist-es service. Do not change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ELASTIC_PASSWORD",
      "service": "archivist-es",
      "description": "Elasticsearch password, shared with the tubearchivist service.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "tubearchivist"
      }
    },
    "cli": "railway deploy --template tubearchivist",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "5a5dbb5d-e2fa-4720-9d48-9f78ea5a5a1b",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "74277d54-245d-487a-95a0-10bbb57b6c18": {
                  "icon": "https://raw.githubusercontent.com/tubearchivist/tubearchivist/master/assets/tube-archivist-logo-dark.png",
                  "name": "tubearchivist",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 900,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/tubearchivist-railway",
                    "rootDirectory": "ta"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Time zone for download schedules.",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Port for Railway healthcheck probing. Do not change.",
                      "defaultValue": "8000"
                    },
                    "ES_URL": {
                      "isOptional": false,
                      "description": "Elasticsearch connection. Do not change.",
                      "defaultValue": "http://${{archivist-es.RAILWAY_PRIVATE_DOMAIN}}:9200"
                    },
                    "TA_HOST": {
                      "isOptional": false,
                      "description": "Public URL of this instance. Do not change.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "REDIS_CON": {
                      "isOptional": false,
                      "description": "Redis connection. Do not change.",
                      "defaultValue": "redis://${{archivist-redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "TA_PASSWORD": {
                      "isOptional": false,
                      "description": "Initial admin password.",
                      "defaultValue": "{{TA_PASSWORD}}"
                    },
                    "TA_USERNAME": {
                      "isOptional": false,
                      "description": "Initial admin username.",
                      "defaultValue": "admin"
                    },
                    "ELASTIC_PASSWORD": {
                      "isOptional": false,
                      "description": "Elasticsearch password, shared with the archivist-es service. Do not change.",
                      "defaultValue": "${{archivist-es.ELASTIC_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  },
                  "volumeMounts": {
                    "74277d54-245d-487a-95a0-10bbb57b6c18": {
                      "mountPath": "/data"
                    }
                  }
                },
                "e74fbda1-9f31-4d2f-902b-df16228e3f8c": {
                  "icon": "https://raw.githubusercontent.com/docker-library/docs/master/redis/logo.png",
                  "name": "archivist-redis",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7"
                  },
                  "variables": {},
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "e74fbda1-9f31-4d2f-902b-df16228e3f8c": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "f9441d81-c794-497d-b374-e990bdbbe1ca": {
                  "icon": "https://raw.githubusercontent.com/tubearchivist/tubearchivist/master/assets/tube-archivist-logo-dark.png",
                  "name": "archivist-es",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/tubearchivist-railway",
                    "rootDirectory": "es"
                  },
                  "variables": {
                    "ELASTIC_PASSWORD": {
                      "isOptional": false,
                      "description": "Elasticsearch password, shared with the tubearchivist service.",
                      "defaultValue": "{{ELASTIC_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "f9441d81-c794-497d-b374-e990bdbbe1ca": {
                      "mountPath": "/usr/share/elasticsearch/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "tubearchivist",
      "method": "GET",
      "path": "/healthcheck",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-11T10:14:37.526Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-10T23:11:05.462Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c00f9b1ab7304b11bdb2",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 163,
    "typical_build_seconds": 47,
    "typical_start_seconds": 32,
    "slowest_service": "tubearchivist"
  }
}
