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. Forvia, 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:
| Name | Points to |
|---|---|
relay.example.com | the Relay’s public IP address |
*.relay.example.com | the 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.
- In the Relay dashboard (
/_relay/dashboard), go to People › Join codes, choose New join code and copy thevia 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. - On your computer, register the device (paste the invite link in quotes):
via relay add '<invite link>'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:
ssh-keygen -t ed25519Approve 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
.pubfile 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:
via expose 3000via 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:
ssh -p 2222 -R app:80:localhost:3000 relay.example.comKeep 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:
HTTP: http://k3x.relay.example.com
HTTPS: https://k3x.relay.example.comBy 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 exposeneeds a Relay first. Add one withvia relay add '<invite link>'. (No relays foundis whatvia relay listprints when none is added.)Unknown optionwithDid 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 withvia <command> --help, for examplevia expose --help.- The command hangs, then times out — your computer cannot reach port
2222on 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
- Three Kinds of Connection — what just happened, and the other two kinds.
- SSH through the Relay — reach a machine’s SSH from anywhere without making it public.
- Publishing Services — databases, several ports at once, WebSockets.