Skip to content

Running a Relay Server

SpaceSquare edited this page Aug 9, 2026 · 1 revision

English | 繁體中文

Running a Relay Server

By default, hosting a Virtual Network only works reliably on the same LAN as whoever's joining, or if the host has manually set up port forwarding — because the host address the app shares is always the host's own local network address. A relay fixes this: both the host and every joiner make ordinary outbound connections to it, so as long as the relay itself has a reachable address, hosting and joining work across the internet with no port forwarding on either the host's or the joiner's side.

You don't need to run a relay to use one someone else is already running — this page is for standing one up yourself, either for your own group or for others.

Two ways to run one

Way Where Best for
From inside the app The Relay Server page in the sidebar Quick, no separate install — good if the machine running the app is already reachable enough (or you're fine forwarding one port to it)
The standalone relay tool A separate binary, run from a terminal A dedicated always-on machine (a cheap VPS is the common choice) that isn't running the desktop app at all

Both are the exact same relay underneath — pick whichever fits where you're running it.

Option A — from inside the app

  1. Open the Relay Server page in the sidebar.
  2. Enter a port (or leave the default) and click Start Hosting.
  3. The page now shows the bound port and a live list of network names currently using this relay.
  4. Give this machine's reachable address — its own IP or hostname, plus the port shown — to whoever should use it (yourself included, in Settings; see below).

Stopping it (the Stop button, or closing the app) disconnects everyone currently routed through it.

Option B — the standalone relay tool

For a dedicated relay machine that doesn't run the full desktop app:

relay --port 9420

It prints the port it's listening on and runs until stopped (Ctrl+C). No configuration file, no GUI — just a listener.

Using a relay (either kind)

Once a relay is reachable, point your own app at it:

  1. Open Settings → Connection.
  2. Enter the relay's address in Relay Server (optional) — e.g. relay.example.com:9420 or 203.0.113.10:9420.
  3. Leave it blank to go back to direct/LAN behavior.

With a Relay Server address set, every Create and Join on the Virtual Network panel automatically routes through it — nothing to configure per network.

Reachability is still on the relay's host

Running a relay doesn't remove the need for the relay itself to be reachable. If it's running on a home connection, its port still needs forwarding on that router. A small cloud VM with a public IP avoids this entirely, since every inbound port is already reachable by default.

What a relay can and can't see

The relay only pairs and forwards raw bytes between two connections — it has no idea it's carrying this app's signaling or game traffic, can't read network names or passwords in transit (those are validated end-to-end, not by the relay), and keeps no history once a connection closes. It's a rendezvous point, not a man-in-the-middle.

Known limitation

A relay fixes reachability for creating/joining a network. The peer-to-peer connection that follows still attempts a direct link first (via STUN) — this succeeds for most home routers. If both sides are behind especially strict ("symmetric") NAT, that direct link can still fail; there's no fallback data relay for that case yet.

Clone this wiki locally