The Spectrum Dispatch News

technology

Parley: Federated IRC Chat Runs on Independent Instances

The project lets users run their own chat instance, connect with standard IRC clients, and exchange messages across domains using signed HTTP federation.

Parley: Federated IRC Chat Runs on Independent Instances

According to the source text, Parley is a federated, decentralised chat network that speaks plain IRC. Each person or team runs a small instance for their own domain, and instances discover one another through DNS and well‑known identity documents. Identity addresses resemble email addresses: a user on foo.com appears as [email protected], and a user on bar.com appears as [email protected]. Messages are exchanged over HTTPS with detached ed25519 signatures; receivers verify the signature against the key they discovered themselves, allowing any instance whose signature checks out to participate in the federation. When a user messages someone on a new domain, the two instances automatically peer and subsequently exchange the peers they know, forming a mesh without manual configuration. Parley offers two kinds of channels. The global channel #dev is replicated across every linked instance that has members in it; it has no topic and no operators because nobody owns it. The local channel ¬es never leaves the instance, is invisible to peers, and is the only place where a topic can be set. Moderation does not rely on channel ownership; instead, /ban becomes a block list by mask—for example, /ban [email protected] blocks a single user, while /ban !@example.com blocks an entire instance. A user’s ban list applies to their own account, while an admin’s ban list covers the whole instance. Peering itself is controlled with the parleyctl peers command. Accounts can be managed while the instance is running. They live in the instance’s data directory, not in a config file, and can be created with parleyctl, an admin page, the HTTP API, or through single sign‑on using any OpenID Connect provider or identity headers from a reverse proxy. Users mint IRC tokens for their clients on their settings page; bots are simply accounts assigned the bot role. History is preserved across downtime. Each instance stores channel and private‑message history in an SQLite database with a full‑text index, accessible via parleyctl search and served at /channels//feed. When a peer returns after an outage it pulls the missed messages, and clients receive recent history replayed on JOIN. The scrollback experience follows the user rather than the client: CHATHISTORY pages through channels and private messages, a join replays what has not been shown, and a draft/read‑marker records the read position so marking a channel read on one device clears it on another. Parley advertises several IRCv3 capabilities to clients that want them, including server‑time, message‑tags, echo‑message, multi‑prefix, setname, and TAGMSG, which relays client‑only tags such as typing indicators across the federation and between local clients. Tags attached to a message itself are retained, so a +reply remains a reply when retrieved from history, and draft/multiline treats a pasted paragraph as a single message rather than splitting it into multiple lines. The source also describes a change to how mentions are resolved to fix excessive notifications. Previously, a bare nick such as bob: could trigger a push to every user named bob on any instance in the room. After the change, a name is interpreted as it was shown to the sender: [email protected] always refers to bob on bar.com, while a bare bob refers only to the bob on the sender’s own instance. Consequently, a line from another instance that names somebody locally by a bare nick no longer pushes a notification to them, preventing spurious alerts. The implementation has been tested with make test (including race detection), bte check reports no errors, and an integration test confirmed the fix works consistently. The source code is available at the URL provided.

Parley: Federated IRC Chat Runs on Independent Instances

Key facts

  • Parley uses email‑style identities ([email protected]) for users on different domains
  • Federation relies on signed HTTP messages with ed25519 signatures verified via WKID
  • Global channel #dev is replicated across linked instances; local channel ¬es stays on a single instance
  • History is stored in SQLite with full‑text search and replayed on JOIN
  • Account management is possible via parleyctl, admin UI, HTTP API, or SSO/OpenID Connect
  • Notification logic was updated so that a bare nick from another instance no longer triggers pushes to local users with the same nick

Sources

← All posts