Skip to content

Advertise Tailscale Serve HTTPS startup URLs - #2835

Closed
johnlombardo-dev wants to merge 1 commit into
pingdotgg:mainfrom
johnlombardo-dev:codex/tailscale-serve-advertised-url
Closed

johnlombardo-dev wants to merge 1 commit into
pingdotgg:mainfrom
johnlombardo-dev:codex/tailscale-serve-advertised-url

Conversation

@johnlombardo-dev

@johnlombardo-dev johnlombardo-dev commented May 28, 2026 •

Copy link
Copy Markdown

Related to #2834

Summary

  • advertise the Tailscale Serve HTTPS URL in startup and pairing output after Serve setup completes
  • add --tailscale-serve-host / T3CODE_TAILSCALE_SERVE_HOST for explicit MagicDNS host overrides
  • fall back to the normal HTTP startup URL when Serve setup or Tailscale status discovery is unavailable

Notes

I saw the project note that PRs are not currently being accepted, so this is offered as a small implementation reference for the linked feature request. Please feel free to use, adapt, or ignore it.

Validation

  • bun fmt
  • bun lint
  • bun typecheck
  • bunx vitest run --reporter=verbose in apps/server

Note

Advertise Tailscale Serve HTTPS URLs at server startup

  • Adds resolveAdvertisedStartupBaseUrl in startupAccess.ts that builds an HTTPS Tailnet base URL when Tailscale Serve is configured, using either an explicit --tailscale-serve-host flag or MagicDNS name from tailscale status.
  • Headless serve access info (connection string and pairing URL) now uses the HTTPS Tailnet URL when available, falling back to the local HTTP base URL on error or when Tailscale Serve is unconfigured.
  • Introduces TailscaleServeRuntime in tailscaleServeRuntime.ts, a coordination service using a Deferred<boolean> to signal whether Tailscale Serve was configured successfully during server startup.
  • Adds the --tailscale-serve-host CLI flag and T3CODE_TAILSCALE_SERVE_HOST env var to override the advertised hostname.
  • Behavioral Change: startup URLs shown to users (including pairing URLs) may now be HTTPS Tailnet addresses rather than local HTTP URLs when Tailscale Serve is active.

Macroscope summarized 4c019e8.


Note

Medium Risk
Changes what users see for pairing and browser open URLs when Tailscale Serve is enabled; misconfiguration could point clients at the wrong host, but failures fall back to HTTP.

Overview
When --tailscale-serve is enabled, startup and headless pairing output can now advertise an HTTPS Tailnet base URL instead of only the local HTTP bind address.

The server adds resolveAdvertisedStartupBaseUrl, which waits on a new TailscaleServeRuntime signal (Serve setup succeeded or not), then builds the URL from --tailscale-serve-host / T3CODE_TAILSCALE_SERVE_HOST or from MagicDNS via tailscale status, with fallback to the existing HTTP URL if Serve or discovery fails. Headless connection strings, pairing URLs, and browser startup targets use that advertised URL.

Config and docs cover the new host override and MagicDNS discovery behavior.

Reviewed by Cursor Bugbot for commit 4c019e8. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b790894c-9b24-4b9e-874d-41c1adacb5be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list. labels May 28, 2026
@juliusmarminge
juliusmarminge marked this pull request as ready for review May 28, 2026 05:59
@macroscopeapp

macroscopeapp Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new user-facing behavior by changing how startup URLs are advertised based on Tailscale Serve configuration. New features that modify runtime behavior shown to users warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Closing as part of backlog cleanup: this PR is stale, currently conflicting with main, has no approval, and has not had active remediation for 30+ days. If the change is still relevant, please rebase onto current main and request reopening or submit a focused current diff. Thank you for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants