{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9972fc84-fd17-4df8-8e26-bf97443eb553",
    "slug": "peertube",
    "name": "PeerTube",
    "description": "Decentralized video platform — uploads, transcoding, live streaming.",
    "url": "https://railway.com/deploy/peertube",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/peertube-railway"
    }
  },
  "services": [
    {
      "name": "peertube",
      "source": {
        "repo": "https://github.com/nomideusz/peertube-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:7-alpine"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "peertube",
      "description": "Port for Railway healthcheck probing. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "NODE_CONFIG_DIR",
      "service": "peertube",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "/app/config:/app/support/docker/production/config:/data/config"
    },
    {
      "key": "PEERTUBE_DB_SSL",
      "service": "peertube",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PEERTUBE_SECRET",
      "service": "peertube",
      "description": "Server secret. Auto generated.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PEERTUBE_DB_NAME",
      "service": "peertube",
      "description": "Wired automatically. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PEERTUBE_DB_PORT",
      "service": "peertube",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PEERTUBE_ADMIN_EMAIL",
      "service": "peertube",
      "description": "Email for the root admin account — change to yours.",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "PEERTUBE_DB_HOSTNAME",
      "service": "peertube",
      "description": "Wired automatically to the postgres service. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PEERTUBE_DB_PASSWORD",
      "service": "peertube",
      "description": "Wired automatically. Don't change.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PEERTUBE_DB_USERNAME",
      "service": "peertube",
      "description": "Wired automatically. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PEERTUBE_LOCAL_CONFIG",
      "service": "peertube",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "/data/config"
    },
    {
      "key": "PEERTUBE_REDIS_HOSTNAME",
      "service": "peertube",
      "description": "Wired automatically to the redis service. Don't change.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PT_INITIAL_ROOT_PASSWORD",
      "service": "peertube",
      "description": "Password for the root admin account. Auto generated.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PEERTUBE_WEBSERVER_HOSTNAME",
      "service": "peertube",
      "description": "Instance hostname — your federated identity. Wired automatically.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "peertube"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Don't change.",
      "secret": false,
      "strategy": "default",
      "default": "peertube"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Database password. Auto generated.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "peertube"
      }
    },
    "cli": "railway deploy --template peertube",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9972fc84-fd17-4df8-8e26-bf97443eb553",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "57095b9a-32e2-4008-8b2d-a2e5b84cd8a9": {
                  "icon": "https://joinpeertube.org/img/icons/apple-touch-icon.png",
                  "name": "peertube",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v1/config",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/peertube-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port for Railway healthcheck probing. Do not change.",
                      "defaultValue": "9000"
                    },
                    "NODE_CONFIG_DIR": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "/app/config:/app/support/docker/production/config:/data/config"
                    },
                    "PEERTUBE_DB_SSL": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "false"
                    },
                    "PEERTUBE_SECRET": {
                      "isOptional": false,
                      "description": "Server secret. Auto generated.",
                      "defaultValue": "{{PEERTUBE_SECRET}}"
                    },
                    "PEERTUBE_DB_NAME": {
                      "isOptional": false,
                      "description": "Wired automatically. Don't change.",
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "PEERTUBE_DB_PORT": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "5432"
                    },
                    "PEERTUBE_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Email for the root admin account — change to yours.",
                      "defaultValue": "admin@example.com"
                    },
                    "PEERTUBE_DB_HOSTNAME": {
                      "isOptional": false,
                      "description": "Wired automatically to the postgres service. Don't change.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PEERTUBE_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Wired automatically. Don't change.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "PEERTUBE_DB_USERNAME": {
                      "isOptional": false,
                      "description": "Wired automatically. Don't change.",
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "PEERTUBE_LOCAL_CONFIG": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "/data/config"
                    },
                    "PEERTUBE_REDIS_HOSTNAME": {
                      "isOptional": false,
                      "description": "Wired automatically to the redis service. Don't change.",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PT_INITIAL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the root admin account. Auto generated.",
                      "defaultValue": "{{PT_INITIAL_ROOT_PASSWORD}}"
                    },
                    "PEERTUBE_WEBSERVER_HOSTNAME": {
                      "isOptional": false,
                      "description": "Instance hostname — your federated identity. Wired automatically.",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "57095b9a-32e2-4008-8b2d-a2e5b84cd8a9": {
                      "mountPath": "/data"
                    }
                  }
                },
                "aac71de9-d689-4bb6-9782-784c2157ee09": {
                  "icon": "https://www.postgresql.org/media/img/about/press/elephant.png",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "peertube"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Don't change.",
                      "defaultValue": "peertube"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password. Auto generated.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "aac71de9-d689-4bb6-9782-784c2157ee09": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "eaec62ac-2bd9-469d-8083-1be6fe2fe55c": {
                  "icon": "https://media.ffycdn.net/us/redis/MAQLWqeBKmrz2TFQDmA7.svg?mod=v1/resize=2400",
                  "name": "redis",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh redis-server --save '' --appendonly no",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7-alpine"
                  },
                  "variables": {},
                  "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."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "peertube",
      "method": "GET",
      "path": "/api/v1/config",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-09T00:29:48.807Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_fbf2310ae93c4e7a8818",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 137,
    "typical_build_seconds": 61,
    "typical_start_seconds": 30,
    "slowest_service": "peertube"
  }
}
