Behind the feature
A relay is a Knit node that happens to live on a server
Knit 2.4.0 added Internet relays. They stay off until you add one, and the job a relay does is the job the phone next to you is already doing.
Knit moves a message by handing it between phones. Yours passes on what it can, keeps hold of what it cannot, and hands that over the moment someone useful walks past. Nobody operates any of it. It is what the app is doing while it sits in your pocket.
Internet relays do not change the shape of it. A relay is one more node doing that same job, put somewhere a phone cannot go: a machine that stays switched on, reached over the Internet instead of over a radio. It stays off until you add one yourself, and it carries only the conversations you already have.
Your phone already relays for strangers
Every phone running Knit is a sender, a receiver and a courier at the same time. A message you send goes out over Bluetooth and Wi-Fi to whoever is in range, their phones pass it to whoever is in theirs, and a few hops later it is with somebody across a field you could never have reached on your own.
The half people do not expect is what happens when there is nobody to pass it to, which is nothing much. Your phone keeps the message and waits, for up to a day, and it moves the moment a phone that can help comes past. Delivery in the mesh is a question of who you bump into.
Some gaps are never going to close on their own
Most of the time somebody does come past. A mesh made of people moves the way people move, and messages arrive because a crowd is never still for long.
Then there are the distances no crowd will cover. Your sister is three states away and there is no unbroken line of Knit users between her and you. Nothing has been lost. The message is parked in your pocket, waiting for a path that patience alone is not going to produce.
Put a node where a phone cannot stand
That is the whole idea. Take the phone in the middle of the chain, the one holding a message until the next hop shows up, and take away the things that make it unreliable. It never sleeps, never wanders out of range and never runs its battery down. What is left is a relay.
It is the same node doing the same job. The only real difference is how you reach it. Every other node in the mesh you reach with a radio, so you have to be near it. A relay you reach over the Internet, so where you are stops being the question. Your phone hands it a sealed message, it holds on to it, and the next time the far end of the conversation connects, it hands it over. Nobody had to be nearby, or awake at the same time.
It runs on a server in the dull sense of the word: a computer somebody keeps switched on. The word usually carries more, a company holding your conversations and knowing exactly who you are, and none of that comes with it here.
It holds what it cannot open
What your phone uploads is the same sealed frame it would have handed to a stranger's phone out in the mesh. Direct messages and group chats are end-to-end encrypted, so a relay is holding bytes addressed to the people in that conversation and to nobody else. It cannot open them, and there is no setting on it that changes that.
There is nothing to sign up for either. The people in a conversation work out its name on a relay from secrets they already share, so you create no account, upload no contact list, and register nothing anywhere. A relay cannot look you up. It was never told you were there.
What it can still work out is worth saying out loud, because people draw that line in different places. It sees that some conversation is active, as a random number rather than a name, along with the size and timing of what arrives and the IP addresses connecting to it. None of that is hidden by anything, and if it matters to you, relays are off until you say otherwise.
What a relay can work out
- That some conversation is active, known to it only as a long random number it cannot tie to a person.
- How large each sealed copy is and when it arrived, which for a photo gives away more than it does for a line of text.
- The IP addresses that connect to it, and which of them are interested in the same random number.
What it never sees
- The messages. It is holding ciphertext it has no key for and no way to ask for one.
- Who is talking. No names, no numbers, no device identities, no group membership, no contact list.
- Whether anything arrived or was read. Receipts and reactions are sealed the same way the messages are.
- Any other relay you use. Relays never talk to relays, so each one sees its own corner and no more.
One phone with a signal carries the room
A relay does not have to reach everybody. It has to reach one person. Whatever a phone pulls down goes straight back out into the mesh around it, hop by hop, exactly as though it had arrived by radio in the first place, and replies travel back out the same way.
One person with a bar of signal covers everybody around them, and nobody else has to switch anything on or even have a connection of their own. Their phones go on talking to the phones they can see, which is all they were ever doing.
No relay is load bearing
A conversation can use several relays at once, and they will not know about one another. Relays never talk to relays. Each holds its own copy, every phone in the conversation pushes to and pulls from the ones it knows, and the complete picture is only ever assembled on the phones.
That makes a relay disposable in a way servers usually are not. Wipe one and any member of the conversation fills it back up from what their phone is already holding. Lose it for good and the others carry on. Lose every one of them and Knit is what it was to begin with, a mesh of phones with no Internet needed.
Knit does not run any of them for you, either. The daemon is called knit-spool, it is free software under the AGPL, and it is small enough for the cheapest machine you can rent or a box in your hallway. Anyone can run one, and if you would rather not lean on somebody else's, run your own.
A sealed copy is not a copy you keep
A relay drops a sealed copy within 48 hours whether or not anyone came for it, and it holds only a few hundred per conversation before the oldest fall off the back. Nothing on it is a backup and nothing on it can be restored onto a new phone. Wipe your phone and those conversations go with it, which is the other side of a relay never having held a key to anything.
What a relay is not
Not a way to meet anyone
There is no directory, no search and no list of users. A relay carries conversations you already have, with people you added over the mesh, by scanning their code, or by opening a contact link they sent you.
Not a home for the Nearby room
Nearby is the public broadcast channel, plaintext by design and about the people physically around you. It stays on the radios and never touches the Internet.
Not an account
Nothing is registered and nothing is recoverable. Continuity is a property of a conversation that is live on your phone, never of anything a relay is holding for you.
Not switched on
The Internet plane stays off until you add a relay yourself, and Knit spells out what a relay can see before you do. Leave it alone and Knit works the way it always has, with no Internet needed and no account.
Read the rest of it
You do not have to take our word for any of it. The protocol is published in full beside the app's source, the relay daemon is its own repository under its own licence, and the release that introduced the lot has its notes like every other one.
- The 2.4.0 release notes →
Everything else that shipped alongside relays, and the changelog it was written from.
- The spool protocol, in full →
The normative specification, published with the app's source. It is long, and it is the actual thing.
- knit-spool, the relay daemon (AGPL) →
The reference relay, its configuration, and the conformance suite that validates anybody else's.