How it works

How RIM works.

What happens to a message between your device and everyone else's, who holds which keys, and what each server can and can't see. Every claim links the document or specification it summarises.

01 / A message

One server to start.
Connect across servers.

RIM separates your connection to the network from the place a workspace runs. A relay delivers. A host runs workspaces. The same server program can be either, or both.

WORKSPACE COMMUNICATIONExplanatory diagram · not a screenshot
Your devices

Desktop or web app.
Private keys and local state.

Workspace host

Channels, membership and roles.
Serves members from other relays.

Other members connect through their own relays. Servers exchange signed requests and responses.

  1. Your device signs it.

    Your app prepares the message and signs the request with its device key. In an encrypted conversation it encrypts the text first. Server to server ↗

  2. Your relay forwards it.

    If the workspace or conversation lives on another server, your relay forwards the request there. If it lives on your own server, nothing leaves it. The relay ↗

  3. The host decides.

    The server that hosts the conversation checks membership and permissions, stores the message, and sends signed events to each member's relay. Messaging ↗

  4. Devices check it.

    Each member's relay queues the event for their devices. The apps check the host's signature, and in an encrypted conversation decrypt the text. Security overview ↗

02 / Relay and host

Two jobs.
One program.

A server's operator picks its job with RIM_ROLE. Most teams start with one server that does both. Configuration ↗

RIM_ROLE=relay

A person's connection.

Holds local accounts, devices and profile cards, and queues events for their devices. It forwards workspace requests and can be home to direct messages and private groups. A relay-only server can't create workspaces.

Run your own relay ↗
RIM_ROLE=host

A workspace's home.

Runs workspaces and checks membership, permissions and moderation. People with accounts on other relays can join. It refuses a relay's jobs: contacts, direct message requests and deliveries.

The relay and the host ↗
RIM_ROLE=both

The simple start.

The default. One server runs your team's workspaces and is its members' relay. The Docker Compose setup uses it.

Self-hosting ↗
The public relay

The desktop app signs in to relay.rim-platform.org unless you choose another server. It's the project's own server, running as both relay and host: it also hosts the RIM community workspace, which every new account joins. It's a test run, with no promise about availability. Running the public relay ↗

03 / Identity and keys

You are a key,
not a row in a database.

A person is a key pair, and servers store what that person signs. A server can refuse service, but it can't sign as you. Key identity ↗

Your account id.

Your id, rimp1_…, comes from the first entry of your key log. That entry names an identity key and a recovery key. The log only grows by signed changes, and apps refuse a log that was cut short or forked. Identity ↗

A key on each device.

Each device has its own key, certified by your identity key. Only device keys sign in, together with your password. Linking a new device means checking a short fingerprint on both screens. Device linking ↗

Twelve words to recover.

Your recovery phrase makes the recovery key, which is never stored anywhere. With every device lost, it gets the account back and signs out every other device. Keys, recovery and backup ↗

Your history is separate.

Recovering the account doesn't bring back old encrypted messages. Those come back only from your history archive, if you set one up. History archive ↗

04 / End-to-end encryption

Encrypted on your devices.
Not on the server.

Direct messages and groups are encrypted with MLS, the standard in RFC 9420, through the OpenMLS library. Encryption specification ↗

Devices are the members.

Each encrypted conversation is an MLS group, and each of your devices is a member of it. A sending device encrypts; the others decrypt. Servers order and deliver what they can't read. The MLS engine ↗

Which conversations.

A new direct message or group is encrypted when the person who starts it has encryption set up. Across servers it always is. An older one can be upgraded once, with a visible marker, and stays encrypted from then on. Encrypted DMs and groups ↗

Channels aren't, on purpose.

Channels, private ones too, can be read by their host. That's what lets server search, pipelines, bots and agents work there, and lets people who join later read the history. Encryption ↗

Tools you let in.

A plugin or agent you allow to read an encrypted conversation reads the decrypted text, and the text leaves end-to-end encryption with it. No setting opens one to an outside agent, but a plugin command it runs can return what that plugin may read. What agents are given ↗

05 / Between servers

Every request
is signed.

Each server has its own key and id, rims1_…, published in a signed descriptor. Servers sign what they send and check what they get. Server identity ↗

Signed both ways.

Requests between servers carry HTTP Message Signatures, with a five-minute window and a single-use nonce, over TLS. Responses are signed too. Server to server ↗

Pinned on first contact.

A server remembers each peer's key log the first time they talk. A peer whose log forks is refused until its operator checks it another way. Servers and federation ↗

Your device signs your writes.

A relay can't forge something you wrote, because a write needs your device's signature. It can't change a host's events either, because apps check the host's key. The relay ↗

06 / What servers see

Encryption hides the words,
not the conversation.

What each server learns. Encryption doesn't hide who talks to whom, or when. Security overview ↗

ServerCan seeCan't do
Your relayYour account, devices and profile card; the channel events and direct message metadata it queues for you. It can drop or delay them.Read your direct messages, sign as you, or change a host's events.
A workspace hostIts channels' messages, private ones too; who is a member, their devices and activity, including members from other servers.Read direct messages homed elsewhere, sign as a device, or see your IP address unless you connect to it directly.
Every serverMetadata: members, devices, senders, times, sizes, mentions, reactions, pins and threads.Read encrypted messages, which it stores and delivers without the keys.
Not reviewed yet

An outside review of RIM's cryptography is still to come. These are early, pre-review releases. Known gaps and review status ↗

Questions

The three people ask most.

Each answer links the page with the details.

Where does my account live? Where are my keys?

Your identity is based on a key pair. Your relay holds your account, profile, public device records and sign-in records. Private identity and device keys stay on your devices; the recovery phrase lets you recover your identity if your devices are lost.

A workspace host keeps your membership and role in its workspace. Joining a workspace on another host doesn't move your account there. Recovering your identity and restoring old encrypted history are separate: old history needs your archive.

Keys, recovery and identity backup ↗
What happens when I send a message across servers?
  1. Your app prepares the action and signs the cross-server request with its device key.
  2. Your relay forwards the request to the server responsible for that conversation or workspace.
  3. The responsible server checks permissions, processes the action and sends signed events through members' relays. Apps check the host's events.

Server discovery uses signed descriptors and pinned server identities. Traffic between servers uses HTTP Message Signatures with replay protection, over TLS.

Read the server-to-server protocol ↗
Where does end-to-end encryption happen?

In the apps. New direct messages and groups are encrypted when their creator has encryption set up; older plaintext conversations stay as they are until upgraded. Direct messages and groups across servers require encryption. Each encrypted conversation is an MLS group, with devices as members. A sending device encrypts the content; recipient devices decrypt it. Servers order and deliver ciphertext without holding the conversation's keys.

Channels are deliberately readable by their server, for shared history, server search and workflows. Encryption doesn't hide metadata such as membership and message timing. Letting a plugin or the built-in agent read decrypted content gives that tool access to it.

Read the encryption specification ↗