Tailscale icon

Tailscale

Manage your Tailscale tailnet — devices, routes, and more

Auth Key → Create

AI-generated

Summary

Create a new authentication key for a specified Tailscale tailnet to allow device registration with controlled properties.

Inputs

  • Authentication — Choose the authentication method, either API Key or OAuth2, to connect to the Tailscale API.
  • Tailnet Name or ID (required) — Select the target tailnet (organization) by name or ID from the list, or choose '-' for the default tailnet associated with the authenticated user.
  • Reusable — Set whether the generated auth key can be used multiple times (true) or just once (false). Defaults to false.
  • Ephemeral — Set whether devices registered with this key are ephemeral, meaning they are removed when they disconnect.
  • Preauthorized — Set whether devices registered with this key are pre-authorized and do not require manual approval.
  • Tag Names or IDs — Assign ACL tags to devices registered with this key. Tags must start with 'tag:'. Choose from the list or specify IDs via expressions.
  • No Expiry — Indicate if the key should never expire; if true, the Expiry (Seconds) field is ignored.
  • Expiry (Seconds) — Set the lifetime in seconds for the auth key; only effective if No Expiry is false. Defaults to 86400 seconds (1 day).
  • Description — Provide a human-readable description for the auth key.

Output shape

a single object containing the created auth key details as returned by the Tailscale API

The output includes properties such as the key string, ID, description, and capability flags like reusable, ephemeral, and preauthorized, reflecting the key's configuration after creation.

Examples

Example 1: Create a reusable, preauthorized auth key valid for 12 hours with certain ACL tags

Set Reusable to true, Preauthorized to true, Expiry (Seconds) to 43200, and specify desired Tag Names or IDs.

Links

Discussion