Commands
Every link-host command and option.
link-host <command> [options]| Command | Does |
|---|---|
ssh setup | Turn on Link's SSH server and print a pairing code |
ssh connect | Print a connection code for an SSH server that already runs |
devices | List or remove paired phones |
relay deploy | Put Link's relay on your Cloudflare account |
channel | Link's Claude Code channel |
status | Is Link Host running? |
doctor | Check this computer is ready |
desktop | The desktop stream (the app starts it) |
serve | Link Host's service (the installer starts it) |
version | Print the version |
ssh setup
Turns on Link's SSH server for your account and prints a one-time pairing code as a QR code, then waits until a phone uses it. Linux only. Run it without sudo. See Pair your phone.
link-host ssh setup [options]| Option | |
|---|---|
--host ADDRESS | Address the phone should use (IP or hostname). Default: the address of this computer's default route |
--port N | Port the phone connects to. Default 2222 (22 with --system) |
--relay wss://… | Pair through a Link relay; remembered for later setups |
--rendezvous URL | Where phones find this computer to connect directly (an ntfy server). Default https://ntfy.sh; off to use only the address in the code |
--system | Set up the system's OpenSSH service instead (asks for your password; the phone then signs in with your account password) |
--local-port N | Local SSH port to read the host key from. Default: --port |
--username NAME | Existing account to sign in to. Default: you |
--json | Print only the public connection details as JSON |
ssh connect
Prints a connection code (and its QR code) for an SSH server that's already running: the system's OpenSSH on Linux, Remote Login on macOS, OpenSSH Server on Windows. The code holds the address, account and host key, never a secret; the phone signs in with your password. It changes no services.
link-host ssh connect [--host ADDRESS] [--port 22] [--local-port N] [--username NAME] [--json]--port only describes the port the phone connects to; it doesn't reconfigure the server. Use --local-port when the server listens locally on a different port than the one the phone uses (port forwarding on a router, for instance).
devices
link-host devices # list paired phones and unused codes
link-host devices remove ID-or-NAME # unpair a phoneEach phone shows its id (the start of its key's fingerprint), name, pairing date and when it last connected. remove deletes the phone's key (and its relay token) and restarts Link's SSH server, ending that phone's open sessions.
relay deploy
link-host relay deploy [--account ACCOUNT_ID]Uploads Link's relay to your Cloudflare account as the Worker link-relay and prints its address. Asks for a Cloudflare API token (made with the "Edit Cloudflare Workers" template), or reads it from CLOUDFLARE_API_TOKEN. --account picks the account when the token can see several.
| Environment | |
|---|---|
CLOUDFLARE_API_TOKEN | The token, instead of typing it |
LINK_TURN_KEY_ID, LINK_TURN_KEY_API_TOKEN | A Cloudflare Realtime TURN key to put on the relay |
channel
Link's Claude Code channel (Claude in a terminal).
link-host channel setup # register it with Claude Code (claude mcp add)
link-host channel list # process ids of sessions started with the channellink-host channel with no arguments is the MCP server itself, which Claude Code starts. send, pending and answer are what the phone runs over SSH; they exit with code 3 when the session has no channel.
status
link-host statusAsks the running service for its version, machine id, platform and start time. Exits with an error when it isn't running.
doctor
link-host doctorChecks the machine identity, FFmpeg and the desktop session (X11, or Wayland with GStreamer), then the running service.
desktop
Serves the desktop stream on a loopback address. The Link app runs this over SSH with --listen 127.0.0.1:0; you don't need to.
| Option | |
|---|---|
--listen ADDRESS | Loopback address to serve on; port 0 picks a free one. Default 127.0.0.1:46000 |
--source auto|portal|x11|test | Where the picture comes from. auto: the desktop portal on Wayland, X11 otherwise |
--fps N | Frames per second. Default 15 for H.264, 8 for JPEG |
--max-width N | Widest frame sent. Default 1280 |
--jpeg-quality N | JPEG fallback quality, 2 (best) to 31. Default 8 |
--display :N | X11 display. Default :1 |
--token TOKEN | Session token. Default: LINK_DESKTOP_TOKEN, else a new one |
--wait DURATION | How long to wait for screen sharing to be allowed. Default 2m |
--allow-xwayland | Allow X11 capture inside a Wayland session (diagnostics only) |
serve
Link Host's long-running service: keeps the computer's identity, a loopback health check on 127.0.0.1:45999, and the outgoing connection to the relay or rendezvous topic. The installer runs it at login (link-host.service, a LaunchAgent, or a scheduled task).
| Option | |
|---|---|
--listen ADDRESS | Loopback address for the health check. Default 127.0.0.1:45999 |
--state-dir DIR | Where the identity and settings live. Default: see Files on disk |
version
link-host versionlink-host 0.1.0 (linux/amd64)