Skip to content

resolveNodeHost

resolveNodeHost(run?): Promise<string | null>

Defined in: src/tailscale.ts:32

Returns this node’s own Tailscale hostname (e.g. "backontop.chicken-beardie.ts.net") by parsing tailscale status --json.

WHY: when Shepherd’s HUD is fronted by a Tailscale Service identity (a different DNS name than the machine’s own node), Self.DNSName is the only reliable way to construct preview URLs that resolve from the tailnet — the Service front may live under a different hostname entirely.

Returns null on any failure (binary absent, daemon not running, JSON malformed, Self/Self.DNSName missing or empty). Never throws.

TailscaleRunner = defaultRun

Promise<string | null>