Soty

Relays

Delivery when the other side is offline

A relay is an ordinary program on a server run by somebody else. It holds an encrypted envelope until the recipient comes online and helps devices find each other. It never sees the text.

Relays are optional for mesh and direct connections. They are insurance for offline time.

Three kinds of node

One protocol, three platforms. Pick by hardware and by where the node lives.

Server node

Linux x64, SQLite and systemd or Docker. A public address on the internet: history, federation and the full set of metrics.

dtm_host.bin

OpenWrt router

OpenWrt 24.10 or newer on five architectures: an .ipk package and the LuCI panel. The queue lives in RAM, so the flash does not wear out.

dtm_relay-X.Y.Z+N-ipk.tar.gz

Mini-PC

Raspberry Pi, NAS or thin client: amd64, arm64, armv6, riscv64. The installer and the systemd unit in one archive.

dtm_relay_linux.tar.gz

What a node can do

Transport only: accept, verify the signature, store and hand over. It cannot open an envelope.

  • Offline queue
  • Peer tracker
  • Presence
  • Live delivery
  • History backfill
  • Federation
  • Signed prune
  • /status metrics

Three roles of one node

A single process can wait, introduce peers and talk to other nodes.

Offline buffer

An envelope for an absent recipient waits on the node and leaves as soon as the device subscribes.

Tracker

The node answers who is online and hands out addresses. Devices then connect directly, bypassing the relay.

Federation

Nodes exchange what they have: a live relay plus anti-entropy. An envelope survives one node going offline.

A node does not decrypt envelopes and does not store keys. All it does is accept, verify the signature, store and forward.

Public project nodes

These addresses are already in the build. The Ed25519 key is what separates a real node from a substitute.

Relay 1

Public node
WebSocket
Ed25519
Invite link

Relay 2

Public node
WebSocket
Ed25519
Invite link

The nodes run without an SLA and may be unavailable. The app survives that: messages go over mesh or a direct connection, and the envelope stays with the sender.

Connect your own node

A node is added by hand — the application does not swap addresses silently.

  1. 1

    Open the settings

    In Soty: Settings → Relay hosts → Add relay host.

  2. 2

    Paste the link

    The node banner prints soty://host?addr=…&pk=… — the app checks the key when it connects.

  3. 3

    Or enter it by hand

    A ws:// or wss:// address and the Ed25519 key separately. The key is required: without it the node is not trusted.

  4. 4

    Check the status

    The list shows Connected. A silent node can be replaced without removing the others.

The node key is its identity. If the database file is lost, the node gets a new key and clients stop trusting it.

Your own node in five minutes

One binary, one SQLite file and an open port. The guide with commands and systemd lives in the install section.

Node installation guide

For permanent work there is deploy/deploy-host.sh: systemd-user, systemd-system, supervisor or nohup, plus nginx and key verification.

Federation: nodes work it out themselves

Hosts do not discover each other automatically: the operator sets the peer list. Inside that list, anti-entropy does the rest.

Soty A
Relay 1
--peer ↔
Relay 2
Soty B

The topology is up to the operator: a full mesh, a ring or a hub with peripheral nodes.

Symmetric peers

Every node lists the others with --peer. Without the reverse link a message travels one way only.

Key pinning

--peer can carry an Ed25519 key. If WELCOME returns another identity, the connection is dropped.

Anti-entropy

After a reconnect nodes exchange WANT → HAVE → GET → ENVELOPES and catch up on what they missed.

Hop ceiling

Beyond three hops an envelope is not forwarded. In practice keep the path to the recipient at 2–3 nodes.

What traffic passes through it

The relay sees WebSocket frames, not conversations. All it stores is opaque signed envelopes.

WebSocket frame
up to 256 KB
Text envelope
about 1 KB
Photos and voice
up to 256 KB, larger ones in parts
Queue on a node
20,000 envelopes or 32 MB
Kept without a subscription
24 hours
Kept for subscribed keys
30 days
Federation
up to 3 hops
Connections on a router
128 by default, 512 max
The relay sees the envelope, the address and the time. Only devices with the key read the text.

Old envelopes are evicted first. Every prune publishes a signed Merkle root, so a disappearance cannot be faked.

What stays visible

A relay does not read the text, but it sees that delivery happened. That is not a bug; it is the price of an offline buffer.

Ciphertext only

The envelope is checked by signature and id, but it is never decrypted.

Pseudonyms

Sender and recipient are visible as public keys. Names and the address book stay on the device.

Time and volume

Metadata allows activity analysis. For sensitive scenarios use mesh or a direct connection.

Pinning

The client remembers the node Ed25519 key. A node cannot be swapped on the way without changing the key.

Your own node reduces the number of intermediaries, but it does not make metadata invisible to its operator — when the operator is you.

Keep delivery under your control

Run a node on your server or add a public one. The application decides when to use it.