# Tailscale in your Mac’s menu bar

See your whole tailnet from the menu bar: which devices are online, when the others were last seen, and whose key is about to expire. Every device opens a page of its own with its day online, its address and owner, and buttons to approve it or turn key expiry off.

## What you’ll see

- **Tailscale:**
  - **Tailnet:** how many devices are online, the next device key to expire, how many expire within 14 days, and how many devices have a Tailscale update waiting.
  - **Devices:** every device as a dot, under Tagged, Personal and Shared with you. Green is online. Grey is offline, which laptops and phones are whenever they sleep. Orange is a key that expires within 14 days or a device waiting for approval, and red is a key that has expired or expires today. Hover over a dot for its reason or when it was last seen; click it for the device’s page. Devices with key expiry turned off never count as a problem for it, and neither do devices shared with you, whose keys belong to their own tailnet.
- **Device:** one page for every device, opened from its dot and titled with its name:
  - **Now:** online, or when it was last seen, and its key expiry when it’s close. In the corner, **Turn off key expiry** or **Turn on key expiry** (whichever applies), and **Approve device** while it waits for approval. Both Approve and turning expiry back on ask first.
  - **Online, last 24 hours:** a strip of the day, from Legato’s own checks every 5 minutes, which it keeps in History. It starts filling when you add the pages.
  - **Details:** key expiry, its Tailscale address and MagicDNS name, its owner or tags, its Tailscale version, its subnet routes and exit node, and its system.

### Status

- Watches each device’s key and approval.
- Red when a device’s key has expired or expires today, orange when it expires within 14 days or the device is waiting for approval.
- Grey for a device that’s offline, which never needs attention.
- Notifies you when it turns orange or red.

## How it connects

The pages read Tailscale’s API at `api.tailscale.com`, signed in as an OAuth client. Legato trades the client’s ID and secret for a short-lived access token and gets a new one as it runs out ([Tailscale’s OAuth clients](https://tailscale.com/docs/features/oauth-clients)). They use `-` for the tailnet, which means the client’s own tailnet.

| Request | Pages | When | What it supplies |
| --- | --- | --- | --- |
| `POST /api/v2/oauth/token` | Both | When the access token runs out | An access token for the client. |
| `GET /api/v2/tailnet/-/devices?fields=all` | Tailscale | Once a minute | Every device with its online state, last seen, key expiry, approval, tags and version. |
| `GET /api/v2/device/{param.id}?fields=all` | Device | Once a minute | One device. |
| `POST /api/v2/device/{param.id}/key` | Device | When you press Turn off key expiry or Turn on key expiry | Turns the device’s key expiry off or back on. |
| `POST /api/v2/device/{param.id}/authorized` | Device | When you press Approve device | Lets a device that’s waiting join the tailnet. |

Online means the device is connected to Tailscale’s control server, as the admin console shows it. Tailscale doesn’t publish a rate limit for its API; the pages make about 120 requests an hour with the overview and one device open. Tailscale answers every device at once, and the 1 MB cap on an answer is reached at a few hundred devices.

The client can do only what its scopes allow. Devices Core set to Read is enough for every card. The buttons need Devices Core set to Write, and Tailscale asks you to pick a tag when you choose that. With a read-only client the buttons don’t work.

[Sources and buttons](https://legatobar.com/docs/sources.md) explains each part of a page.

## Set it up

1. **Make an OAuth client.** In the Tailscale admin console, open the [Trust credentials](https://console.tailscale.com/admin/settings/trust-credentials) page, choose **Credential**, then **OAuth**. Set Devices Core to Read, or to Write with a tag if you want the buttons, and choose **Generate credential**. Copy the client ID and the client secret before you close the page.
2. **Save it in Legato.** In Settings → Secrets, save it under `tailscale-client`, bound to `api.tailscale.com`, as the client ID and the secret joined by a colon: `client-id:client-secret`. If you keep the client in 1Password, link [two references](https://legatobar.com/docs/1password.md#a-secret-in-two-fields), one to the client ID field and one to the client secret field. Installing from Legato’s gallery asks for the two in their own fields.
3. **Add the pages.** Paste the prompt into your agent, or download the two pages and run `/Applications/Legato.app/Contents/Helpers/legato set tailscale-device tailscale-device.json`, then `legato set tailscale tailscale.json`. Keep the ID `tailscale-device`: every dot opens it with its device’s ID.

The cards fill within a minute. A mistyped or revoked client is the usual reason they don’t: the card says Tailscale refused the OAuth client, and after a few tries the devices turn into one red dot.

A client doesn’t expire, so there’s nothing to renew. To stop Legato’s access, revoke the client on the Trust credentials page.

### Prompt for your agent

```prompt
Add 2 Legato pages for Tailscale, starting from https://legatobar.com/examples/tailscale.json, https://legatobar.com/examples/tailscale-device.json. Use the page IDs tailscale, tailscale-device if they’re free: the pages link to each other by those IDs, so with any other ID, change the matching legato://page/ links.

Add the pages as they are, keeping their page IDs. I’ll save my Tailscale OAuth client as tailscale-client in Settings → Secrets myself. Don’t press Approve device or the key expiry buttons to test them.

Use the local Legato MCP tools or /Applications/Legato.app/Contents/Helpers/legato.
Use list_pages first and choose an unused page ID. Do not overwrite an existing page. If I explicitly ask to update one, read its full body with get_page, preserve unrelated cards and settings, and use if_match with that version. On version_mismatch, read again before merging.
Ask me only for non-secret setup details that are missing. Never ask me to paste a password, token or API key into chat, page JSON or command arguments. Tell me to save it in Settings → Secrets for the service host, or link it from 1Password there.
Use the downloadable page, not the illustration’s sample data. Never invent readings. Fix any invalid_page paths and verify that the page loads. Do not press buttons that change the service or real devices to test it.
```

### Download the pages

- [Download Tailscale (tailscale.json)](https://legatobar.com/examples/tailscale.json)
- [Download Device (tailscale-device.json)](https://legatobar.com/examples/tailscale-device.json)

## Questions

### Can I use an API access token instead?

The pages installed from the gallery sign in with an OAuth client, because an API access token runs out and every card stops until you make a new one. If you’d rather use a token, change each source’s `auth` to `{ "type": "bearer" }` and save the token under the source’s secret name. Nothing then warns you before it expires.

### Why is an offline device grey and not red?

Phones and laptops go offline whenever they sleep, so offline isn’t a problem by itself. A device counts as a problem only for things that need you: a key about to expire, or a device waiting for approval.

### Why can’t I connect, disconnect or pick an exit node?

Those belong to the Tailscale app on this Mac, and Tailscale’s API can’t change them. The pages work with your tailnet as the admin console does.

### Does it work with Headscale?

No. Headscale has its own API, which these pages don’t read.

Legato is independent and isn’t affiliated with or endorsed by Tailscale.

## Verification

The pages were filled from a real tailnet on 11 Nov 2026, first with an API access token and later with an OAuth client. A made-up client was refused. Offline devices, expiring and expired keys, devices waiting for approval and shared devices were checked with made-up answers in the example pages’ tests, since the tailnet had none of them. Illustrations use made-up devices, people and addresses. See the [service index](https://legatobar.com/services/) for other examples.
