Relay Last verified:

Run Relay on Linux

Install and run Viaalink Relay as a systemd service on a dedicated Linux server or VPS.

Overview

This guide explains how to install and configure Viaalink Relay on a Linux server (Ubuntu, Debian, or Rocky Linux) using a systemd service unit.

Prerequisites

  • A Linux server running an x86-64 (amd64) or ARM64 distribution.
  • Root or sudo privileges.
  • A registered domain name pointing at your server’s IP address (see DNS Configuration).
  • Firewall or router rules allowing traffic on ports 2222/tcp, 80/tcp, 443/tcp, and optionally 3478/udp (see Requirements and Network Architecture).

Installation

1. Obtain the binary

Standalone Linux binaries (amd64 and arm64) are published with the first release — ask contact@viaalink.com for early access.

Once you have the viaalink-relay binary on your server, make it executable and move it to your system PATH:

bash

Verify that the binary runs:

bash

2. Create the system user and directories

Create a dedicated, unprivileged system user and group to run the Relay:

bash

Create persistent directories for server host keys, authorized public keys, TLS certificates, license files, and configuration:

bash

3. Create the configuration file

Create an initial configuration file at /var/lib/viaalink-relay/config.yml. Setting license-key-file (or passing --license-key-file) enables the browser setup dashboard at /_relay/dashboard and generates the initial setup code on first boot, even when running under the Free plan:

yaml

Note: Use http-address: :8080 and https-address: :8443 when running behind a reverse proxy (such as Caddy) or router port translation (80 -> 8080, 443 -> 8443). If the Linux host binds ports 80 and 443 directly with AmbientCapabilities=CAP_NET_BIND_SERVICE, set http-address: :80, https-address: :443, https: true, https-ondemand-certificate: true, https-ondemand-certificate-accept-terms: true, and https-ondemand-certificate-email: admin@example.com.

Set appropriate file ownership:

bash

Systemd service configuration

The Relay server does not ship with a pre-installed systemd service. Below is an example unit file that configures automatic startup, restart on failure, --license-key-file, and file limit tuning.

Create /etc/systemd/system/viaalink-relay.service:

ini

Reload the systemd manager configuration, enable the service, and start it:

bash

First start and setup page

When --license-key-file is set, the Relay generates an initial setup code on first boot, writes it to /var/lib/viaalink-relay/license/setup-token.txt, and logs it to the systemd journal (Setup dashboard token: <setup-code>).

Inspect the service logs using journalctl or read setup-token.txt to retrieve your setup code:

bash

Open the browser setup interface over HTTPS (when TLS is configured on your domain):

text

Or connect directly to the HTTP listener on port 8080:

text

After the first visit with ?x-authorization=<setup-code>, the browser stores your session cookie and subsequent visits to /_relay/dashboard open directly. From the setup dashboard, you can:

  • Activate your license.jwt file or operate under the Free plan (up to 10 connected devices).
  • Add custom domains and choose TLS validation methods.
  • Authorize connecting client devices by adding public keys.

Verifying server health

Viaalink Relay does not expose a plain HTTP health URL. Server operational health is confirmed when:

  1. The SSH listener on port 2222 responds to connection attempts:
    bash
  2. The browser setup dashboard loads at http://<server-ip>:8080/_relay/dashboard or https://relay.example.com/_relay/dashboard.

Next steps