Relays: bigger groups

Sharing with more than about 5 people? Set up a relay. A relay is a member of the room with a fast upload that forwards everyone's video, so nobody else has to upload their screen once per viewer.

Why bigger groups need a relay

In a new room everyone sends their video directly to everyone else (a full mesh). That gives the lowest delay, but every sharer uploads their screen once per viewer: in a room of 8, each sharer uploads it 7 times. Most home connections can't keep that up at good quality, so with more than 5 people in a full mesh Bellion Share shows a warning: "6 people in a full mesh: everyone who shares uploads their screen 5 times. Expect lower quality, or have someone with a fast upload volunteer as relay (People menu)."

With a relay, everyone sends their video once, to the relay, and the relay sends it on to whoever watches it.

Relay mode

Relay mode needs everyone in the room on build 31 or newer, and several relays need build 56 or newer. If someone runs a build that only knows one relay, the room uses a single relay and pauses relay mode above 5 people until they update.

Three ways to set up a relay

  1. Volunteer from the app. Easiest: a member with a fast upload clicks one menu item. Works on any server.
  2. A dedicated relay machine for your group. A spare PC, a home server or a rented server (VPS) joins your room by its share link and relays, so nobody's gaming PC has to. Works on any server, including bellion.app.
  3. A hosted relay on your own server. Keeps fixed rooms open around the clock. Needs your own Bellion Share server; it doesn't work with bellion.app.

1. Volunteer from the app

Good for: a group where one person has a fast, stable upload.

  1. Join the call as usual.
  2. Open the People menu.
  3. Choose Volunteer as relay.
  4. Check the line under the People table: it should say Relays: You relay for 4 people. (the number is how many people you serve), or You are standing by if the room doesn't need you yet.

To stop, choose Stop relaying (or Leave the relay queue while standing by) in the same menu. Your members move to another relay, or back to full mesh.

Volunteer when you have a fast, stable upload (a wired connection helps) and a computer that isn't busy with a demanding game. Relaying while you play makes both worse. Several people can volunteer; the server uses the ones it needs.

2. A dedicated relay machine for your group

Good for: a regular group that is often bigger than 5, when nobody wants to relay from their own PC. Any machine with a fast upload can do it: a spare PC, a home server, or a small rented server (VPS). It runs Bellion Share without a window, joins your room by its share link and volunteers. It works on any server, including the official bellion.app one.

The relay machine needs no screen and no desktop: it shares nothing and shows nothing. Forwarding uses little CPU; making smaller versions for viewers is video encoding, so it helps to have a hardware encoder or a few free CPU cores.

Step 1: install Bellion Share on the relay machine

Step 2: get your room's share link

In the app on your own PC, start or join the session your group uses, and choose Room > Copy share link. It looks like https://bellion.app/j/CODE#password. Keep it private: it contains the room password.

Step 3: start the relay

On Linux, in a terminal (keep the single quotes; replace the link and the upload with yours):

blite -headless -link 'https://bellion.app/j/CODE#password' \
  -volunteer -source none -view none \
  -name "Group relay" -relay-upload-kbps 50000

On Windows, in PowerShell or a Command Prompt, in the unzipped blite folder:

bin\blite.exe -headless -link "https://bellion.app/j/CODE#password" -volunteer -source none -view none -name "Group relay" -relay-upload-kbps 50000

It prints room CODE link ..., then volunteered as relay, and a status line per member every 5 seconds. In the app, the relay appears in the People table as Group relay, and the line under the table says Relays: Group relay relays for N people. Press Ctrl+C to stop it; it leaves the room cleanly.

FlagWhat it does
-headlessNo window or tray: runs one session from the command line.
-link URLThe share link to join. It joins on the link's server, so no other server setting is needed.
-volunteerVolunteers as relay as soon as it's in.
-source noneShares nothing. Required: without it the relay tries to share its screen, and on a machine without a display it stops right away.
-view noneShows and plays nothing (no windows, no decoding). Needed on a machine without a display.
-name NAMEHow it shows in the People table (default: the computer's name).
-relay-upload-kbps NIts upload in kbit/s (Mbit/s × 1000). The server uses it to decide how many members it serves, and the relay never sends faster than this. See How much upload do I need?
-udp-port NThe UDP port for all its connections (default 30471; if that's taken, the next free one). See Troubleshooting.

Don't add -relay: despite its name, it forces all connections through a TURN server, and a volunteer that others can only reach through TURN is never picked as a relay.

Step 4: keep it running

The relay keeps running until you stop it, and keeps the room open while it's in it: everyone else can leave, and the same link still works days later. It rides out short network drops (up to about a minute) without leaving the room. After a longer outage, or when the server restarts, it exits, so let the system start it again.

Linux: a systemd service. Put the link in a file only root can read, /etc/bellion-relay.env (sudo chmod 600 /etc/bellion-relay.env):

RELAY_LINK="https://bellion.app/j/CODE#password"

Create a user for it (sudo useradd --system --create-home --home-dir /var/lib/bellion-relay bellion-relay) and the service, /etc/systemd/system/bellion-relay.service:

[Unit]
Description=Bellion Share relay
Wants=network-online.target
After=network-online.target

[Service]
User=bellion-relay
EnvironmentFile=/etc/bellion-relay.env
ExecStart=/usr/bin/blite -headless -link ${RELAY_LINK} -volunteer \
  -source none -view none -name "Group relay" -relay-upload-kbps 50000
Restart=always
RestartSec=3min

[Install]
WantedBy=multi-user.target

Then sudo systemctl daemon-reload && sudo systemctl enable --now bellion-relay, and journalctl -u bellion-relay -f to watch its log. Use Restart=always rather than on-failure: when its session ends (for example after a server restart) the relay exits normally. Keep RestartSec at a few minutes: when the link no longer works, the server counts each failed join from your address, and too many in 10 minutes block joins from it for a while, for everyone on your connection.

Windows. The simplest way is to leave the command running in its terminal window. To start it at boot without a window, create a task in Task Scheduler: trigger At startup, action Start a program with C:\BellionRelay\blite\bin\blite.exe and the flags above as arguments, Run whether user is logged on or not, and under Settings, If the task fails, restart every 5 minutes. Update the relay from time to time by downloading the new zip; the headless relay doesn't update itself.

When things change

3. A hosted relay on your own server

Good for: groups that run their own Bellion Share server. blite -host rooms.json keeps the listed rooms open around the clock with fixed room codes, so their share links never change, and volunteers as each room's relay. Member volunteers can relay alongside it when a room outgrows it.

A hosted relay needs your own signaling server: the fixed room codes are authorized with the server's secret BLITE_HOST_KEY, and the official bellion.app server doesn't hand that out. On bellion.app, use a dedicated relay machine instead.

  1. Set up your server as in Self-hosting, with BLITE_HOST_KEY set to a long random secret.
  2. Write rooms.json. Codes are 4 to 12 letters and digits (no U; O counts as 0, I and L as 1); passwords need at least 4 characters. owners lists the identity keys of the people who own the room while they're in it (from Room > Your identity key... in their app); otherwise the relay owns it.
    [
      {"code": "7K3Q-X9MD", "password": "a-room-password", "name": "Our relay",
       "owners": ["<identity key from Room > Your identity key...>"]}
    ]
  3. Run it with the same key and your server, with good upload and host networking:
    BLITE_HOST_KEY=<secret> blite -host rooms.json -server wss://share.example.com/ws -relay-upload-kbps 200000
    The repository's Dockerfile.host builds an image for it, and docs/examples/ has a Docker Compose file running both services.
  4. Share https://share.example.com/j/7K3QX9MD#a-room-password with your group. The link works around the clock.

The hosted relay restarts its rooms by itself when the connection drops. The Docker image includes the GStreamer plugins it needs to make smaller versions for viewers (software x264 encoding, so give it a few free CPU cores).

How much upload do I need?

Each member a relay serves costs it about 4.5 Mbit/s of upload (about one full-size stream plus small previews). The server plans with 70% of the relay's upload, so serving one member takes about 6.5 Mbit/s of upload, and a relay serves at least 2 and at most 16 members:

Relay's uploadMembers it serves
up to 25 Mbit/s2 to 3
30 Mbit/s4
50 Mbit/s7
100 Mbit/s15
105 Mbit/s or more16 (the most)
not known yet4

How to tell it's working

Troubleshooting