Skip to content

t3 pair --tailscale hides the operator permission error behind "run it by hand to see why" #37459

Closed

Description

@daviesayo

What happened

On Ubuntu, t3 pair --tailscale failed with a message that hides the reason:

TailscaleServeFailedError: tailscale serve failed for HTTPS port 443. Run tailscale serve --https=443 --bg <local-url> by hand to see why.

When I ran the command by hand, tailscale gave the exact cause and fix:

sending serve config: Access denied: serve config denied
Use 'sudo tailscale serve --https=443 --bg http://127.0.0.1:3773'.
To not require root, use 'sudo tailscale set --operator=$USER' once.

Because Serve was never set up, the machine had no HTTPS address. Linking it from another environment then failed, because Link refuses plain http (#26450).

Diagnosis

runTailscaleCommand (packages/tailscale/src/tailscale.ts) already sorts stderr into stderrDiagnostic. "Access denied" maps to permission-denied.

apps/server/src/cli/pair.ts (~line 442) checks only stderrDiagnostic === "unsupported-target". Every other diagnostic becomes TailscaleServeFailedError, and its message (~line 142) is the fixed "run it by hand to see why" text. So the CLI knows the cause and throws it away.

scripts/lib/dev-share.ts already maps diagnostics to explanations (DIAGNOSTIC_EXPLANATIONS). pair.ts could do the same. For permission-denied on Linux, the useful message is: "Run sudo tailscale set --operator=$USER once, then run this command again." TailscaleServeFailedError should also carry the diagnostic.

Source references are from the v0.1.10-nightly.20261116.4761 tag. The message is unchanged on main today.

Steps to reproduce

  1. On Linux, use a tailnet with HTTPS certificates on, and leave the operator unset (tailscale debug prefs | jq .OperatorUser prints null).
  2. Run t3 serve as a normal user.
  3. Run t3 pair --tailscale.
  4. See TailscaleServeFailedError ... by hand to see why and a stack trace, with no mention of permissions or the operator.

Version

0.1.10-nightly.20261116.4761 (the t3 serve and t3 pair on the Linux host; the desktop client is on the same build)

Environment

Host: Ubuntu 26.04 x64, t3 serve run as a background service by user rocket, Tailscale with MagicDNS and HTTPS certificates on, operator unset. Client: T3 Code Desktop 0.1.10-nightly.20261116.4761 on macOS 27 arm64.

Evidence

Output of `tailscale serve --https=443 --bg http://127.0.0.1:3773` as the same user, and the CLI stack trace (paths redacted), are in What happened. Screenshot to be attached after the issue is created.

Related issues

#26450 (Link refuses plain http, so HTTPS from Serve is the only Tailscale route), #16238 (Serve failures only logged as a warning in t3 serve)

Fix applied or workaround

Ran sudo tailscale set --operator=$USER once on the host. After that, t3 pair --tailscale set up https://..ts.net/ and printed an HTTPS pairing URL, and linking worked.

Filed by

Claude Opus 5.5 in Claude Code, on behalf of Davies (@daviesayo), via t3 triage

Activity

  1. added
    via-triage
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions