Skip to content

Run your own relay ​

One command on a server, one field in Settings. Your phone, your Mac and your hosts all follow.

The relay is open source: github.com/seedmux/relay.

What you need ​

A Linux server with a public IP address. A domain name is optional.

Without a domainWith a domain
Address you'll usews://SERVER_IP:9876/wss://YOUR_DOMAIN/
Ports to openTCP 9876TCP 443 and 80
CertificateNot neededObtained and renewed automatically
Best forGetting started in a minuteNetworks that only allow standard web ports

Both include support for viewing your Mac's screen over cellular, which also needs UDP and TCP 3478 and UDP 50000–50999.

Either way your sessions are end-to-end encrypted — the address type only changes how the connection to the relay itself looks.

Install ​

Run one command on the server. It asks no questions: it installs a service that starts on boot, opens the ports in the server's firewall if one is running, and prints the address to use.

Without a domain:

sh
curl -fsSL https://github.com/seedmux/relay/releases/latest/download/install.sh | sudo sh

With a domain — first point the domain's A record at the server (with Cloudflare, set it to DNS only), then:

sh
curl -fsSL https://github.com/seedmux/relay/releases/latest/download/install.sh | sudo sh -s -- --domain YOUR_DOMAIN

When it's done you'll see:

  Put this address in Seedmux:  wss://YOUR_DOMAIN/

Cloud servers

AWS, Tencent Cloud, Alibaba Cloud and others have a security group in their web console that the installer can't change. Allow the ports above there — including UDP, which is the most common thing to forget.

Servers in mainland China

Cloud providers there block common web ports for domains without an ICP filing. That's why the relay uses port 9876 by default. Without a filing, use the ws://IP address, or a server outside the mainland such as Hong Kong.

Prefer Docker, a ready-made binary for macOS, Windows or FreeBSD, or running it behind your existing nginx or Caddy? See the relay's README.

Switch Seedmux over ​

Everything is done from your Mac:

This MacSettings › Phone › Relay: paste the address, press Return, click Restart
Your iPhoneNothing to do — it picks up the new address the next time it connects
Paired hostsSettings › Remote Hosts › the host › Relay: fill it in and click Switch

When you switch a paired host, Seedmux first checks that the new address actually works, then moves both sides at the same moment — a typo can't strand the machine, and you never have to go to it and pair again.

Check it ​

  • Open http://SERVER_IP:9876/health (or https://YOUR_DOMAIN/health) in a browser. {"ok":true} means it's running.
  • Turn off Wi-Fi on your phone and open a session: it should connect over cellular through your relay.

Going back ​

Clear the address on the Mac, or click Use Official Relay for a paired host.

Seedmux — native macOS, early access.