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

# Tailscale

This guide describes how to connect P0 to your Tailscale network to enable just-in-time SSH access governed by your Tailscale policy file.

### Before you begin

* You must have an active Tailscale account.
* You must have a Tailscale OAuth client with the `all` scope. OAuth clients can be generated from the [OAuth clients](https://login.tailscale.com/admin/settings/oauth) page of the admin console provided you have either an **Owner**, **Admin**, or **Network admin** role. P0 uses the client's **Client ID** and **Client secret**.
* P0 manages access by dynamically inserting temporary grants into your Tailscale policy file. Ensure you are comfortable with an automated service managing these grants.
* Installed the [P0 CLI package](https://github.com/p0-security/p0cli) if you are making requests through PO CLI.

### Setting up Tailscale

The installation process involves generating an OAuth client in Tailscale and providing its Client ID and Client secret to P0.

1. Navigate to the **Integrations** page on [p0.app](https://p0.app), under **Resources** click **Tailscale**.

   <figure><img src="/files/PVh19yyY153c2jo7PRVx" alt="P0 Integrations page with Tailscale selected." width="375"><figcaption></figcaption></figure>
2. Click the **Tailscale policy management**.

   <figure><img src="/files/vi7zBvJtVsnftfwkxVfV" alt="Tailscale policy management page in P0." width="563"><figcaption></figcaption></figure>
3. Click **Add organization**. Give an **Organization identifier** and click **Next**.
4. Enter your **Client ID** and **Client secret**.
5. Click **Finish**.

{% hint style="success" %}
Congratulations! You have successfully set up Tailscale for P0. You can return to the Tailscale policy management page at any time to update the credentials by toggling on **Hash**.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.p0.dev/integrations/resource-integrations/tailscale.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
