Skip to content

Managed service listens on 0.0.0.0 by default, with no lasting way to bind loopback #26012

Closed

Description

@grahamfarrar

On macOS, the server run by t3 service install listens on 0.0.0.0 when no host is given, so it's reachable from the LAN as well as from the machine itself. The only way to change that is an environment variable in the launchd plist, which T3 rewrites on install or repair.

Where it comes from (0.1.3 server):

const privateNetworkOnly = isNone(explicitHost) && mode === "web" && launcher.managed;
const host = getOrElse(explicitHost, () => privateNetworkOnly ? "0.0.0.0" : mode === "desktop" ? "127.0.0.1" : undefined);

server-runtime.json shows "host":"0.0.0.0","privateNetworkOnly":true,"serviceManaged":true.

What's exposed: from another device on the LAN, / and /api/health return 200 without credentials. API routes return 401 (missing_credential), so it's auth-gated. But it's an agent server that can run shell commands, so the LAN gets attack surface for nothing when every client uses localhost, Tailscale Serve (HTTPS) or T3 Connect. The desktop app also adds a "found automatically" plain-HTTP route on the tailnet IP because of this bind.

Workaround: add T3CODE_HOST=127.0.0.1 under EnvironmentVariables in ~/Library/LaunchAgents/com.t3tools.t3code.service.plist, then bootout and bootstrap the service. After that it binds 127.0.0.1:3773, and localhost, Tailscale Serve and T3 Connect all still work. t3 service install or a repair drops the variable.

Request

  1. Make loopback the default for the managed service, with LAN exposure opt-in, or at least have it follow the Connections → Network access toggle ([Bug]: WSL backend binds 0.0.0.0 while "Network access" is off and the UI says "Limited to this machine" #9056 is the same mismatch on the WSL backend).
  2. Add t3 service install --host <addr> and persist it in the generated unit so it survives updates and repairs.

Version: server 0.1.3, desktop 0.1.3, macOS 26.6.2.

Activity

  1. locked and limited conversation to collaborators on Oct 27, 2026
  2. converted this issue into a discussion #26014 on Oct 27, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions