> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/t/tailscale.md).

# Tailscale

Tailscale is a mesh VPN service. OctoXLabs reads the devices and users of one tailnet and adds them to the inventory.

## Use cases

* List the devices that joined your tailnet.

```
Adapters = tailscale
```

* Find tailnet devices that no endpoint detection tool reports.

```
Adapters = tailscale AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination                               | Port | Protocol |
| ------------------- | ----------------------------------------- | ---- | -------- |
| OctoXLabs connector | Tailscale API (default api.tailscale.com) | 443  | HTTPS    |

The connector always uses HTTPS on the default port. An optional HTTPS proxy can be set.

### Required permissions

The source instructions state that an access token has the same permissions as the user that owns it. Not verified: the exact role needed to list users and devices.

## Create credentials in Tailscale

{% stepper %}
{% step %}

### Open the Keys page

Open the Keys page of the admin console: <https://login.tailscale.com/admin/settings/keys>.
{% endstep %}

{% step %}

### Create an access token

Create an access token. It shares the permissions of the owning user and can expire in 1 to 90 days. Access tokens start with `tskey-api-`.
{% endstep %}

{% step %}

### Find the Tailnet ID

Open the General page of the admin console (<https://login.tailscale.com/admin/settings/general>) and copy the Tailnet ID.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter   | Required | Type     | Default           | Description                           |
| ----------- | -------- | -------- | ----------------- | ------------------------------------- |
| Domain      | No       | Text     | api.tailscale.com | Base domain of the Tailscale API.     |
| API Token   | Yes      | Password |                   | Access token, sent as a Bearer token. |
| Tailnet ID  | Yes      | Text     |                   | Tailnet ID used by the Tailscale API. |
| HTTPS Proxy | No       | Text     |                   | Proxy address.                        |
| Timeout     | No       | Integer  | 30                | Seconds to wait for API responses.    |

## Troubleshooting

| Error message                                     | Cause                                                   | Fix                                                 |
| ------------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------- |
| Request failed with status {status} for url {url} | Tailscale answered with a status other than 200 or 404. | Check the API token, its expiry and the Tailnet ID. |

## Change history

{% hint style="info" %}
Available starting from version 5.6.11.
{% endhint %}
