Version: 2.6.0 | Last Updated: 2026-10-22
Share local services over HTTPS with anyone, anywhere. No port forwarding, no firewall rules, no certificates to manage.
Viaalink CLI publishes your local services through Viaalink Relay, the server that gives them public HTTPS URLs. The command is via. via and asd are the same command; older scripts that call asd keep working.
For the list of changes in each release, see CHANGELOG.md (authoritative, Keep a Changelog format). The GitHub release pages mirror the relevant section per release.
- Welcome
- Quick Start
- Understanding HTTPS Tunnels
- Three Ways to Create Tunnels
- Web Terminal (ttyd)
- VS Code Server (codeserver)
- Security & Authentication
- Access Patterns
- Troubleshooting
- Reference Links
- Tunnel Protocols
- Supabase Integration
- Resources & Community
- Docker Containers
Viaalink CLI creates secure HTTPS tunnels from your local machine to the internet, through a Viaalink Relay you enrol this device on. With one command, you can:
- Share a local development server with a teammate
- Receive webhook callbacks from external APIs (payment providers, CI/CD pipelines, etc.)
- Access your terminal or VS Code from any browser
- Monitor all services from a built-in dashboard (
via net) - Demo your work without deploying
- Developers sharing work-in-progress with teammates
- Teams needing remote access to development environments
- Anyone who wants to access local services from anywhere
This manual teaches you how to:
- Expose any local port as a public HTTPS URL
- Run a web-based terminal (ttyd) for remote shell access
- Run VS Code in a browser (code-server) for remote development
- Secure your services with authentication
Viaalink CLI is cross-platform. For detailed feature status, see FEATURE_MATURITY.md.
Quick Status:
- Linux - Primary platform, extensively tested
- macOS/Windows - Functional, actively improving
- Android (Termux) - Supported, see um_termux.md
Contributing: Found an issue on your platform? We welcome bug reports and contributions at our GitHub repository.
The CLI creates secure tunnels from your local machine to a relay, which serves them on the internet.
HTTP Tunneling (default):
- Web apps, REST APIs, WebSockets
- Your service stays local, gets public HTTPS URL
- Zero port-forwarding on your firewall
TCP Tunneling (via direct SSH):
- Databases (PostgreSQL, MySQL, Redis)
- SSH servers, custom protocols
- Use direct SSH to your relay:
ssh -p <ssh-port> -R 5432:localhost:5432 <client-id>@relay.example.com - Note:
via exposeis HTTP-only; TCP requires direct SSH commands
Key Use Cases:
- Share localhost with teammates in 30 seconds
- Expose services in Docker/K8s containers
- Create terminal access (ttyd) to any machine
- Test webhooks from external services
Get a public URL in seconds.
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.sh | bashWindows PowerShell:
Note: The
irm | iexpattern may be blocked by Windows Defender (AMSI). If so, use the CMD method below.
irm https://raw.githubusercontent.com/viaalink/cli/main/install.ps1 | iexWindows CMD:
curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.cmd -o %TEMP%\install.cmd && %TEMP%\install.cmdSelf-update (all platforms):
via updateReleases: https://github.com/viaalink/cli/releases
Windows notes:
- Binary installs to
%LOCALAPPDATA%\asd\bin\(via.exeandasd.exe). Add to PATH if prompted.- For the best experience, use Git Bash (recommended), Windows Terminal + PowerShell, or CMD.exe.
- If you skip the PATH prompt, run directly:
%LOCALAPPDATA%\asd\bin\asd --version
There is no default relay: before anything can be published, enrol this device on one. The relay's dashboard gives you an invite link; quote it so your shell passes it through unchanged:
via relay add '<invite link>'This creates a device key, registers it with the relay and makes the relay your default. Running your own relay? Add it directly:
via relay add <name> --host <host> --key <path> [--port <port>] [--domain <domain>]Run any local server. Example with Python:
python -m http.server 3000Or Node.js:
npx serve -p 3000via expose 3000You'll see output like:
📍 Published: https://app-x7k9m2.relay.example.com (answers HTTP 401)
Your app: localhost:3000
Local route: http://app.localhost (this machine only, answers HTTP 401)
That's it! Share the tunnel URL with anyone. It's HTTPS, secure, and works from anywhere.
via login signs this device in to your viaalink.com account (it opens a device-code link; --no-browser only prints it). via whoami shows the account and its licenses, via logout signs out. Login is separate from relay enrolment: it does not create relay credentials, and via relay add does not need it.
When you run via expose 3000, here's what happens:
flowchart LR
subgraph Your Computer
A[localhost:3000]
end
subgraph Viaalink Relay
B[relay.example.com<br/>HTTPS + auto-cert]
end
subgraph Anyone
C[User Browser]
end
A -->|SSH tunnel| B
C -->|HTTPS| B
- The CLI opens an SSH tunnel from your machine to the relay you enrolled on
- The relay provides a public HTTPS URL with automatic certificates
- Anyone with the URL can access your local service securely
Your tunnel URL depends on the relay. On a relay shared by several devices, the relay appends this device's client id:
https://<prefix>-<client-id>.<relay-domain>
^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^
| | |
Your name Unique ID The relay's domain
(optional)
Example: https://myapp-x7k9m2.relay.example.com
On your own (dedicated) relay nothing is appended: https://myapp.relay.example.com.
To publish through a different relay or domain for one command, pass --server <relay-name> or --domain <host>:
via expose 3000 --server <relay-name>
via expose 3000 --domain <host>- HTTPS - Encrypted connection, no certificate setup needed
- Public URL - Accessible from anywhere on the internet
- Firewall bypass - No port forwarding or router configuration
- Instant setup - Works in seconds, not hours
Tunnels stay up while the CLI's relay client (asd-tunnel) runs, and auto-reconnect if the connection drops. Any limits are set by the relay you use.
Choose the method that fits your workflow:
| Need | Method | Complexity |
|---|---|---|
| Share something RIGHT NOW | via expose |
Simplest |
| Daily development workflow | asd.yaml config |
Medium |
| CI/CD and containers | Relay key via via auth export |
Advanced |
All three publish through a relay, so enrol one first (via relay add '<invite link>', see Quick Start).
The fastest way to share a local port.
Basic usage:
via expose 3000With a custom name:
via expose 3000 --name myapp
# Result: https://myapp-x7k9m2.relay.example.comThe --name sets a prefix. On a shared relay the URL is <name>-<client-id>.<relay-domain>; on your own relay it is <name>.<relay-domain>.
Pick the relay or domain:
via expose 3000 --server <relay-name> # Publish through a named relay
via expose 3000 --domain <host> # ...under one of its other domainsLocal only (no tunnel):
via expose 3000 --local-onlyManaging exposed services:
via expose list # List all exposed services (shows tunnel URLs!)
via expose stop myapp # Stop by name
via expose stop 3000 # Stop by portExample via expose list output:
myapp
Published: https://myapp-x7k9m2.relay.example.com
Port: 3000
Status: ✅ Online
Uptime: 🕐 2h 15m
Interactive prompts:
When running in a terminal, via expose prompts you for the port if you leave it out, and offers to install the relay client (asd-tunnel) if it is missing. If this device is not enrolled on a relay yet, enrol it with via relay add '<invite link>'.
When to use: Quick demos, one-off sharing, testing webhooks.
For ongoing development, define services in your project.
Setup:
cd your-project
via init # Creates asd.yaml and workspaceEdit asd.yaml:
version: 1
project:
name: "my-app"
network:
services:
frontend:
dial: "127.0.0.1:3000"
host: "app.localhost" # Local hostname
public: true # Enable tunnel
subdomain: "frontend" # Tunnel subdomain prefix
api:
dial: "127.0.0.1:8080"
paths: ["/api"] # Path-based routing
public: true
subdomain: "api"Automatic environment variables:
Services can declare env vars that are automatically written to .env when tunnels are created. This is useful for apps that need their own public URL (e.g., OAuth callbacks, CORS origins):
network:
services:
frontend:
dial: "127.0.0.1:5173"
public: true
subdomain: "frontend"
env:
PUBLIC_URL: "${{ macro.exposedOrigin() }}"
AUTH_CALLBACK_URL: "${{ macro.exposedOrigin() }}/auth/callback"After via net apply, .env will contain:
PUBLIC_URL=https://frontend-x7k9m2.relay.example.com
AUTH_CALLBACK_URL=https://frontend-x7k9m2.relay.example.com/auth/callbackThe parameterless exposedOrigin() reads the subdomain from the same service definition. Values support all template macros: ${{ env.* }} for env vars, ${{ macro.* }} for dynamic values. If this device isn't enrolled on a relay yet, the env var is simply skipped (not written as empty).
See Template Macros Reference for the full list of available macros including port allocation, random strings, bcrypt hashing, and more.
Apply and start:
via net apply --caddy --tunnel
via net # Open TUI dashboardTUI Controls:
| Key | Action |
|---|---|
Tab |
Cycle tabs (Services, Projects, Logs) |
Enter |
Actions menu for selected service |
Ctrl+R |
Refresh health status |
Ctrl+Q |
Quit |
| Arrow keys | Navigate services |
When to use: Daily development, team projects, multiple services.
A pipeline or container uses the key of a device you enrolled on a relay. via auth export --with-key prints it as environment variables, or you mount ~/.config/asd/tunnel into the container. See Level 3: Relay Credentials for both options.
When to use: CI/CD pipelines, Docker containers, automation.
Access your terminal from any browser, anywhere.
ttyd gives you a full shell session in your web browser. Perfect for:
- Remote debugging from your phone
- Sharing terminal access with teammates
- Accessing your dev machine from anywhere
1. Set credentials (in .env or environment):
ASD_TTYD_USERNAME=admin
ASD_TTYD_PASSWORD=your-secure-password2. Start the terminal:
via terminal start3. Access it:
| Method | URL |
|---|---|
| Local Direct | http://localhost:<port>/ |
| Via Caddy | http://via.localhost/asde/terminal/ |
| Via Tunnel | https://hub-x7k9m2.relay.example.com/asde/terminal/ |
4. Stop when done:
via terminal stopAfter starting, via terminal shows you a menu with all access URLs:
Terminal (ttyd) - Web Terminal Access
=====================================
Status: Running on port 7681
Access URLs:
Published: https://hub-x7k9m2.relay.example.com/asde/terminal/
Local route: http://via.localhost/asde/terminal/ (this machine)
Your app: http://localhost:7681/ (this machine)
Actions:
[1] Open in browser
[2] Copy tunnel URL
[3] Stop terminal
| Access Method | When to Use |
|---|---|
| Local Direct | On the same machine |
| Caddy Route | This machine (other devices on the LAN only with network.caddy.lan_access: true) |
| Tunnel | Remote access from anywhere |
All ttyd settings go in your .env file:
| Variable | Default | Description |
|---|---|---|
ASD_TTYD_PORT |
(auto) | Port number (auto-assigned if not set) |
ASD_TTYD_USERNAME |
(required) | Login username |
ASD_TTYD_PASSWORD |
(required) | Login password |
ASD_TTYD_SHELL_CMD |
bash |
Shell to run (bash, zsh, fish) |
ASD_TTYD_CWD |
workspace | Starting directory |
ASD_TTYD_PATH |
/ |
URL path prefix |
Example .env:
ASD_TTYD_USERNAME=developer
ASD_TTYD_PASSWORD=dev-secret-123
ASD_TTYD_SHELL_CMD=zshTo access your terminal from anywhere:
1. Start terminal and tunnel:
via terminal start
via net apply --tunnel2. Get the tunnel URL:
via terminal
# Shows tunnel URL in the menu3. Share the URL - Anyone with the URL and credentials can access your terminal.
ttyd is security-sensitive. It provides full shell access to your machine.
- Always use strong passwords - At least 12 characters, mixed case/numbers
- Don't share credentials - Give each user their own account if possible
- Use tunnels carefully - Anyone with the URL + password has shell access
- Stop when not needed -
via terminal stop
When project-level authentication is enabled, ttyd automatically gets protected.
"Missing username or password":
# Set in .env:
ASD_TTYD_USERNAME=admin
ASD_TTYD_PASSWORD=your-password"Port already in use":
via terminal stop
# Or manually: kill the process using the port
lsof -i :7681 | grep ttyd
kill <pid>"Can't connect via tunnel":
# Ensure tunnel is active:
via net # Check hub service has tunnel URL
via net apply --tunnel # Re-apply if needed"Binary not found":
via init # Re-downloads binariesRun Visual Studio Code in your browser with full extension support.
code-server runs VS Code in a browser. Get the full VS Code experience from any device:
- Edit code on a tablet or Chromebook
- Use your powerful desktop from a laptop
- Share a development environment with teammates
| Platform | Status | Notes |
|---|---|---|
| Linux | ✅ Supported | Primary platform, recommended |
| macOS | ✅ Supported | Works natively |
| Windows (WSL) | ✅ Supported | Use WSL2 with Ubuntu/Debian |
| Windows (native) | ❌ Not available | No native Windows builds |
Windows Users: code-server does not provide native Windows builds. To use code-server on Windows:
- Recommended: Install WSL2 with Ubuntu
- Run Viaalink CLI inside WSL:
via code start - Access from your Windows browser at the provided URL
We are actively exploring alternatives for native Windows support. Options under consideration include:
- VS Code tunnels (official Microsoft remote development)
- OpenVSCode Server
- Other browser-based IDE solutions
1. Start code-server:
via code start2. Access it:
| Method | URL |
|---|---|
| Local Direct | http://localhost:<port>/ |
| Via Caddy | http://via.localhost/asde/codeserver/ |
| Via Tunnel | https://hub-x7k9m2.relay.example.com/asde/codeserver/ |
3. Stop when done:
via code stopSame pattern as ttyd. Run via code for the interactive menu:
VS Code Server - Browser-based IDE
==================================
Status: Running on port 8080
Access URLs:
Published: https://hub-x7k9m2.relay.example.com/asde/codeserver/
Local route: http://via.localhost/asde/codeserver/ (this machine)
Your app: http://localhost:8080/ (this machine)
Actions:
[1] Open in browser
[2] Copy tunnel URL
[3] Stop code-server
Configure in .env:
| Variable | Default | Description |
|---|---|---|
ASD_CODESERVER_PORT |
(auto) | Port number |
ASD_CODESERVER_AUTH |
none |
Auth mode: none or password |
ASD_CODESERVER_PASSWORD |
- | Password (when auth=password) |
ASD_CODESERVER_WORKSPACE |
project root | Folder to open |
Example .env:
ASD_CODESERVER_AUTH=password
ASD_CODESERVER_PASSWORD=vscode-secret-123No authentication (local only):
ASD_CODESERVER_AUTH=none
# Safe for local-only access1. Enable password authentication:
# In .env:
ASD_CODESERVER_AUTH=password
ASD_CODESERVER_PASSWORD=your-secure-password2. Start code-server and tunnel:
via code start
via net apply --tunnel3. Get the tunnel URL:
via code
# Shows tunnel URL in menucode-server provides the full VS Code experience:
- Extensions - Install from Open VSX marketplace
- Integrated Terminal - Full shell access
- Git Integration - Full source control
- Settings Sync - Your preferences everywhere
- Multiple Files - Tabs, split views, everything
code-server is security-sensitive. It provides code editing and terminal access.
- Use password auth for remote access - Set
ASD_CODESERVER_AUTH=password - Strong passwords - At least 12 characters
- Project-level auth - Enable
basic_authinasd.yamlfor extra protection - Stop when not needed -
via code stop
code-server can have two authentication layers:
- Caddy basic auth - Protects the route (browser login prompt)
- codeserver internal auth - Application-level password
Known limitation: When using Caddy basic auth (basic_auth in asd.yaml), the credentials are NOT forwarded to code-server. Caddy strips the Authorization header before proxying.
This means:
- Caddy validates the user at the gateway
- code-server doesn't know who logged in via Caddy
Recommendation for remote access:
Use code-server's internal authentication instead of (or in addition to) Caddy basic auth:
# In .env
ASD_CODESERVER_AUTH=password
ASD_CODESERVER_PASSWORD=your-secure-passwordThis ensures code-server manages its own session, regardless of Caddy's auth layer.
"Can't install extensions":
code-server uses Open VSX, not the Microsoft marketplace. Most popular extensions are available, but some Microsoft-specific ones aren't.
"Port conflict":
via code stop
# Or kill manually:
lsof -i :8080 | grep code-server
kill <pid>"Authentication failing":
# Check your auth settings:
grep ASD_CODESERVER .env
# Ensure you're using the right password"Slow performance":
- Close unused tabs and terminals
- Disable unnecessary extensions
- Use a stable network connection
Protect your services from unauthorized access.
Viaalink CLI provides three levels of security:
| Level | Who Can Access | When to Use |
|---|---|---|
| No Auth | Anyone with URL | Local development, testing |
| Basic Password | Anyone with URL + password | Remote access, demos |
| Relay Credentials | Devices enrolled on your relay | CI/CD, automation |
flowchart LR
subgraph "Level 1: No Auth"
A1[Anyone with URL]
end
subgraph "Level 2: Basic Auth"
A2[URL + Password]
end
subgraph "Level 3: Relay Credentials"
A3[Enrolled Devices]
end
A1 --> Local[Local Dev]
A2 --> Remote[Remote Access]
A3 --> CI[CI/CD Automation]
When you expose without service auth:
via expose 3000
# → https://myapp-x7k9m2.relay.example.comYour local service on localhost:3000 becomes accessible via a public HTTPS URL.
Traffic flow: Internet → HTTPS → SSH tunnel (encrypted) → Caddy → your service
Good for: Quick demos, teammate collaboration, trusted sharing
Add password for: Sensitive data, long-running tunnels, public demos
Safe for:
- Local-only access (
localhost) - Trusted networks
- Quick demos where you can rotate the URL
Not safe for:
- Services with sensitive data
- Long-running tunnels
- Production environments
Add HTTP Basic Authentication to your services.
Project-wide authentication:
# asd.yaml
network:
caddy:
basic_auth:
enabled: true
realm: "My Project"Set credentials in .env:
ASD_BASIC_AUTH_USERNAME=admin
ASD_BASIC_AUTH_PASSWORD=your-secure-password-hereWhat users see:
When accessing your service, browsers show a login dialog asking for username and password.
Per-service override:
# asd.yaml
network:
caddy:
basic_auth:
enabled: true
services:
public-api:
dial: "127.0.0.1:3000"
basic_auth:
enabled: false # No auth for this service
admin-panel:
dial: "127.0.0.1:8080"
basic_auth:
enabled: true
realm: "Admin Only"Some services are automatically treated as security-sensitive:
| Service | Default Behavior |
|---|---|
| ttyd | Always requires credentials |
| codeserver | Recommends password auth |
These services provide shell or code access - they should always have authentication when publicly accessible.
ttyd credentials:
ASD_TTYD_USERNAME=admin
ASD_TTYD_PASSWORD=your-ttyd-passwordcodeserver credentials:
ASD_CODESERVER_AUTH=password
ASD_CODESERVER_PASSWORD=your-code-passwordA device publishes through a relay with its own device key. Choose how that key gets to where the tunnel runs:
| Method | Best For | viaalink.com account required |
|---|---|---|
via relay add '<invite link>' |
Any device you enrol on a relay | No |
| SSH key in Docker | Docker, CI | No (an enrolled key) |
The relay's dashboard gives you an invite link. Enrolling generates a device key, registers it with the relay and makes the relay this device's default:
via relay add 'https://relay.example.com/_relay/enroll#t=…'
via relay list # See the relays this device is enrolled onAfter that, via expose and via net apply --tunnel publish through it.
Managing relays:
via relay info <name> # Details of one relay
via relay set <name> # Make it the default relay
via relay rotate-key [name] # Replace this device's key on its relay
via relay remove <name> # Sign the device out of the relay, then remove it locallyFor a self-hosted or private relay, add it with its SSH key instead of a link:
via relay add <name> --host <host> --key <path> [--port <port>] [--domain <domain>]via login is separate: it signs this device in to your viaalink.com account
(via whoami shows it, via logout signs out) and does not create relay
credentials.
Two ways to use your SSH key credentials inside Docker containers:
Option A: Volume mount (simplest)
Mount your credential directory into the container:
docker run -v ~/.config/asd/tunnel:/root/.config/asd/tunnel:ro my-image
# Inside container: via expose 3000 ← just worksThe CLI automatically resolves key paths even when the host path differs from the container path.
Option B: Environment variables
Pass SSH key content as env vars — no file mounting needed:
# Export credentials (convenience command)
eval $(via auth export --with-key)
# Or with Docker flags
docker run \
$(via auth export --docker --with-key) \
my-image via expose 3000via auth export --with-key outputs:
export VIA_TUNNEL_KEY="<base64-encoded-private-key>"
export VIA_TUNNEL_KEY_ID="<key-id>"
export VIA_TUNNEL_HOST="relay.example.com"
export VIA_TUNNEL_PORT="2222"
export VIA_TUNNEL_HOST_KEY_FINGERPRINTS="SHA256:...,SHA256:..."Without --with-key the private key (VIA_TUNNEL_KEY) is left out. Use
--docker for Docker -e flag format instead of shell exports. For GitHub
Actions, via gh setup stores the key as repository secrets without printing
it.
| Scenario | Recommended |
|---|---|
| Local development | No auth |
| Quick demo (< 1 hour) | No auth (URL is secret enough) |
| Remote access to your machine | Basic password |
| Sharing with teammates | Basic password |
| CI/CD pipelines | SSH key env vars (via auth export) |
| Docker containers | Volume mount or via auth export |
| Production | Don't use development tunnels! |
For ASD_BASIC_AUTH_PASSWORD, ASD_TTYD_PASSWORD, and ASD_CODESERVER_PASSWORD:
- Minimum 12 characters
- Mix of letters, numbers, symbols
- Never reuse passwords
- Don't commit to git - Use
.env(already gitignored)
Generate a strong password:
openssl rand -base64 24
# Example output: K7mX9pQr2sT8vW1yB4cF6dH3Every service can be accessed three ways.
Viaalink CLI uses Caddy as a local reverse proxy between the tunnel and your services:
Internet → Viaalink Relay → SSH Tunnel → Caddy (local) → Your Service
↑
Security layer
Currently Available:
- ✅ HTTPS on all Caddy routes
- ✅ HTTP Basic Authentication (password protection)
- ✅ Health check endpoints
- ✅ Request routing (host + path based)
Configuration:
network:
caddy:
basic_auth:
enabled: trueCaddy API client: the CLI includes npm tooling for Caddy API configuration.
These are planned but not yet implemented:
- ⏳ OIDC (OpenID Connect)
- ⏳ JWT validation at edge
- ⏳ LDAP / Active Directory
- ⏳ 2FA / MFA enforcement
- ⏳ Edge authentication (relay level)
For current options, see BASIC_AUTH.md.
| Pattern | URL Example | Use Case |
|---|---|---|
| Local Direct | http://localhost:3000 |
Same machine |
| Caddy Route | http://via.localhost/myapp/ |
This machine (LAN with network.caddy.lan_access: true) |
| Tunnel Remote | https://myapp-x7k9m2.relay.example.com/ |
Anywhere |
flowchart TB
subgraph Access Patterns
direction TB
L[Local Direct<br/>localhost:3000]
C[Caddy Route<br/>app.localhost]
T[Tunnel Remote<br/>app-x7k9m2.relay.example.com]
end
L --> App[Your App]
C --> Caddy[Caddy :80] --> App
T --> Cloud[Viaalink Relay] --> Tunnel[SSH Tunnel] --> Caddy
Direct connection to the service port.
http://localhost:<port>/
Example: http://localhost:3000/
When to use:
- Developing on the same machine
- Maximum performance (no proxy)
- Debugging network issues
How it works:
Browser --> localhost:3000 --> Your App
Access through the local Caddy reverse proxy.
Host-based routing:
http://<service>.localhost/
Example: http://myapp.localhost/
Path-based routing:
http://via.localhost/<path>/
Example: http://via.localhost/api/
A service with neither its own path nor its own host gets /via/<service>
on the project host (via.localhost unless project.domain names another).
Workspaces made before this used asd.localhost and /asde/<service>; after
via net apply that old address answers with a redirect to the new one, so
bookmarks keep working.
Built-in services use the /asde/ path prefix:
- terminal:
http://via.localhost/asde/terminal/ - codeserver:
http://via.localhost/asde/codeserver/
When to use:
- Multiple services with nice URLs
- Testing with realistic hostnames
- Accessing from other devices on the LAN (opt in with
network.caddy.lan_access: true)
How it works:
Browser --> Caddy (:80) --> localhost:3000 --> Your App
Access through the public HTTPS tunnel.
https://<prefix>-<id>.<relay-domain>/
Example: https://myapp-x7k9m2.relay.example.com/ (on your own relay: https://myapp.relay.example.com/)
When to use:
- Remote access from anywhere
- Sharing with external users
- Testing webhooks from external services
- Accessing from mobile devices
How it works:
Browser --> Relay --> SSH Tunnel --> Caddy --> Your App
(encrypted)
| Service | Local | Caddy | Tunnel |
|---|---|---|---|
| Your app | http://localhost:3000 |
http://myapp.localhost |
https://myapp-x7k9m2.relay.example.com |
| terminal | http://localhost:7681 |
http://via.localhost/asde/terminal/ |
https://hub-xxx.../asde/terminal/ |
| codeserver | http://localhost:8080 |
http://via.localhost/asde/codeserver/ |
https://hub-xxx.../asde/codeserver/ |
For quick expose:
via expose 3000
# Output shows all URLsFor project services:
via net
# TUI shows all service URLsFor built-in services:
via terminal # Shows ttyd URLs
via code # Shows codeserver URLsCommand not found: via
The CLI isn't installed or not in PATH.
# Reinstall
curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.sh | bash
# Or check PATH
echo $PATHWindows: asd not found after install
The install directory may not be in PATH. Either:
Option 1: Run with full path:
%LOCALAPPDATA%\asd\bin\asd --versionOption 2: Add to PATH (run in Admin PowerShell):
$installDir = "$env:LOCALAPPDATA\asd\bin"
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
[Environment]::SetEnvironmentVariable("PATH", "$path;$installDir", "User")Restart your terminal after adding to PATH.
Windows: Antivirus flags asd as suspicious
The CLI's binary installer downloads and manages tool binaries (Caddy, ttyd, GitHub CLI, etc.) on your behalf. This involves operations that antivirus heuristics sometimes flag:
- Downloading executables from the internet
- Extracting zip archives via PowerShell
- Creating
.cmdwrapper scripts for Unix compatibility
Why this happens: Windows Defender and other AV engines use behavioral heuristics that flag patterns common in both legitimate DevOps tools and malware. Compiled JavaScript runtimes (Bun/Node.js) are especially prone to false positives.
What we do to prevent it:
- All PowerShell calls use
execFileSync("powershell.exe", [args])with argument arrays (not string interpolation) - Browser opening uses
explorer.exe(notcmd /c start) - No direct
cmd.exeorpowershell.exespawning for shell commands - No detached hidden processes (
detached: true+stdio: "ignore") - Automated AV pattern scanning in CI catches risky code patterns before release
If your AV blocks asd:
- Whitelist the install directory: Add
%LOCALAPPDATA%\asd\to your AV exclusion list - Report the false positive: Submit
asd.exeto your AV vendor's false positive portal:- Microsoft Defender (select "Software developer")
- BitDefender
- Verify integrity: Run
asd --versionto confirm the binary is authentic
Windows: Post-installation details
See Quick Start > Step 1: Install for all install commands (PowerShell, Linux/macOS).
After installation:
Binary downloads (Caddy, ttyd, gh, busybox) are managed automatically. On Windows:
- Zip archives are extracted via PowerShell
Expand-Archive(AV-safe) - A
bash.cmdwrapper is created for Unix shell compatibility via BusyBox - All binaries are stored in
%LOCALAPPDATA%\asd\bin\
Port already in use
Another process is using the port.
# Find what's using the port
lsof -i :3000
# Kill it
kill <pid>
# Or use a different port
via expose 3001Tunnel not connecting
Authentication or network issues.
# Check which relays this device is enrolled on (and the default)
via relay list
via relay info <name>
# Diagnose the connection
via diagnose
# Not enrolled on a relay yet?
via relay add '<invite link>'
# Reset tunnels
via net expose resetService not appearing in TUI
Registry out of sync.
# Refresh services
via net refresh
# Or full reset
rm .asd/workspace/network/registry.json
via net applyCaddy won't start
Caddy configuration issue.
# Stop and remove state
via caddy stop
rm -rf .asd/workspace/caddy/
# Restart
via caddy start
via net applyFull Reset (Nuclear Option)
When everything is broken:
# Stop all processes
pkill -f "caddy run"
pkill -f "asd-tunnel"
# Remove all state
rm -rf .asd/workspace/
# Reinitialize
via init
via net apply --caddy --tunnelDebug Mode
Enable verbose logging:
ASD_DEBUG=1 via net applyView Logs
via logs caddy # Caddy proxy logs
via logs tunnel # Tunnel logs
# Logs are in .asd/workspace/logs/- GitHub Issues: https://github.com/viaalink/cli/issues
- Releases: https://github.com/viaalink/cli/releases
Quick reference of most-used commands:
| Command | Description |
|---|---|
via init |
Initialize project workspace |
via run <task> |
Run automation task from asd.yaml |
via expose <port> |
Expose a port instantly |
via login |
Sign in to your viaalink.com account (via whoami, via logout) |
via relay add '<link>' |
Enrol this device on a relay (relay credentials) |
via relay list |
List the relays this device is enrolled on |
via net |
Open network TUI |
via net apply |
Apply configuration |
via terminal |
Web terminal menu |
via code |
VS Code server menu |
via config validate |
Validate asd.yaml configuration |
via skill install |
Install AI assistant skills |
via update |
Update Viaalink CLI |
Full command reference: um_commands.md
- asd.yaml options: um_asd_yaml.md
- Basic auth details: BASIC_AUTH.md
- Tunnel architecture: TUNNELING.md
- All services: um_service.md
- Feature maturity: FEATURE_MATURITY.md
- Android/Termux: um_termux.md
Throughout the documentation:
| Symbol | Meaning |
|---|---|
| ✅ | Production - fully tested, recommended |
| 🟢 | Stable - works reliably |
| 🟡 | Beta - functional, may have rough edges |
| 🟠 | Alpha - experimental |
Viaalink CLI supports different tunnel protocols for different use cases.
Most services use HTTP tunneling over ports 80 and 443:
- Web applications
- REST APIs
- WebSocket connections (like ttyd)
- GraphQL endpoints
HTTP tunnels are the default and require no special configuration:
# asd.yaml - HTTP tunnel (default)
network:
services:
my-app:
dial: "127.0.0.1:3000"
public: true # Creates HTTPS tunnelTCP port forwarding works via direct SSH commands. Any port other than 80/443 is forwarded as raw TCP.
Use cases:
- Databases (PostgreSQL, MySQL, Redis)
- SSH servers
- Custom binary protocols
- Game servers
Examples:
# Expose PostgreSQL on a random public port
ssh -p <ssh-port> -R 5432:localhost:5432 $ASD_CLIENT_ID@relay.example.com
# Expose MySQL
ssh -p <ssh-port> -R 3306:localhost:3306 $ASD_CLIENT_ID@relay.example.com
# Expose Redis
ssh -p <ssh-port> -R 6379:localhost:6379 $ASD_CLIENT_ID@relay.example.comvia relay info <name> shows the relay's SSH host and port. The relay assigns a random public port and reports it back in the SSH session output.
Note: The via expose command currently supports HTTP tunnels only. For TCP:
- Use direct SSH forwarding as shown above
- Enrol on a relay with
via relay add '<invite link>'first to get credentials
Private TCP aliases (e.g., ssh -R mydb:5432:localhost:5432 ...) require the --tcp-aliases flag on the relay. It is disabled by default for security; a relay you run yourself can enable it.
| Protocol | Ports | Use Case | Encryption |
|---|---|---|---|
| HTTP/HTTPS | 80, 443 | Web apps, APIs, WebSockets | TLS via Caddy |
| TCP | Any (random assigned) | Databases, SSH, custom | SSH tunnel encryption |
| TCP Alias | Private (self-hosted only) | Team-only access | SSH tunnel + no public port |
WebSocket connections work automatically through HTTP tunnels. This is how ttyd (web terminal) works:
- Browser connects via HTTPS to tunnel URL
- HTTP connection upgrades to WebSocket
- Caddy's reverse proxy handles the upgrade correctly
- Real-time bidirectional communication established
No special configuration needed - Caddy's vulcand/oxy forwarding library handles WebSocket upgrades transparently.
Example: ttyd WebSocket flow:
Browser --HTTPS--> Tunnel --> Caddy --WS--> ttyd:7681
(upgrade handled)
| Scenario | Protocol | Example |
|---|---|---|
| Web app demo | HTTP | via expose 3000 |
| API testing | HTTP | public: true in asd.yaml |
| Database access | TCP | ssh -R 5432:localhost:5432 ... |
| SSH access | TCP | ssh -R 22:localhost:22 ... |
| Team-only database | TCP Alias | Self-hosted with --tcp-aliases |
For maximum control, you can bypass the CLI and connect directly via OpenSSH with this device's relay key:
ssh -i <path-to-device-key> \
-p <ssh-port> \
-R "myapp:80:localhost:3000" \
"$ASD_CLIENT_ID@relay.example.com"via relay info <name> shows the SSH host and port; via auth export --with-key prints the key (base64-encoded).
When to use:
- CI/CD pipelines needing minimal dependencies
- Custom scripting scenarios
- Debugging connection issues
Viaalink CLI includes built-in Supabase support. When enabled, it automatically detects running Supabase services, routes them through Caddy, and makes them available in the via net TUI.
project:
name: "my-app"
plugins: [supabase]When enabled, the CLI:
- Detects running Supabase services
- Registers them in the network
- Creates Caddy routes for each service
- Makes them available in the
via netTUI
Services:
| Service | Port | Description |
|---|---|---|
supabase:studio |
54323 | Database GUI |
supabase:kong |
54321 | API Gateway |
supabase:mailpit |
54324 | Email testing UI |
# Bootstrap Supabase + extract env vars to .env
via supabase bootstrap
# Start/stop Supabase services
via supabase start
via supabase stop
# Extract environment variables to .env
via supabase extractThe bootstrap command extracts credentials from Supabase and adds them to .env:
PUBLIC_SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_ROLE_KEY=eyJ...
SUPABASE_API_URL_LOCAL=http://127.0.0.1:54321
SUPABASE_DB_URL_LOCAL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
# ... and moreWe plan to add more integrations over time (Redis, Meilisearch, MinIO, etc.). If you need a specific integration sooner, let us know.
- GitHub Issues: Report bugs, request features at https://github.com/viaalink/cli/issues
Pre-built Docker containers give you a portable development environment. For the full reference, see um_docker.md.
A complete development environment in a container (~750 MB). Includes Viaalink CLI, Caddy, the relay client (asd-tunnel), ttyd, VS Code Server, Claude Code, and tmux.
# Interactive sandbox (recommended)
via sandbox shellvia sandbox shell mounts this device's relay credentials (~/.config/asd/tunnel) read-only, so tunnels work inside the container without a new enrolment.
Features:
- Interactive menu with system info, running services, and active tunnel URLs
- Tmux session management (detach with
Ctrl+B D, reattach withdocker start -ai) - Project workspace mounted at
/workspace
To use relay credentials in your own containers, see Level 3: Relay Credentials.
See um_docker.md for environment variables, volume mounts, GitHub Actions examples, and more.
Install:
curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.sh | bashEnrol on a relay (once per device):
via relay add '<invite link>'Sign in to your viaalink.com account (optional):
via loginInitialize workspace:
via init --yesStart development:
via run dev # Run 'dev' task from asd.yamlExpose a service:
via expose 3000Diagnose connection:
via diagnoseSwitch relay:
via relay # Interactive picker
via relay list # Show all relays
via relay set <name> # Set the default relayWeb terminal:
via terminal startVS Code in browser:
via code startStop everything:
via down # Stop workspace servicesFor detailed technical reference, see the documents in .asd/docs/.