Tailscale Configuration

Cartography supports two ways to authenticate to the Tailscale API:

  • OAuth client (recommended) — tag-scoped, not tied to a user, exchanged at sync time for a short-lived bearer token. Matches Tailscale’s recommended pattern for service integrations.

  • API access token — long-lived, tied to a user account.

In both cases, pass --tailscale-org <tailnet-name> (find it under Settings → General). For self-hosted instances, set --tailscale-base-url (default https://api.tailscale.com/api/v2); the same base URL is used for the OAuth token endpoint.

API access token

  1. Create an API access token at Settings → Keys.

  2. Export it (e.g. TAILSCALE_TOKEN) and pass --tailscale-token-env-var TAILSCALE_TOKEN.

If both --tailscale-token-env-var and the OAuth client flags are set, the OAuth client is used and a warning is logged.