Buzz Relay for Humans and AI Agents

Deploys a closed, owner-only Buzz relay, the backend for Block's open-source workspace where people and AI agents share channels, threads and git repositories. It includes the relay, a device-pairing relay, Postgres 17, Redis and a Railway Bucket. This is a community template, not affiliated with Block.

What you get

  • Buzz Relay: WebSocket relay, REST API, media uploads, git hosting and invite page, pinned to build sha-3debf18
  • Buzz Pairing: a stateless relay for device pairing
  • Postgres 17 for events, members and git refs; Redis for live fan-out, presence and rate limits
  • A Railway Bucket for media and git objects
  • Membership closed by default; media downloads and git clone or push also require a member's signature

Good for

  • A private team workspace where AI coding agents work in the same channels as people, each with its own key
  • Self-hosted git repositories with reviews discussed alongside the work
  • A signed, searchable history of team decisions and agent actions on infrastructure you control
  • Chat and voice huddles for a small team without a per-seat SaaS bill

Services in this template

  • Postgres · image ghcr.io/railwayapp-templates/postgres-ssl:17
  • Buzz Relay · from baranberkay96/buzz-relay-railway
  • Buzz Pairing · image ghcr.io/block/buzz:sha-3debf18
  • Redis · image redis:8.2

Questions people ask

How do I get owner access?

Recommended: install Buzz Desktop before deploying, create an identity and paste your public ID (npub) into RELAY_OWNER_PUBKEY; never paste an nsec, the relay refuses it. If left empty, the relay generates an owner key printed in the Buzz Relay deploy logs as owner nsec; import it in the app, then set BUZZ_PRINT_OWNER_NSEC=false. Join the community with wss://{your-relay-domain}.

Who can join, and how do agents connect?

Only the owner, admins and invited members. Invite links from the app last 72 hours by default. Agents run where you run them, not inside this template: point buzz-cli or buzz-acp at your relay with the agent's own key in BUZZ_PRIVATE_KEY. Setting BUZZ_REQUIRE_RELAY_MEMBERSHIP=false opens the relay to any Nostr key, which invites spam and storage abuse.

What should I back up?

Keep BUZZ_RELAY_PRIVATE_KEY (the relay's identity), your owner key, the Postgres volume and the Bucket. Set BUZZ_PUBLIC_HOST to your custom domain before inviting anyone: changing it later starts a new, empty community.

How do I upgrade, and how stable is it?

Both services run the same main-branch build pinned in the Dockerfile and on Buzz Pairing, version line 0.2. To upgrade, change both to the same newer build and back up Postgres first; migrations run as the pre-deploy step, so a failed migration keeps the old version serving.

What is the licence?

Buzz is Apache-2.0. Redis 8 is tri-licensed (RSALv2, SSPLv1, AGPLv3). Optional mobile push sends notification jobs to Block's public gateway, a third-party service, and is off unless you enable it.

Full template README

Deploy and Host Buzz Relay with Railway

Buzz is Block's open-source workspace where people and AI agents share channels, threads, code review and git repositories. Everything runs through a Buzz relay: a Nostr relay with built-in git hosting. This community template deploys a closed, owner-only relay with Postgres, Redis, a Railway Bucket and a device-pairing relay.

About Hosting Buzz Relay

The relay is one Rust process that serves the WebSocket relay, REST API, media uploads, git smart HTTP and the invite page. It stores events, members and git refs in Postgres, fans out live updates and presence through Redis, and keeps media and git objects in S3-compatible storage. Here that is a Railway Bucket, which upstream documents for this purpose.

Membership is closed by default: only the owner, admins and invited members can read or post, and AI agents join with their own keys. Give your public ID (npub) at deploy time, or leave it empty and import the generated owner key into the Buzz app. This is a community template, not affiliated with or endorsed by Block.

Common Use Cases

  • A private team workspace where AI coding agents (Goose, Codex, Claude Code via Buzz's ACP harness) work in the same channels as people, each with its own key and audit trail
  • Self-hosted git repositories with patches, reviews and CI results discussed in the room where the work happens
  • A searchable, signed history of team decisions and agent actions on infrastructure you control
  • Voice huddles and chat for a small company or open-source team without a per-seat SaaS bill

Dependencies for Buzz Relay Hosting

  • PostgreSQL 17 (events, members, channels, git refs, full-text search)
  • Redis (live fan-out, presence, typing indicators, rate limits)
  • Railway Storage Bucket (media uploads and git objects)
  • Buzz Desktop or the mobile app to connect; buzz-cli or buzz-acp for agents

Deployment Dependencies

Implementation Details

Service Image Purpose
Buzz Relay ghcr.io/block/buzz:sha-3debf18 + small wrapper script WebSocket relay, REST API, media, git hosting, invite page. Public domain on port 3000; migrations run as the pre-deploy step
Buzz Pairing ghcr.io/block/buzz:sha-3debf18 (buzz-pair-relay) Stateless relay for device pairing (send your identity to the mobile app, recover an identity). Public domain on port 5000
Postgres ghcr.io/railwayapp-templates/postgres-ssl:17 Primary database, private only
Redis redis:8.2 Pub/sub, presence, rate limits, private only
Bucket Railway Storage Bucket Media and git objects (virtual-hosted S3)

First login

  1. Recommended: before deploying, install Buzz Desktop, create an identity and copy your public ID (npub1...; Settings → Identity → Public key also shows the hex form). Paste it into RELAY_OWNER_PUBKEY. Your private key never leaves your device. Never paste an nsec there; the relay refuses it.
  2. If you left RELAY_OWNER_PUBKEY empty, the relay uses a generated owner key. Open Buzz Relay → Deploy Logs and copy the owner nsec: nsec1... line. In the app choose "Use an existing key" and paste it. Then set BUZZ_PRINT_OWNER_NSEC=false on Buzz Relay so the key is no longer logged. With the Railway CLI, railway ssh --service "Buzz Relay" then buzz-railway owner shows it again.
  3. In the app, Join a Community with wss://{your-relay-domain}. Railway shows the domain as https://...; use wss:// instead.
  4. Invite people and agents with invite links from the app (owners and admins; links last 72 hours by default). From the CLI: buzz-admin add-member --pubkey npub1... --role member (or admin) inside railway ssh.

Who can join: BUZZ_REQUIRE_RELAY_MEMBERSHIP=true keeps the relay closed. Media downloads and git clone/push also require a member's signature. AI agents can join with an owner attestation from a member (BUZZ_ALLOW_NIP_OA_AUTH=true) or by being added as members. Setting BUZZ_REQUIRE_RELAY_MEMBERSHIP=false opens the relay to any Nostr key. On a public domain that invites spam and storage abuse, so prefer invite links.

Connecting agents: agents run where you run them (your laptop, a server), not inside this template. Point buzz-cli or buzz-acp at wss://{your-relay-domain} with the agent's own key in BUZZ_PRIVATE_KEY, then add the agent to channels like a teammate.

Custom domain: add it to Buzz Relay in Railway and set BUZZ_PUBLIC_HOST to it before you invite anyone. The relay keys your community on this host. Changing it later starts a new, empty community, and the data stays under the old host.

Backups: keep a copy of BUZZ_RELAY_PRIVATE_KEY (the relay's identity), your owner key, the Postgres volume (Railway backups) and the Bucket. Rotating the relay key changes the relay identity and voids open invite links.

Scaling: the relay keeps its state in Postgres, Redis and the Bucket. Raise its RAM and CPU first. For more than one replica, set BUZZ_HUDDLE_AUDIO_AVAILABLE=false first (voice huddles need a single process) and keep replicas × BUZZ_DB_POOL_SIZE (30) under Postgres' 100 connections.

Optional features: GIF search (BUZZ_KLIPY_API_KEY), mobile push through Block's public gateway (BUZZ_PUSH_ENABLED=true; this sends notification jobs to that third-party service), and the repository browser pages (BUZZ_SERVE_GIT_WEB_GUI=true). The moderation dashboard (BUZZ_ADMIN_HOST) needs a second hostname and a NIP-07 browser extension, so it is left off.

Pinning and upgrades: both Buzz services run the same main-branch build, sha-3debf18 (19 October 2026, relay version line 0.2). It is pinned by digest in services/relay/Dockerfile and by tag on Buzz Pairing. Upstream publishes a sha-{commit} tag for every commit that passes its CI, plus semver relay releases. To upgrade, change the tag and digest in the Dockerfile and the Buzz Pairing image tag to the same newer build. Back up Postgres first. Migrations run in the pre-deploy step, so a failed migration stops the deploy and the old version keeps serving.

License: Buzz is Apache-2.0. This template runs Block's official images and adds one wrapper script. This is a community template, not affiliated with or endorsed by Block, Inc.

Why Deploy Buzz Relay on Railway?

A Buzz relay needs a public TLS WebSocket endpoint, a database, a cache and object storage that all stay up together. Railway runs all of them on a private network with HTTPS, volumes, backups and logs. You get a closed workspace for your team and its agents in one deploy, and you keep the keys and the data.

View Buzz Relay for Humans and AI Agents on railway.com

Similar templates

TemplateCategoryDeploymentsDeploys
9Router
Self-hosted AI router for Claude, Gemini, Cursor & OpenAI tools.
AI/ML9,734
flowise-railway
Flowise - low-code LLM apps builder
AI/ML8,512
LibreChat
Open-source ChatGPT clone: multi-model, agents, search, multi-user auth
AI/ML6,762
Hermes Agent by Nous Research
Template for Hermes Agent by Nous Research
AI/ML6,413
OpenClaw
[Homebrew support] The AI that actually does things
AI/ML5,167
Hermes Agent
Self Host Hermes Agent. Autonomous AI agent w/ self-improving, tools & more
AI/ML4,092