Relay Last verified:

Run Relay on macOS

Run Viaalink Relay on a Mac (Intel or Apple silicon) from the release archive, clear the Gatekeeper quarantine, and start it at login with launchd.

Overview

Viaalink Relay runs on macOS as a standalone binary (viaalink-relay) for Intel Macs (amd64) and Apple silicon Macs (arm64). It runs in the foreground in your user session: it keeps working while you are logged in and stops when you quit it or log out. While the Mac sleeps, the Relay cannot be reached.

For a Relay that should stay reachable around the clock, use a machine that is always on — see Run Relay on Linux, Run Relay with Docker, or Run Relay on Synology or QNAP.

Download

The macOS archives (Intel and Apple silicon) are published with the first release — ask contact@viaalink.com for early access.

Install

  1. Extract the archive for your Mac (darwin-amd64 for Intel, darwin-arm64 for Apple silicon). It unpacks into a single folder that contains the viaalink-relay binary.
  2. Move that folder to a permanent location, for example ~/viaalink-relay.

Clear the Gatekeeper quarantine

The binary is not notarized by Apple. When you download it with a browser, macOS marks it as quarantined and Gatekeeper refuses to run it (“cannot be opened because the developer cannot be verified”). Remove the quarantine mark from the binary once:

bash

If xattr reports that there is no such attribute, the file was not quarantined and you can continue. Then check that the binary runs:

bash

Configuration and data paths

Create the data folders and a configuration file in the Relay folder:

bash

Create ~/viaalink-relay/config.yml (replace /Users/you with your home folder; launchd does not expand ~):

yaml
PathPurpose
config.ymlConfiguration file (--config); settings saved in /_relay/dashboard are written here
keys/Server SSH host keys
pubkeys/Approved client SSH public keys
ssl/TLS certificates
license/License file (license.jwt) and setup-token.txt

Back up the whole ~/viaalink-relay folder to keep your host keys, approved keys, and license.

Run the Relay

bash

On first start the Relay generates a setup code, logs the setup link that contains it, and writes the code to license/setup-token.txt. Open the setup dashboard on the same Mac:

text

Restart after changing settings

Some settings saved in /_relay/dashboard (ports, domain, HTTPS, IP and country rules) take effect after a restart. To apply them, the Relay stops itself gracefully and expects a supervisor to start it again. Run in a terminal, it simply exits — start it again by hand. Under the launchd agent below (with KeepAlive), launchd starts it again for you.

Start at login with launchd (example)

The Relay does not install a launchd job itself. The following is an example of a generic launchd user agent that starts the Relay when you log in and starts it again whenever it exits. It runs only while you are logged in.

Create ~/Library/LaunchAgents/com.viaalink.relay.plist:

xml

Load it into your login session, and unload it when you no longer want it:

bash

The log ends up in ~/viaalink-relay/relay.log, including the setup link on first start.

Firewall and router ports

If the macOS firewall is on (System Settings → Network → Firewall), macOS may ask on first start whether viaalink-relay may accept incoming connections; allow it.

On your router, forward 2222/tcp to the Mac and translate external port 80 to 8080 and 443 to 8443. If you enable calls through firewalls, also forward 3478/udp and 49152–49167/udp. See Requirements and Network Architecture for the full port table.

Next steps