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

CLI Laatst gecontroleerd:

Publishing Services with the Viaalink CLI

Publish local web applications, APIs, databases, and multi-port development environments through your Viaalink Relay.

Overview

The Viaalink CLI (via) provides simple commands to expose local development ports to the internet through your Viaalink Relay over secure, encrypted reverse tunnels.


Publishing HTTP web applications

Quick start

To publish a local development server running on port 3000:

bash

via expose 3000 is supported as an exact alias:

bash

Upon connection, the CLI displays your public address:

text

Any traffic arriving at https://d7f2a1.relay.example.com is automatically secured with Let’s Encrypt TLS and forwarded to your local port 3000.

Requesting a custom subdomain

If your Relay server is configured with --force-requested-subdomains=true, request a specific subdomain name using the --name flag:

bash

Your service is published directly at https://myapp.relay.example.com.

When your Relay server runs with --bind-http-auth=true (the default), you can protect a published HTTP link with HTTP basic authentication by specifying user:password@ in the SSH reverse forward bind host:

bash

Visitors to https://myapp.relay.example.com are prompted for credentials before any request reaches your local application.


Publishing TCP and database services

For raw TCP port forwarding (such as databases, caches, and custom network protocols), use standard OpenSSH reverse port forwarding (ssh -R) or via connect -F <remote_port>:<local_port>:

bash

Or with via connect using the remote_port:local_port specification:

bash

The Relay binds an external port (random when --bind-random-ports=true, or the requested port when permitted) and reports the public connection endpoint:

text

Publishing multiple services at once

To publish multiple HTTP subdomains and TCP ports simultaneously through a single outbound tunnel connection, repeat the -F (--forward) flag for each forward specification (subdomain:local_port for HTTP, remote_port:local_port for TCP):

bash

This creates:

  • https://web.relay.example.com -> localhost:3000 (HTTP)
  • https://api.relay.example.com -> localhost:8080 (HTTP)
  • relay.example.com:<port> -> localhost:5432 (TCP)

You can also define multiple forwards via the VIAALINK_RELAY_FORWARD environment variable (which accepts a comma-separated list):

bash

Auto-reconnect and keepalive

For long-running sessions and unreliable networks, via connect enables automatic reconnection (--reconnect=true) and keepalive pings (--keepalive=30s) by default. You can customize the keepalive interval:

bash

Or configure environment variables:

bash

Managing active tunnels

When you start a background tunnel with a --name (for example via publish 3000 --name myapp --daemon), manage active sessions by name:

bash

(via expose list and via expose stop <name> are also supported as aliases.)


Using standard OpenSSH (no CLI required)

Because Viaalink Relay speaks standard SSH reverse tunneling protocol, you can connect from any machine that has the standard ssh client installed without downloading the Viaalink CLI:

bash

This makes Viaalink Relay immediately usable on servers, continuous integration runners, and embedded systems where installing additional binaries is restricted.