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

Relay Laatst gecontroleerd:

Relay Configuration Reference

Complete reference of all Viaalink Relay configuration flags, environment variables, and default values.

Configuration methods

Viaalink Relay supports three interchangeable configuration methods:

  1. Command-line flags: --option=value (e.g. --domain=relay.example.com).
  2. Environment variables: prefixed with VIAALINK_RELAY_ with hyphens replaced by underscores (e.g. VIAALINK_RELAY_DOMAIN=relay.example.com).
  3. YAML configuration file: defined in config.yml (e.g. domain: relay.example.com).

Flags take precedence over environment variables, which take precedence over config.yml.

Note: In the tables below, Default shows the compiled binary default when no config.yml or environment variable is provided. The official Docker Compose and ASUSTOR NAS configurations override --ssh-address to :2222, --http-address to :8080, --https-address to :8443, and set --domain to your Relay hostname (for example relay.example.com).


Network and listeners

FlagEnvironment VariableDefaultDescription
--domainVIAALINK_RELAY_DOMAIN(set in config.yml, e.g. relay.example.com)Root domain name for published subdomains
--ssh-addressVIAALINK_RELAY_SSH_ADDRESSlocalhost:2222 (:2222 in container/NAS)Network address and port for client SSH connections
--http-addressVIAALINK_RELAY_HTTP_ADDRESSlocalhost:80 (:8080 in container/NAS)Address and port for HTTP listener
--https-addressVIAALINK_RELAY_HTTPS_ADDRESSlocalhost:443 (:8443 in container/NAS)Address and port for HTTPS listener
--tcp-addressVIAALINK_RELAY_TCP_ADDRESS(empty)Address and port for TCP forwarding listener
--redirect-rootVIAALINK_RELAY_REDIRECT_ROOTtrueRedirect root domain requests instead of returning 404
--redirect-root-locationVIAALINK_RELAY_REDIRECT_ROOT_LOCATION(set in config.yml, e.g. https://viaalink.com)Target URL for root domain redirects
--welcome-messageVIAALINK_RELAY_WELCOME_MESSAGEPress Ctrl-C to close the session.Welcome banner displayed to clients upon connection
--trusted-proxiesVIAALINK_RELAY_TRUSTED_PROXIES(empty)Comma-separated list of trusted reverse proxy IPs or CIDRs for X-Forwarded-For
--idle-connectionVIAALINK_RELAY_IDLE_CONNECTIONfalseEnable per-stream idle timeouts on proxied traffic (closes idle WebSocket/SSE streams too; leave off unless clients send their own keepalives)
--idle-connection-timeoutVIAALINK_RELAY_IDLE_CONNECTION_TIMEOUT5sDuration to wait for activity before closing a connection when --idle-connection is enabled
--configVIAALINK_RELAY_CONFIGconfig.ymlPath to YAML configuration file

Domains, routing, and load balancing

FlagEnvironment VariableDefaultDescription
--bind-random-subdomainsVIAALINK_RELAY_BIND_RANDOM_SUBDOMAINStrueEnforce randomly assigned subdomains for web services
--bind-random-subdomains-lengthVIAALINK_RELAY_BIND_RANDOM_SUBDOMAINS_LENGTH3Number of characters in generated random subdomains
--force-requested-subdomainsVIAALINK_RELAY_FORCE_REQUESTED_SUBDOMAINSfalseForce the bound subdomain to be the exact one requested (fails the bind if already in use)
--append-user-to-subdomainVIAALINK_RELAY_APPEND_USER_TO_SUBDOMAINfalseAppend the authenticated SSH username to bound subdomains
--append-user-to-subdomain-separatorVIAALINK_RELAY_APPEND_USER_TO_SUBDOMAIN_SEPARATOR-Separator inserted between subdomain and SSH username
--banned-subdomainsVIAALINK_RELAY_BANNED_SUBDOMAINSlocalhostComma-separated list of prohibited subdomains
--bind-hostsVIAALINK_RELAY_BIND_HOSTS(empty)Comma-separated list of extra domains clients can bind
--bind-hosts-tlsVIAALINK_RELAY_BIND_HOSTS_TLS(empty)Per-domain TLS policy (host=mode[/provider][+wildcard]). Modes: dns, http, none
--bind-root-domainVIAALINK_RELAY_BIND_ROOT_DOMAINfalseAllow clients to bind directly to the root domain
--bind-any-hostVIAALINK_RELAY_BIND_ANY_HOSTfalseAllow clients to request arbitrary hostnames
--bind-http-pathVIAALINK_RELAY_BIND_HTTP_PATHtrueAllow clients to bind specific URL path prefixes on HTTP routes
--strip-http-pathVIAALINK_RELAY_STRIP_HTTP_PATHtrueStrip the bound URL path prefix before forwarding requests to the client
--http-load-balancerVIAALINK_RELAY_HTTP_LOAD_BALANCERfalseAllow multiple clients to bind the same HTTP host and balance requests across them
--tcp-load-balancerVIAALINK_RELAY_TCP_LOAD_BALANCERfalseAllow multiple clients to bind the same TCP port and balance connections across them
--sni-load-balancerVIAALINK_RELAY_SNI_LOAD_BALANCERfalseAllow multiple clients to bind the same SNI hostname and balance TLS streams across them
--alias-load-balancerVIAALINK_RELAY_ALIAS_LOAD_BALANCERfalseAllow multiple clients to bind the same TCP alias and balance connections across them

Certificates and HTTPS

FlagEnvironment VariableDefaultDescription
--httpsVIAALINK_RELAY_HTTPSfalseEnable direct HTTPS listener
--https-certificate-directoryVIAALINK_RELAY_HTTPS_CERTIFICATE_DIRECTORYdeploy/ssl/Directory containing custom certificate and key pairs
--https-ondemand-certificateVIAALINK_RELAY_HTTPS_ONDEMAND_CERTIFICATEfalseObtain on-demand certificates via Let’s Encrypt
--https-ondemand-certificate-accept-termsVIAALINK_RELAY_HTTPS_ONDEMAND_CERTIFICATE_ACCEPT_TERMSfalseAccept Let’s Encrypt terms of service
--https-ondemand-certificate-emailVIAALINK_RELAY_HTTPS_ONDEMAND_CERTIFICATE_EMAIL(empty)Contact email for Let’s Encrypt certificate expiry notices
--force-httpsVIAALINK_RELAY_FORCE_HTTPSfalseRedirect HTTP requests to HTTPS when a certificate is available
--force-all-httpsVIAALINK_RELAY_FORCE_ALL_HTTPSfalseRedirect all HTTP requests to HTTPS unconditionally
--caddy-https-enabledVIAALINK_RELAY_CADDY_HTTPS_ENABLEDfalseDrive bundled Caddy for DNS-01 wildcard certificates
--caddy-dns-providerVIAALINK_RELAY_CADDY_DNS_PROVIDER(empty)DNS-01 challenge provider (porkbun, cloudflare, route53, digitalocean, godaddy)
--caddy-acme-emailVIAALINK_RELAY_CADDY_ACME_EMAIL(empty)Email address for Caddy Let’s Encrypt account
--caddy-http-portVIAALINK_RELAY_CADDY_HTTP_PORT80Public HTTP port bound by Caddy
--caddy-https-portVIAALINK_RELAY_CADDY_HTTPS_PORT443Public HTTPS port bound by Caddy
--sni-proxyVIAALINK_RELAY_SNI_PROXYfalseEnable SNI proxying for end-to-end TLS passthrough

Authentication, consoles, and security

FlagEnvironment VariableDefaultDescription
--authenticationVIAALINK_RELAY_AUTHENTICATIONtrueRequire authentication for connecting SSH clients
--authentication-keys-directoryVIAALINK_RELAY_AUTHENTICATION_KEYS_DIRECTORYdeploy/pubkeys/Directory storing authorized client SSH public keys
--authentication-passwordVIAALINK_RELAY_AUTHENTICATION_PASSWORD(empty)Optional global password for SSH authentication
--private-keys-directoryVIAALINK_RELAY_PRIVATE_KEYS_DIRECTORYdeploy/keysDirectory storing server SSH private host keys
--bind-http-authVIAALINK_RELAY_BIND_HTTP_AUTHtrueAllow clients to require per-link HTTP basic authentication (user:pass@host:80:localhost:port)
--banned-ipsVIAALINK_RELAY_BANNED_IPS(empty)Comma-separated list of banned IP addresses or CIDRs
--whitelisted-ipsVIAALINK_RELAY_WHITELISTED_IPS(empty)Comma-separated list of whitelisted IP addresses or CIDRs
--geodbVIAALINK_RELAY_GEODBfalseEnable GeoIP database for geographic country filtering
--banned-countriesVIAALINK_RELAY_BANNED_COUNTRIES(empty)Comma-separated list of banned ISO country codes
--whitelisted-countriesVIAALINK_RELAY_WHITELISTED_COUNTRIES(empty)Comma-separated list of allowed ISO country codes
--setup-tokenVIAALINK_RELAY_SETUP_TOKEN(empty)Access code gating the setup dashboard at /_relay/dashboard
--license-key-fileVIAALINK_RELAY_LICENSE_KEY_FILE(empty)Path to offline license.jwt file (also enables /_relay/dashboard and first-boot setup code)
--admin-consoleVIAALINK_RELAY_ADMIN_CONSOLEfalseEnable the live traffic inspection console at /_relay/console
--admin-console-tokenVIAALINK_RELAY_ADMIN_CONSOLE_TOKEN(empty)Authorization code required to open /_relay/console
--service-consoleVIAALINK_RELAY_SERVICE_CONSOLEfalseEnable per-route inspection console links for connected clients
--service-console-tokenVIAALINK_RELAY_SERVICE_CONSOLE_TOKEN(empty)Fixed access code for per-route service consoles (random when empty)

Router port forwarding (UPnP and EZ-Router)

FlagEnvironment VariableDefaultDescription
--upnp-forward-portsVIAALINK_RELAY_UPNP_FORWARD_PORTSfalseEnable automatic router port mapping via UPnP
--upnp-ssh-external-portVIAALINK_RELAY_UPNP_SSH_EXTERNAL_PORT0External router port for SSH (0 = same as listen port)
--upnp-http-external-portVIAALINK_RELAY_UPNP_HTTP_EXTERNAL_PORT0External router port for HTTP (0 = same as listen port)
--upnp-https-external-portVIAALINK_RELAY_UPNP_HTTPS_EXTERNAL_PORT0External router port for HTTPS (0 = same as listen port)
--upnp-dashboard-portVIAALINK_RELAY_UPNP_DASHBOARD_PORT0External router port for NAS dashboard reverse proxy (e.g. 28080)
--upnp-turn-relay-max-portsVIAALINK_RELAY_UPNP_TURN_RELAY_MAX_PORTS32Largest UDP port range for calls through firewalls to forward automatically via UPnP, one port at a time (0 disables automatic forwarding)
--upnp-ssh-privateVIAALINK_RELAY_UPNP_SSH_PRIVATEfalseSkip UPnP router mapping for the SSH port (keep LAN-only)
--upnp-http-privateVIAALINK_RELAY_UPNP_HTTP_PRIVATEfalseSkip UPnP router mapping for the HTTP port (keep LAN-only)
--upnp-https-privateVIAALINK_RELAY_UPNP_HTTPS_PRIVATEfalseSkip UPnP router mapping for the HTTPS port (keep LAN-only)
--upnp-dashboard-privateVIAALINK_RELAY_UPNP_DASHBOARD_PRIVATEfalseSkip UPnP router mapping for the dashboard port (keep LAN-only)
--upnp-turn-relay-privateVIAALINK_RELAY_UPNP_TURN_RELAY_PRIVATEfalseSkip UPnP router mapping for STUN/TURN ports (keep LAN-only)
--adm-resource-confVIAALINK_RELAY_ADM_RESOURCE_CONF/adm-etc/resource.confPath to ASUSTOR ADM service registry

Calls through firewalls (STUN/TURN) and NATS

FlagEnvironment VariableDefaultDescription
--stun-portVIAALINK_RELAY_STUN_PORT3478UDP port for STUN/TURN services (0 to disable)
--turn-realmVIAALINK_RELAY_TURN_REALM(empty)TURN realm identifier (empty = STUN only, no TURN)
--turn-secretVIAALINK_RELAY_TURN_SECRET(empty)Static authentication secret for TURN credential generation
--turn-public-ipVIAALINK_RELAY_TURN_PUBLIC_IP(empty)Public IP address for TURN allocation candidates (required for TURN)
--turn-relay-min-portVIAALINK_RELAY_TURN_RELAY_MIN_PORT49152Start of UDP port range for relayed media streams
--turn-relay-max-portVIAALINK_RELAY_TURN_RELAY_MAX_PORT49167End of UDP port range for relayed media streams
--nats-enabledVIAALINK_RELAY_NATS_ENABLEDfalseEnable embedded NATS server for messaging and HTTP-to-NATS bridging
--nats-portVIAALINK_RELAY_NATS_PORT4222TCP port for the embedded NATS server
--nats-ws-portVIAALINK_RELAY_NATS_WS_PORT4223WebSocket port for the embedded NATS server (for phone clients)
--signalling-enabledVIAALINK_RELAY_SIGNALLING_ENABLEDtrueOffer cloud signalling (/_relay/signal-* endpoints and per-device NATS address-discovery channel). Requires license mode (--license-key-file, device registration); toggleable at runtime from the NATS tab in /_relay/dashboard

TCP forwarding

FlagEnvironment VariableDefaultDescription
--bind-random-portsVIAALINK_RELAY_BIND_RANDOM_PORTStrueForce TCP tunnels to bind randomly assigned ports
--port-bind-rangeVIAALINK_RELAY_PORT_BIND_RANGE0,1024-65535Permitted port range for TCP forwarding
--tcp-aliasesVIAALINK_RELAY_TCP_ALIASESfalseEnable named private TCP aliases (-J jump host forwarding)

Logging and privacy

FlagEnvironment VariableDefaultDescription
--log-to-stdoutVIAALINK_RELAY_LOG_TO_STDOUTtrueWrite log records to standard output
--log-to-fileVIAALINK_RELAY_LOG_TO_FILEfalseWrite log records to disk file
--log-to-file-pathVIAALINK_RELAY_LOG_TO_FILE_PATH/tmp/viaalink-relay.logDestination path for disk log file
--log-to-file-max-sizeVIAALINK_RELAY_LOG_TO_FILE_MAX_SIZE500Maximum size in megabytes before rotating log files
--log-to-file-max-backupsVIAALINK_RELAY_LOG_TO_FILE_MAX_BACKUPS3Number of rotated log backup archives to retain
--log-to-file-max-ageVIAALINK_RELAY_LOG_TO_FILE_MAX_AGE28Maximum number of days to retain rotated log files
--log-to-file-compressVIAALINK_RELAY_LOG_TO_FILE_COMPRESSfalseCompress rotated log archives using gzip
--log-jsonVIAALINK_RELAY_LOG_JSONtrueEmit structured JSON log formatting
--log-hash-ipsVIAALINK_RELAY_LOG_HASH_IPStrueAnonymize client IP addresses with an 8-character SHA-256 hex prefix
--log-usernamesVIAALINK_RELAY_LOG_USERNAMESfalseInclude authenticated SSH usernames in connection log entries
--log-levelVIAALINK_RELAY_LOG_LEVELinfoLog verbosity level (debug, info, warn, error)