{
  "manifest_version": "1.0.0",
  "template": {
    "id": "663557ba-1b50-4266-88f9-1ad73f9d3556",
    "slug": "buzz-by-block",
    "name": "Buzz by Block",
    "description": "Deploy and Host Buzz Relay on Railway",
    "url": "https://railway.com/deploy/buzz-by-block",
    "upstream": {
      "image": "ghcr.io/block/buzz:main"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Buzz Pair Relay",
      "source": {
        "image": "ghcr.io/block/buzz:main"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Buzz Relay",
      "source": {
        "image": "ghcr.io/block/buzz:main"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/git",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Port to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "User to connect to Redis.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis using the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Password to connect to Redis.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password generated for this deployment.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Connection string for connecting to redis externally",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_PAIR_RELAY_BIND_ADDR",
      "service": "Buzz Pair Relay",
      "description": "Address the pairing sidecar binds. Ephemeral in-memory relay for NIP-AB device pairing; stores nothing.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:5000"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "WAL_ARCHIVE_KEY",
      "service": "Postgres",
      "description": "Access key ID for the WAL archive bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAL_ARCHIVE_PATH",
      "service": "Postgres",
      "description": "Path within the archive bucket where WAL segments are stored.",
      "secret": false,
      "strategy": "default",
      "default": "/pgbackrest"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "WAL_ARCHIVE_BUCKET",
      "service": "Postgres",
      "description": "Bucket storing WAL archives for point-in-time recovery.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAL_ARCHIVE_REGION",
      "service": "Postgres",
      "description": "Region used for signing WAL archive requests.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAL_ARCHIVE_SECRET",
      "service": "Postgres",
      "description": "Secret access key for the WAL archive bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAL_ARCHIVE_ENDPOINT",
      "service": "Postgres",
      "description": "S3-compatible endpoint for the WAL archive bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Buzz Relay",
      "description": "Provide a value for PORT.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "RUST_LOG",
      "service": "Buzz Relay",
      "description": "Log level filter.",
      "secret": false,
      "strategy": "default",
      "default": "buzz_relay=info,buzz_db=info,buzz_auth=info,buzz_pubsub=info,tower_http=info"
    },
    {
      "key": "REDIS_URL",
      "service": "Buzz Relay",
      "description": "Redis connection string. Backs pub/sub fan-out, presence, and typing indicators.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RELAY_URL",
      "service": "Buzz Relay",
      "description": "Public WebSocket URL. Its host defines this relay's community identity.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Buzz Relay",
      "description": "Postgres connection string, auto-wired from the bundled Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_BIND_ADDR",
      "service": "Buzz Relay",
      "description": "Address the relay binds for WebSocket and HTTP traffic.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_S3_BUCKET",
      "service": "Buzz Relay",
      "description": "Bucket holding media uploads and git objects.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_S3_REGION",
      "service": "Buzz Relay",
      "description": "Region used for SigV4 request signing.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Buzz Relay",
      "description": "Required. The image runs as uid 1000 but Railway mounts volumes owned by root; without this the relay cannot write to /data/git and crash-loops.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "BUZZ_HEALTH_PORT",
      "service": "Buzz Relay",
      "description": "Port serving /_liveness and /_readiness, separate from the app port.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "BUZZ_S3_ENDPOINT",
      "service": "Buzz Relay",
      "description": "S3-compatible API endpoint for the media bucket.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_AUTO_MIGRATE",
      "service": "Buzz Relay",
      "description": "Apply database migrations on startup. Required for a fresh database.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BUZZ_CORS_ORIGINS",
      "service": "Buzz Relay",
      "description": "Comma-separated origins allowed to call the HTTP surface. The two tauri:// entries are the desktop app's webview origin (macOS/iOS and Windows/Linux) — without them the desktop app can't mint invites or load moderation data.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BUZZ_METRICS_PORT",
      "service": "Buzz Relay",
      "description": "Port serving Prometheus /metrics.",
      "secret": false,
      "strategy": "default",
      "default": "9102"
    },
    {
      "key": "BUZZ_GIT_REPO_PATH",
      "service": "Buzz Relay",
      "description": "Volume path for hosted git repositories. Must match the mounted volume.",
      "secret": false,
      "strategy": "default",
      "default": "/data/git"
    },
    {
      "key": "BUZZ_S3_ACCESS_KEY",
      "service": "Buzz Relay",
      "description": "S3 access key ID for the media bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BUZZ_S3_SECRET_KEY",
      "service": "Buzz Relay",
      "description": "S3 secret access key for the media bucket.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RELAY_OWNER_PUBKEY",
      "service": "Buzz Relay",
      "description": "Your Nostr PUBLIC key as 64-character hex. Becomes this relay's owner and only initial member. Never paste a secret key here.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BUZZ_MEDIA_BASE_URL",
      "service": "Buzz Relay",
      "description": "Public base URL media is served from. The relay streams blobs itself; clients never reach S3 directly.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BUZZ_ALLOW_NIP_OA_AUTH",
      "service": "Buzz Relay",
      "description": "Permit NIP-OA owner-attested authentication.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BUZZ_PAIRING_RELAY_URL",
      "service": "Buzz Relay",
      "description": "Dedicated pairing relay advertised via NIP-11. Desktop and mobile meet here for QR pairing; required because membership enforcement blocks unpaired devices from the main relay.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "BUZZ_RELAY_PRIVATE_KEY",
      "service": "Buzz Relay",
      "description": "The relay's own Nostr signing key. Signs channel metadata, membership rosters, and git manifests.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BUZZ_SERVE_GIT_WEB_GUI",
      "service": "Buzz Relay",
      "description": "Optional. Set true to serve the browser-based git repository browser.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "BUZZ_REQUIRE_AUTH_TOKEN",
      "service": "Buzz Relay",
      "description": "Require NIP-42 authentication. Disable only for a public, unauthenticated relay.",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BUZZ_GIT_HOOK_HMAC_SECRET",
      "service": "Buzz Relay",
      "description": "HMAC secret authenticating git hook callbacks.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BUZZ_GIT_CONFORMANCE_PROBE",
      "service": "Buzz Relay",
      "description": "Run the A3 object-store conformance probe at boot before admitting the git backend.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BUZZ_REQUIRE_RELAY_MEMBERSHIP",
      "service": "Buzz Relay",
      "description": "Restrict access to members of the relay membership list. Set false to run an open relay.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "buzz-by-block"
      }
    },
    "cli": "railway deploy --template buzz-by-block",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "663557ba-1b50-4266-88f9-1ad73f9d3556",
            "serializedConfig": {
              "buckets": {
                "1457cbf9-21ca-4f00-8383-54034206dabf": {
                  "name": "Postgres-PITR"
                },
                "a116c7e1-f8c3-40ae-b4ff-f57bf5f8381a": {
                  "name": "Buzz Media"
                }
              },
              "services": {
                "4f0c8fa3-8a19-45e4-b23b-6c17559eb709": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Redis.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "User to connect to Redis.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis using the private network",
                      "defaultValue": "redis://${{ REDISUSER }}:${{ REDIS_PASSWORD }}@${{ REDISHOST }}:${{ REDISPORT }}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to Redis.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password generated for this deployment.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Connection string for connecting to redis externally",
                      "defaultValue": "redis://default:${{ REDIS_PASSWORD }}@${{ RAILWAY_TCP_PROXY_DOMAIN }}:${{ RAILWAY_TCP_PROXY_PORT }}"
                    }
                  },
                  "volumeMounts": {
                    "4f0c8fa3-8a19-45e4-b23b-6c17559eb709": {
                      "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."
                  }
                },
                "51c126e8-c34f-465a-a347-f88b91f3b53c": {
                  "icon": "https://raw.githubusercontent.com/block/buzz/main/admin-web/public/favicon.svg",
                  "name": "Buzz Pair Relay",
                  "deploy": {
                    "startCommand": "/usr/local/bin/buzz-pair-relay"
                  },
                  "source": {
                    "image": "ghcr.io/block/buzz:main"
                  },
                  "variables": {
                    "BUZZ_PAIR_RELAY_BIND_ADDR": {
                      "description": "Address the pairing sidecar binds. Ephemeral in-memory relay for NIP-AB device pairing; stores nothing.",
                      "defaultValue": "0.0.0.0:5000"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5000": {
                        "port": 5000
                      }
                    }
                  }
                },
                "9922cba9-b459-4d31-9df2-1b1c3d8c6bff": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "WAL_ARCHIVE_KEY": {
                      "isOptional": false,
                      "description": "Access key ID for the WAL archive bucket.",
                      "defaultValue": "${{Postgres-PITR.ACCESS_KEY_ID}}"
                    },
                    "WAL_ARCHIVE_PATH": {
                      "isOptional": false,
                      "description": "Path within the archive bucket where WAL segments are stored.",
                      "defaultValue": "/pgbackrest"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "WAL_ARCHIVE_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket storing WAL archives for point-in-time recovery.",
                      "defaultValue": "${{Postgres-PITR.BUCKET}}"
                    },
                    "WAL_ARCHIVE_REGION": {
                      "isOptional": false,
                      "description": "Region used for signing WAL archive requests.",
                      "defaultValue": "${{Postgres-PITR.REGION}}"
                    },
                    "WAL_ARCHIVE_SECRET": {
                      "isOptional": false,
                      "description": "Secret access key for the WAL archive bucket.",
                      "defaultValue": "${{Postgres-PITR.SECRET_ACCESS_KEY}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "WAL_ARCHIVE_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3-compatible endpoint for the WAL archive bucket.",
                      "defaultValue": "${{Postgres-PITR.ENDPOINT}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "9922cba9-b459-4d31-9df2-1b1c3d8c6bff": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "a31cbd4f-f74a-45bc-aff5-d461df7adab8": {
                  "icon": "https://raw.githubusercontent.com/block/buzz/main/admin-web/public/favicon.svg",
                  "name": "Buzz Relay",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/_readiness",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/block/buzz:main"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "defaultValue": "3000"
                    },
                    "RUST_LOG": {
                      "isOptional": false,
                      "description": "Log level filter.",
                      "defaultValue": "buzz_relay=info,buzz_db=info,buzz_auth=info,buzz_pubsub=info,tower_http=info"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection string. Backs pub/sub fan-out, presence, and typing indicators.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "RELAY_URL": {
                      "isOptional": false,
                      "description": "Public WebSocket URL. Its host defines this relay's community identity.",
                      "defaultValue": "wss://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string, auto-wired from the bundled Postgres service.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "BUZZ_BIND_ADDR": {
                      "isOptional": false,
                      "description": "Address the relay binds for WebSocket and HTTP traffic.",
                      "defaultValue": "0.0.0.0:${{PORT}}"
                    },
                    "BUZZ_S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket holding media uploads and git objects.",
                      "defaultValue": "${{\"Buzz Media\".BUCKET}}"
                    },
                    "BUZZ_S3_REGION": {
                      "isOptional": false,
                      "description": "Region used for SigV4 request signing.",
                      "defaultValue": "${{\"Buzz Media\".REGION}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Required. The image runs as uid 1000 but Railway mounts volumes owned by root; without this the relay cannot write to /data/git and crash-loops.",
                      "defaultValue": "0"
                    },
                    "BUZZ_HEALTH_PORT": {
                      "isOptional": false,
                      "description": "Port serving /_liveness and /_readiness, separate from the app port.",
                      "defaultValue": "8080"
                    },
                    "BUZZ_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "S3-compatible API endpoint for the media bucket.",
                      "defaultValue": "${{\"Buzz Media\".ENDPOINT}}"
                    },
                    "BUZZ_AUTO_MIGRATE": {
                      "isOptional": false,
                      "description": "Apply database migrations on startup. Required for a fresh database.",
                      "defaultValue": "true"
                    },
                    "BUZZ_CORS_ORIGINS": {
                      "isOptional": false,
                      "description": "Comma-separated origins allowed to call the HTTP surface. The two tauri:// entries are the desktop app's webview origin (macOS/iOS and Windows/Linux) — without them the desktop app can't mint invites or load moderation data.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}},tauri://localhost,http://tauri.localhost"
                    },
                    "BUZZ_METRICS_PORT": {
                      "isOptional": false,
                      "description": "Port serving Prometheus /metrics.",
                      "defaultValue": "9102"
                    },
                    "BUZZ_GIT_REPO_PATH": {
                      "isOptional": false,
                      "description": "Volume path for hosted git repositories. Must match the mounted volume.",
                      "defaultValue": "/data/git"
                    },
                    "BUZZ_S3_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 access key ID for the media bucket.",
                      "defaultValue": "${{\"Buzz Media\".ACCESS_KEY_ID}}"
                    },
                    "BUZZ_S3_SECRET_KEY": {
                      "isOptional": false,
                      "description": "S3 secret access key for the media bucket.",
                      "defaultValue": "${{\"Buzz Media\".SECRET_ACCESS_KEY}}"
                    },
                    "RELAY_OWNER_PUBKEY": {
                      "isOptional": false,
                      "description": "Your Nostr PUBLIC key as 64-character hex. Becomes this relay's owner and only initial member. Never paste a secret key here.",
                      "defaultValue": "{{RELAY_OWNER_PUBKEY}}"
                    },
                    "BUZZ_MEDIA_BASE_URL": {
                      "isOptional": false,
                      "description": "Public base URL media is served from. The relay streams blobs itself; clients never reach S3 directly.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/media"
                    },
                    "BUZZ_ALLOW_NIP_OA_AUTH": {
                      "isOptional": false,
                      "description": "Permit NIP-OA owner-attested authentication.",
                      "defaultValue": "true"
                    },
                    "BUZZ_PAIRING_RELAY_URL": {
                      "description": "Dedicated pairing relay advertised via NIP-11. Desktop and mobile meet here for QR pairing; required because membership enforcement blocks unpaired devices from the main relay.",
                      "defaultValue": "wss://${{\"Buzz Pair Relay\".RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "BUZZ_RELAY_PRIVATE_KEY": {
                      "isOptional": false,
                      "description": "The relay's own Nostr signing key. Signs channel metadata, membership rosters, and git manifests.",
                      "defaultValue": "{{BUZZ_RELAY_PRIVATE_KEY}}"
                    },
                    "BUZZ_SERVE_GIT_WEB_GUI": {
                      "isOptional": true,
                      "description": "Optional. Set true to serve the browser-based git repository browser.",
                      "defaultValue": "false"
                    },
                    "BUZZ_REQUIRE_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Require NIP-42 authentication. Disable only for a public, unauthenticated relay.",
                      "defaultValue": "true"
                    },
                    "BUZZ_GIT_HOOK_HMAC_SECRET": {
                      "isOptional": false,
                      "description": "HMAC secret authenticating git hook callbacks.",
                      "defaultValue": "{{BUZZ_GIT_HOOK_HMAC_SECRET}}"
                    },
                    "BUZZ_GIT_CONFORMANCE_PROBE": {
                      "isOptional": false,
                      "description": "Run the A3 object-store conformance probe at boot before admitting the git backend.",
                      "defaultValue": "true"
                    },
                    "BUZZ_REQUIRE_RELAY_MEMBERSHIP": {
                      "isOptional": false,
                      "description": "Restrict access to members of the relay membership list. Set false to run an open relay.",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "a31cbd4f-f74a-45bc-aff5-d461df7adab8": {
                      "mountPath": "/data/git"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Buzz Relay",
      "method": "GET",
      "path": "/_readiness",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-08T23:28:44.218Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_255a39d7b2ae47daa39e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,SUCCESS,FAILED,SUCCESS"
      }
    ]
  }
}
