Linkdocs
Reference

Commands

Every link-host command and option.

link-host <command> [options]
CommandDoes
ssh setupTurn on Link's SSH server and print a pairing code
ssh connectPrint a connection code for an SSH server that already runs
devicesList or remove paired phones
relay deployPut Link's relay on your Cloudflare account
channelLink's Claude Code channel
statusIs Link Host running?
doctorCheck this computer is ready
desktopThe desktop stream (the app starts it)
serveLink Host's service (the installer starts it)
versionPrint 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 ADDRESSAddress the phone should use (IP or hostname). Default: the address of this computer's default route
--port NPort the phone connects to. Default 2222 (22 with --system)
--relay wss://…Pair through a Link relay; remembered for later setups
--rendezvous URLWhere phones find this computer to connect directly (an ntfy server). Default https://ntfy.sh; off to use only the address in the code
--systemSet up the system's OpenSSH service instead (asks for your password; the phone then signs in with your account password)
--local-port NLocal SSH port to read the host key from. Default: --port
--username NAMEExisting account to sign in to. Default: you
--jsonPrint 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 phone

Each 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_TOKENThe token, instead of typing it
LINK_TURN_KEY_ID, LINK_TURN_KEY_API_TOKENA 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 channel

link-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 status

Asks the running service for its version, machine id, platform and start time. Exits with an error when it isn't running.

doctor

link-host doctor

Checks 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 ADDRESSLoopback address to serve on; port 0 picks a free one. Default 127.0.0.1:46000
--source auto|portal|x11|testWhere the picture comes from. auto: the desktop portal on Wayland, X11 otherwise
--fps NFrames per second. Default 15 for H.264, 8 for JPEG
--max-width NWidest frame sent. Default 1280
--jpeg-quality NJPEG fallback quality, 2 (best) to 31. Default 8
--display :NX11 display. Default :1
--token TOKENSession token. Default: LINK_DESKTOP_TOKEN, else a new one
--wait DURATIONHow long to wait for screen sharing to be allowed. Default 2m
--allow-xwaylandAllow 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 ADDRESSLoopback address for the health check. Default 127.0.0.1:45999
--state-dir DIRWhere the identity and settings live. Default: see Files on disk

version

link-host version
link-host 0.1.0 (linux/amd64)

On this page