This page is in English — onze technische documentatie voor ontwikkelaars en beheerders is in het Engels.

Aan de slag Laatst gecontroleerd:

Quick Start

Your first published address in minutes with your own Viaalink Relay — install the Relay, authorize your device, publish a local port and open the address.

What you will have at the end

A web app running on your own computer — here on localhost:3000 — reachable by anyone at an HTTPS address on your own domain, such as https://k3x.relay.example.com. No port opened on your computer, no router rule for it.

Note: Binaries for Linux, Windows, and macOS are available on GitHub releases. The Docker image is public: docker pull ghcr.io/viaalink/relay. The ASUSTOR app is in App Central: search for Viaalink. For via, see Install the Viaalink CLI.

You need:

  • a machine for the Relay that stays on (a Linux server or VPS, a NAS, or a PC) — see Where It Runs;
  • a domain name you control, here example.com;
  • the computer you want to publish from, with OpenSSH (already on Linux, macOS and current Windows) or the Viaalink CLI.

Step 1: Install the Relay

Follow the guide for your machine: Linux, Docker, ASUSTOR NAS, Synology or QNAP, Windows or macOS. A Relay on Windows or macOS works while you are logged in; for an address that is always up, use a machine that stays on.

Then point two DNS records at the Relay machine, so it can hand out addresses and get HTTPS certificates for them:

NamePoints to
relay.example.comthe Relay’s public IP address
*.relay.example.comthe same address

Details, including AAAA records and Cloudflare: DNS Configuration. Open the ports the Relay needs — at least 2222, 80 and 443 — as described in Requirements and Network Architecture.

Step 2: Authorize your device

The Relay only accepts devices you have authorized. Choose how you connect:

With the Viaalink CLI:

Publishing with the Viaalink CLI follows this order: via relay add '<invite link>', then via expose 3000. Signing in to your viaalink.com account with via login is a separate step (to view your account and licenses with via whoami — see Sign in to your Viaalink account), not required to publish.

  1. In the Relay dashboard (/_relay/dashboard), go to People › Join codes, choose New join code and copy the via relay add '…' command it shows (only shown when the Relay has a valid domain; join codes are valid 24 hours unless you choose 15 minutes or 7 days; single use; see Invites). The dashboard described here is in Relay v1.36.0 and later, and in the ASUSTOR package 0.62.7 and later.
  2. On your computer, register the device (paste the invite link in quotes):
bash

via checks the Relay, creates a device key on this machine, registers the key with the Relay and saves it as your default Relay. See Connect to a Relay.

With OpenSSH:

OpenSSH uses your SSH key. On the computer you publish from, create a key if you do not have one yet:

bash

Approve its public half (~/.ssh/id_ed25519.pub) on the Relay, in one of two ways:

  • In the browser: open the setup dashboard (/_relay/dashboard), log in with the setup code, go to People › Users and paste the key. The dashboard described here is in Relay v1.36.0 and later, and in the ASUSTOR package 0.62.7 and later.
  • As a file: copy the .pub file into the Relay’s public keys folder (on Linux /var/lib/viaalink-relay/pubkeys/). The Relay picks it up within a fraction of a second, without a restart.

More ways are on Access Control and Security.

Step 3: Publish a local port

Start your app on port 3000, then connect it to the Relay. Pick one.

With the Viaalink CLI:

bash

via expose uses your default Relay and runs in the background (add --foreground to keep it in the terminal until Ctrl+C). A bare via expose 3000 is named service-3000 (also the interactive default). The CLI prints the HTTPS address on your Relay, for example https://k3x.relay.example.com/. Always use the URL it prints rather than expecting an exact hostname, as the Relay assigns the final address and since Viaalink Relay 1.36.0 (ASUSTOR package 0.62.6) an owner can configure address suffixes (such as service-3000-nico.relay.example.com). When basic auth is on (the default), it also prints Basic auth is on for this route — show the credentials with: via expose auth; it never prints the password itself. via expose auth shows the username and password. With --auth=none there is no login.

With OpenSSH — nothing to install:

bash

Keep this command running: with OpenSSH, the address works for as long as the connection is open. You see the Relay’s welcome text, for example:

text

By default the Relay picks a random three-letter name and gives a new one on every reconnect, even when you ask for app. To let devices keep the name they ask for, the Relay operator turns off --bind-random-subdomains; see Publishing Services.

Step 4: Open the address

Open the URL it prints (for example https://k3x.relay.example.com) in any browser, on any network. A visitor needs nothing installed.

To keep strangers out, add a password to the link or limit who may visit — see Access Control and Security.

If it does not work

  • Permission denied (publickey) — the Relay does not know your OpenSSH key yet: repeat step 2.
  • No relay on this device. Enrol … — via expose needs a Relay first. Add one with via relay add '<invite link>'. (No relays found is what via relay list prints when none is added.)
  • Unknown option with Did you mean …? — the Viaalink CLI refuses an option a command does not take and exits with status 1 (earlier versions ignored it). Check the options with via <command> --help, for example via expose --help.
  • The command hangs, then times out — your computer cannot reach port 2222 on the Relay.
  • The page shows 404 Not Found — the address is not published right now, or it changed after a reconnect. Read the address from the latest output.
  • The page shows 502 Bad Gateway — the Relay reached your computer, but nothing answers on localhost:3000.

More on Troubleshooting.

Next