What a relay costs to run
A relay server is a machine on the internet that accepts messages from one device and passes them to another. Whoever runs it pays for the same few things, whether it is a company selling relay access or a team running its own.
- A server that is always reachable. Devices connect whenever they come online, so the relay cannot sleep. That means compute billed by the hour or month, plus redundancy if one machine going down should not stop delivery.
- Bandwidth. Every relayed message crosses the provider’s network twice, once in and once out. Cloud providers bill data transfer by volume; Amazon’s EC2 price list, for example, prices data transferred in and out of a server per gigabyte.
- Storage. A relay that holds messages for recipients who are offline is doing store-and-forward work, and those messages take disk space until they are delivered or expire.
- Operations. Certificates, updates, monitoring, and limits that stop one abusive client from consuming everyone’s capacity.
The IETF’s specification for TURN, the standard for relaying traffic between hosts behind NATs, puts the trade-off plainly: relaying is very likely to work, but it comes at a high cost to the provider because the server needs a high-bandwidth internet connection. That is why TURN is meant to be used only when a direct path cannot be found.
How hosted relays are priced
Providers turn those costs into a price in a handful of ways, often combined:
- A flat plan, with a monthly fee that includes an allowance of traffic.
- A rate per message or per delivery beyond the allowance.
- A charge per user or per connection, for services that tie relay access to signed-in accounts.
- An admission or subscription fee. Nostr’s relay information document, NIP-11, lets a relay declare that it requires payment and publish a fee schedule with admission, subscription and per-publication fees.
The unit matters as much as the rate. A relay that counts deliveries rather than messages charges once for each recipient, so a message to a group costs more than a message to one person. Retries, acknowledgments and messages that never reach anyone may or may not count. Before comparing prices, find out exactly what one billable unit is.
Running your own relay
Self-hosting replaces the per-message fee with the costs above. TURN and Nostr are both openly specified, so you can run a TURN server for real-time traffic or a Nostr relay for signed events yourself. You choose the hardware, the region and the retention, and nothing is metered by a third party.
You also take on the work. RFC 8656 recommends that a TURN server limit both the number of allocations and the bandwidth each user can consume, and drop traffic beyond the quota, so a relay operator ends up writing and enforcing usage policy anyway. Availability becomes your problem too: if your relay is down, devices that depend on it cannot reach each other.
What keeps relay costs down
- Relay only when you have to. Interactive connectivity establishment (ICE) uses TURN as a last resort. The same idea applies to messaging: deliver over a direct or local path when one exists and fall back to the relay when it does not.
- Keep payloads small. Bandwidth and storage scale with bytes, so send references or compact encodings rather than large blobs.
- Expire what nobody will collect. A message TTL stops a relay storing messages for devices that have gone for good.
- Watch the fan-out. Large groups multiply deliveries, so a per-delivery price grows with group size as well as message volume.
One published example
Offline Protocol publishes its hosted relay prices. The Free, Pro and Scale plans cost $0, $99 and $499 a month and include 10,000, 100,000 and 1M hosted relay deliveries a month respectively. Deliveries beyond the quota cost $0.50 per 1,000, and Enterprise volumes are set by contract. With a card on file, usage beyond the quota is billed at that rate, and you can set a billing limit on any meter; a Free organization without a card stops at its quota instead, and local mesh traffic is never metered or paused.
Its documentation defines a delivery as one message the hosted relay accepts for one recipient and then delivers or holds for delivery. A group message counts once for each member it reaches, and a retry of the same message counts once. Delivery acknowledgments and messages that reach no one are not counted. Messages that devices forward for each other over Bluetooth LE or another local transport never pass through the hosted relay and are never metered.
Each device authenticates to the relay with its signed-in user’s OfflineID session, and guest sessions are not accepted. OfflineID is billed by monthly active users, each end user who signs in at least once in the calendar month, which the same plans include at 1,000, 10,000 and 50,000 a month, with $0.02 per monthly active user beyond that. An estimate for an app that uses the relay should include both meters.