Skip to content

Repository files navigation

bind.ws

Relay on demand. Sign once, and it's yours.

Every name under bind.ws is a nostr relay. Claim one with your nostr key, point any client at wss://<name>.bind.ws and it's yours. An idle relay costs nothing. A busy one pays its way with zaps.

Not ready to pick a name? Ask for one:

curl -X POST https://bind.ws/lease

That answers with a relay at a memorable name, open to anyone for 14 days. Claim it before then and it stays, events and all.

A relay's page: connect, people, fuel

What a name gives you

  • A relay. The standard protocol plus search, counts, sync, expiry, deletion, proof of work and an HTTP door for scripts. Works with every client.
  • A community. Members, invite links, an invite tree, moderators, a signed roster and one NIP-29 group per relay, so group-aware clients show it as a place.
  • A site. Notes and articles as pages with link previews, an Atom feed, and a card with a QR of the group address.
  • A file host. Blossom and NIP-96 on the same bucket, with mirroring, pre-flight checks and file reports.
  • A console. Seven tabs on the relay's own page, signed by a browser extension or a remote signer app on a phone. Presets set up an outbox, an inbox, a private relay, a chat, a search replica or a media host in one click.
  • Jobs. Pull another relay in, keep a standing mirror, fetch your own history from your relay list, rebroadcast to other relays, and dump everything to a file on a schedule.
  • Your own domain. wss://relay.example.com onto your relay with one CNAME.
  • Succession. Name an heir. If your key goes silent, the relay warns you for a month and then hands itself over.

The console's People tab

It runs on Cloudflare Workers with one Durable Object per name, SQLite inside it and R2 beside it.

Docs

For users

For scripts and agents

For developers

  • Architecture: routing, the object, storage, alarm, jobs, identity, groups.
  • Hosting bind.ws: run your own on your own domain.
  • Develop and extend: layout, tests, adding methods and NIPs, the console.
  • Costs and margins: what a relay costs the host, what fuel charges, the weekly check against the bitcoin price.

Quick start

npm install
npm run dev      # http://<name>.localhost:8787
npm test
npm run deploy

Protocol surface

NIP-01, 05, 09, 11, 13, 17, 29, 40, 42, 43, 45, 46 transport, 50, 56, 57, 59, 62, 67, 70, 77, 86, 94, 96, 98, and Blossom BUD-01, 02, 04, 06, 08, 09.

License

MIT

About

Relay on demand. Sign once, and it's yours.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages