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 domain | With a domain | |
|---|---|---|
| Address you'll use | ws://SERVER_IP:9876/ | wss://YOUR_DOMAIN/ |
| Ports to open | TCP 9876 | TCP 443 and 80 |
| Certificate | Not needed | Obtained and renewed automatically |
| Best for | Getting started in a minute | Networks 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:
curl -fsSL https://github.com/seedmux/relay/releases/latest/download/install.sh | sudo shWith a domain — first point the domain's A record at the server (with Cloudflare, set it to DNS only), then:
curl -fsSL https://github.com/seedmux/relay/releases/latest/download/install.sh | sudo sh -s -- --domain YOUR_DOMAINWhen 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 Mac | Settings › Phone › Relay: paste the address, press Return, click Restart |
| Your iPhone | Nothing to do — it picks up the new address the next time it connects |
| Paired hosts | Settings › 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(orhttps://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.