Run Your Own BSV Broadcaster
Run your own BSV Broadcaster instance in about ten minutes, from source or from the container image, on mainnet, testnet, teratestnet, or regtest.
BSV Broadcaster is open source under the Apache License 2.0 and is designed to be run by anyone. A single binary with an embedded key-value store is enough for a working instance; no PostgreSQL, Kafka, or other services are required. Running your own gives you a broadcaster that is entirely under your control, which is the right choice for any production application and a sensible one for serious development.
Why run your own
No third-party dependency. The public endpoints are shared, best-effort infrastructure operated by others. Your instance is up when you say it is.
Private callbacks. Webhook delivery, SSE streams, and status records stay inside your network.
Your own limits. No shared rate limits, and policy values you set yourself.
Any network. Mainnet, the public testnet, teratestnet for Teranode-scale testing, or a private regtest.
Proofs for your transactions. Merkle paths are delivered to you as blocks are found, without you ingesting the chain.
What you need
Go 1.27 or newer with cgo enabled, or a container runtime if you prefer the image.
About 1 GB of disk for the embedded store and block headers.
Outbound network access so the instance can discover Teranode peers.
For status tracking beyond
RECEIVED, a URL at which the Merkle Service can reach your instance. See Enable status tracking below.
Install
The published image is ghcr.io/bsv-blockchain/broadcaster:latest. It is distroless, so it contains only the binary; mount your configuration and expose the API and health ports.
Set storage_path and the Pebble path in your configuration to somewhere under /data so state survives container restarts.
Configure
Save this as config.yaml. It runs every BSV Broadcaster service in one process, uses the embedded store, and discovers Teranode peers automatically.
Any value can be overridden by an environment variable prefixed BSV_BROADCASTER_, for example BSV_BROADCASTER_NETWORK=testnet or BSV_BROADCASTER_LOG_LEVEL=debug.
Choosing a network
network
Use
Merkle Service URL
mainnet
Production BSV. Real money.
https://merkle-service-us-1.bsvb.tech
testnet
The public BSV testnet. Built-in bootstrap peers.
https://merkle-service-testnet-us-1.bsvb.tech
teratestnet
The Teranode scaling test network. Built-in bootstrap peers.
https://merkle-service-ttn-us-1.bsvb.tech
regtest
Your own private network.
None public; run your own.
For regtest, peer discovery cannot use public bootstrap peers, so set p2p.bootstrap_peers to your own Teranode's multiaddr, or set datahub_discovery: false and list datahub_urls directly. The embedded chain tracker is disabled automatically on regtest.
Enable status tracking
This is the step most often missed. BSV Broadcaster delegates proof construction to a separate Merkle Service, which watches the network for the transactions your instance has registered and calls back into your instance as they are seen, mined, and buried. The three keys at the bottom of the configuration above wire that up:
merkle_service.urlis the Merkle Service for your network. The BSV Association hosts public instances, listed in the table above.callback_urlis the address at which the Merkle Service can reach your instance, with the path/api/v1/merkle-service/callback. It must be routable from the Merkle Service, which means a public hostname or a tunnel for a laptop. For a local setup with Merkle Service in Docker on the same host,http://host.docker.internal:8080/api/v1/merkle-service/callbackworks.callback_tokenauthenticates those inbound callbacks. Generate it withopenssl rand -hex 32. BSV Broadcaster refuses to start ifmerkle_service.urlis set without a token, because an unauthenticated callback endpoint would accept forged status updates.
Run and verify
The datahub_urls array in the API health response should list several Teranode endpoints marked healthy: true within a minute of start-up. If it is empty, the instance cannot reach the peer network; check outbound connectivity.
Submit a transaction and watch it:
With the Merkle Service configured, the status should reach SEEN_ON_NETWORK within seconds and MINED with a merklePath once a block is found.
Point your application at it
Every example on the BSV Broadcaster page and the Quickstart works unchanged against your own instance; replace the public URL with http://localhost:8080 or wherever you expose it.
Going to production
Separate the services.
mode: allis ideal for one machine. For resilience, runapi-server,propagation,webhook,sse,bump-builder,p2p-client, andchaintracksas separate processes with--mode <name>, backed by an external Kafka cluster and an Aerospike, PostgreSQL, or MongoDB store. Start fromconfig.example.yamlin the repository and the Kubernetes manifests underdeploy/.Pre-create Kafka topics when using external Kafka. BSV Broadcaster does not create them, and the propagation topic has a fixed partition-count requirement described in
docs/production-kafka.md.Run more than one instance if you need throughput or regional presence. Status records are per instance, so route status lookups to the instance that received the submission, or have the instances share a store.
Watch the SSE port. The SSE service listens separately from the API, on port 8082 by default. Expose it if clients will use
/events.Monitor it.
/metricsexposes Prometheus metrics, and/readyand/healthare suitable Kubernetes probes. TheblockHeightin the health response lets you detect an instance whose chain view is lagging.
Security
Do not expose the API unauthenticated. It has no authentication by default. Bind
api.hostto a private interface, or put it behind a reverse proxy that enforces a bearer token, and keep it off the public internet unless you intend to run a public service.The Merkle Service callback endpoint is bearer-authenticated by
callback_token. It is the only inbound route your instance needs from the outside.Callback URLs you accept from clients are checked against private and loopback address ranges, so a client cannot use your instance to probe your internal network.
The repository's getting started guide and config.example.yaml document every option.
Last updated
