{
  "manifest_version": "1.0.0",
  "template": {
    "id": "03439f01-953a-4a2a-825b-3a8205133f9f",
    "slug": "r2r",
    "name": "R2R | The most advanced AI retrieval system by SciPhi",
    "description": "Self-Host R2R. Agentic RAG, hybrid search, document management with API",
    "url": "https://railway.com/deploy/r2r",
    "upstream": {
      "image": "pgvector/pgvector:pg18"
    }
  },
  "services": [
    {
      "name": "graph-clustering",
      "source": {
        "image": "ragtoriches/cluster-prod"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "pgvector",
      "source": {
        "image": "pgvector/pgvector:pg18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": true
    },
    {
      "name": "R2R-API",
      "source": {
        "image": "sciphiai/r2r:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "R2R-Dashboard",
      "source": {
        "image": "sciphiai/r2r-dashboard:1.0.3"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "pgvector",
      "description": "Location where PostgreSQL stores data files",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "pgvector",
      "description": "Public host/domain used to connect to Postgres.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "pgvector",
      "description": "Public port exposed for Postgres connections.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "pgvector",
      "description": "Username for PostgreSQL authentication.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "pgvector",
      "description": "Default Postgres database name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "pgvector",
      "description": "Password for the Postgres user.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "pgvector",
      "description": "Name of the database created on startup.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "pgvector",
      "description": "Full public connection string for Postgres.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_USER",
      "service": "pgvector",
      "description": "Postgres superuser name.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "pgvector",
      "description": "Validity period for generated SSL certificates.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "PGHOST_PRIVATE",
      "service": "pgvector",
      "description": "Private internal domain for Postgres in Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT_PRIVATE",
      "service": "pgvector",
      "description": "Private internal port for Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "pgvector",
      "description": "Password for the Postgres superuser.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_URL_PRIVATE",
      "service": "pgvector",
      "description": "Full private connection string for internal services.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "pgvector",
      "description": "Time to wait before shutting down old deployments.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "R2R-API",
      "description": "Railway port detection",
      "secret": false,
      "strategy": "default",
      "default": "7272"
    },
    {
      "key": "R2R_HOST",
      "service": "R2R-API",
      "description": "Bind to all interfaces",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "R2R_PORT",
      "service": "R2R-API",
      "description": "API server listening port",
      "secret": false,
      "strategy": "default",
      "default": "7272"
    },
    {
      "key": "R2R_LOG_LEVEL",
      "service": "R2R-API",
      "description": "Logging verbosity",
      "secret": false,
      "strategy": "default",
      "default": "INFO"
    },
    {
      "key": "R2R_SECRET_KEY",
      "service": "R2R-API",
      "description": "API encryption signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "R2R_PROJECT_NAME",
      "service": "R2R-API",
      "description": "Project namespace",
      "secret": false,
      "strategy": "default",
      "default": "r2r_default"
    },
    {
      "key": "R2R_POSTGRES_HOST",
      "service": "R2R-API",
      "description": "Internal Postgres hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "R2R_POSTGRES_PORT",
      "service": "R2R-API",
      "description": "Postgres connection port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "R2R_POSTGRES_USER",
      "service": "R2R-API",
      "description": "Postgres user reference",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "R2R_POSTGRES_DBNAME",
      "service": "R2R-API",
      "description": "Postgres database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "R2R_POSTGRES_PASSWORD",
      "service": "R2R-API",
      "description": "Postgres password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CLUSTERING_SERVICE_URL",
      "service": "R2R-API",
      "description": "Graph clustering endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "HATCHET_CLIENT_TLS_STRATEGY",
      "service": "R2R-API",
      "description": "Disable Hatchet TLS",
      "secret": false,
      "strategy": "default",
      "default": "none"
    },
    {
      "key": "R2R_POSTGRES_MAX_CONNECTIONS",
      "service": "R2R-API",
      "description": "Connection pool limit",
      "secret": false,
      "strategy": "default",
      "default": "256"
    },
    {
      "key": "PORT",
      "service": "R2R-Dashboard",
      "description": "Dashboard listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NEXT_PUBLIC_R2R_DEFAULT_EMAIL",
      "service": "R2R-Dashboard",
      "description": "Dashboard default login email",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "NEXT_PUBLIC_R2R_DEPLOYMENT_URL",
      "service": "R2R-Dashboard",
      "description": "R2R API URL for dashboard",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_R2R_DEFAULT_PASSWORD",
      "service": "R2R-Dashboard",
      "description": "Dashboard default login password",
      "secret": true,
      "strategy": "default",
      "default": "change_me_immediately"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "r2r"
      }
    },
    "cli": "railway deploy --template r2r",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "03439f01-953a-4a2a-825b-3a8205133f9f",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "25f52f52-0ade-4632-a17c-e4ddb9b89629": {
                  "icon": null,
                  "name": "graph-clustering",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ragtoriches/cluster-prod"
                  },
                  "variables": {}
                },
                "277e5d4e-6b6b-42b1-9dfa-a97e8c320818": {
                  "icon": "https://devicons.railway.app/postgres",
                  "name": "pgvector",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"unset PGPORT; docker-entrypoint.sh postgres --port=5432\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "pgvector/pgvector:pg18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where PostgreSQL stores data files",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Public host/domain used to connect to Postgres.",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Public port exposed for Postgres connections.",
                      "defaultValue": "${{RAILWAY_TCP_PROXY_PORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for PostgreSQL authentication.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default Postgres database name.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Postgres user.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Name of the database created on startup.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Full public connection string for Postgres.",
                      "defaultValue": "postgres://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser name.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity period for generated SSL certificates.",
                      "defaultValue": "820"
                    },
                    "PGHOST_PRIVATE": {
                      "isOptional": false,
                      "description": "Private internal domain for Postgres in Railway.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT_PRIVATE": {
                      "isOptional": false,
                      "description": "Private internal port for Postgres.",
                      "defaultValue": "5432"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the Postgres superuser.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_URL_PRIVATE": {
                      "isOptional": false,
                      "description": "Full private connection string for internal services.",
                      "defaultValue": "postgres://${{PGUSER}}:${{PGPASSWORD}}@${{PGHOST_PRIVATE}}:${{PGPORT_PRIVATE}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time to wait before shutting down old deployments.",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "277e5d4e-6b6b-42b1-9dfa-a97e8c320818": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "711b2ddd-f13d-48fc-b678-8fcd9fd2a4a3": {
                  "icon": "https://res.cloudinary.com/asset-cloudinary/image/upload/v1777645933/c3b41471-625e-458d-8f1a-13e8c16a8699.png",
                  "name": "R2R-API",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "sciphiai/r2r:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway port detection",
                      "defaultValue": "7272"
                    },
                    "R2R_HOST": {
                      "isOptional": false,
                      "description": "Bind to all interfaces",
                      "defaultValue": "0.0.0.0"
                    },
                    "R2R_PORT": {
                      "isOptional": false,
                      "description": "API server listening port",
                      "defaultValue": "7272"
                    },
                    "R2R_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Logging verbosity",
                      "defaultValue": "INFO"
                    },
                    "R2R_SECRET_KEY": {
                      "isOptional": false,
                      "description": "API encryption signing key",
                      "defaultValue": "{{R2R_SECRET_KEY}}"
                    },
                    "R2R_PROJECT_NAME": {
                      "isOptional": false,
                      "description": "Project namespace",
                      "defaultValue": "r2r_default"
                    },
                    "R2R_POSTGRES_HOST": {
                      "isOptional": false,
                      "description": "Internal Postgres hostname",
                      "defaultValue": "${{pgvector.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "R2R_POSTGRES_PORT": {
                      "isOptional": false,
                      "description": "Postgres connection port",
                      "defaultValue": "5432"
                    },
                    "R2R_POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres user reference",
                      "defaultValue": "${{pgvector.POSTGRES_USER}}"
                    },
                    "R2R_POSTGRES_DBNAME": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "${{pgvector.POSTGRES_DB}}"
                    },
                    "R2R_POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password reference",
                      "defaultValue": "${{pgvector.POSTGRES_PASSWORD}}"
                    },
                    "CLUSTERING_SERVICE_URL": {
                      "isOptional": false,
                      "description": "Graph clustering endpoint",
                      "defaultValue": "http://${{graph-clustering.RAILWAY_PRIVATE_DOMAIN}}:7276"
                    },
                    "HATCHET_CLIENT_TLS_STRATEGY": {
                      "isOptional": false,
                      "description": "Disable Hatchet TLS",
                      "defaultValue": "none"
                    },
                    "R2R_POSTGRES_MAX_CONNECTIONS": {
                      "isOptional": false,
                      "description": "Connection pool limit",
                      "defaultValue": "256"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "f1584686-a8a0-4391-9cb3-9ba40601ec21": {
                  "icon": "https://res.cloudinary.com/asset-cloudinary/image/upload/v1777645933/c3b41471-625e-458d-8f1a-13e8c16a8699.png",
                  "name": "R2R-Dashboard",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "sciphiai/r2r-dashboard:1.0.3"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Dashboard listening port",
                      "defaultValue": "3000"
                    },
                    "NEXT_PUBLIC_R2R_DEFAULT_EMAIL": {
                      "isOptional": false,
                      "description": "Dashboard default login email",
                      "defaultValue": "admin@example.com"
                    },
                    "NEXT_PUBLIC_R2R_DEPLOYMENT_URL": {
                      "isOptional": false,
                      "description": "R2R API URL for dashboard",
                      "defaultValue": "https://${{R2R-API.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_R2R_DEFAULT_PASSWORD": {
                      "isOptional": false,
                      "description": "Dashboard default login password",
                      "defaultValue": "change_me_immediately"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T22:14:44.200Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T12:52:53.447Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_4d870c9c1c6a48c09a22",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 79,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "R2R-Dashboard"
  }
}
