{"slug":"access-your-tailnet-from-gitpod","title":"Access your tailnet from Gitpod","tags":["tailscale","access-control","setup"],"agent_summary":"Last validated: Jan 5, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Access your tailnet from Gitpod\r\n\r\nLast validated: Jan 5, 2026\r\n\r\n[Gitpod](https://www.gitpod.io/) is a way to spin up automated development\r\nenvironments for each task, in the cloud, in seconds, from any Git context you want.\r\n\r\nTailscale can be installed within a Gitpod workspace to be able to access private\r\nresources securely, such as package registries, or to share an environment with\r\nyour colleagues for code review or pair programming.\r\n\r\n## [Start Tailscale](https://tailscale.com/docs/install/cloud/gitpod\\#start-tailscale)\r\n\r\nIf you're already using Gitpod, Tailscale is installed in the [default `full` workspace base image](https://hub.docker.com/r/gitpod/workspace-full) for Gitpod. To use it, in your workspace:\r\n\r\n1. Run `sudo tailscaled` in a separate shell to start the process.\r\n2. In your main shell, run `tailscale up` and authenticate using your browser or using an auth key.\r\n\r\n### [Add Tailscale to a custom base image](https://tailscale.com/docs/install/cloud/gitpod\\#add-tailscale-to-a-custom-base-image)\r\n\r\nIf you're managing your own base image instead of using the default `full` workspace image, you can still use Tailscale as part of a [custom Docker image](https://www.gitpod.io/docs/config-docker) for your project in Gitpod. The following files from the [`gitpod-io/template-tailscale` repository](https://github.com/gitpod-io/template-tailscale) or the [`tailscale/gitpod` repository](https://github.com/tailscale/gitpod) will need to be incorporated:\r\n\r\n1. `.gitpod.Dockerfile` should be a layer in the build, or incorporated into the project Dockerfile.\r\n2. The Tailscale task in `.gitpod.yml` needs to be incorporated into the project `.gitpod.yml` file.\r\n\r\n## [Authenticate to Tailscale](https://tailscale.com/docs/install/cloud/gitpod\\#authenticate-to-tailscale)\r\n\r\nTo allow the Gitpod workspace to join the tailnet, create an\r\n[auth key](https://tailscale.com/docs/features/access-control/auth-keys)\r\nfor your tailnet and add it as a [Gitpod environment variable](https://gitpod.io/variables)\r\nnamed `TAILSCALE_AUTHKEY`.\r\n\r\nOnce you're connected, you should find your Gitpod workspace in your tailnet following the naming convention `gitpod--{user-name}--{repo-name}`. Consider [enabling MagicDNS](https://tailscale.com/docs/features/magicdns) to get a stable domain for your workspace, reachable from other nodes in your tailnet, such as your local machine.\r\n\r\n### [Use an ephemeral auth key for ephemeral workspaces](https://tailscale.com/docs/install/cloud/gitpod\\#use-an-ephemeral-auth-key-for-ephemeral-workspaces)\r\n\r\nIf you use a normal auth key, the Tailscale machine state will be stored in your Gitpod account, and your workspace will always reconnect as the same node.\r\n\r\nSeveral Gitpod workspaces started relatively close together will get incrementing hostnames like `gitpod--{user-name}--{repo-name}-1` and `gitpod--{user-name}--{repo-name}-2`.\r\n\r\nIf you want to treat your Gitpod workspaces as ephemeral, instead use an [ephemeral auth key](https://tailscale.com/docs/features/ephemeral-nodes).\r\n\r\n![Gitpod composing some Markdown](https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgitpod.cd201cfb.jpg&w=3840&q=75)\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Access your tailnet from Gitpod</h1>\n<p>Last validated: Jan 5, 2026</p>\n<p><a href=\"https://www.gitpod.io/\">Gitpod</a> is a way to spin up automated development\r\nenvironments for each task, in the cloud, in seconds, from any Git context you want.</p>\n<p>Tailscale can be installed within a Gitpod workspace to be able to access private\r\nresources securely, such as package registries, or to share an environment with\r\nyour colleagues for code review or pair programming.</p>\n<h2><a href=\"https://tailscale.com/docs/install/cloud/gitpod#start-tailscale\">Start Tailscale</a></h2>\n<p>If you're already using Gitpod, Tailscale is installed in the <a href=\"https://hub.docker.com/r/gitpod/workspace-full\">default <code>full</code> workspace base image</a> for Gitpod. To use it, in your workspace:</p>\n<ol>\n<li>Run <code>sudo tailscaled</code> in a separate shell to start the process.</li>\n<li>In your main shell, run <code>tailscale up</code> and authenticate using your browser or using an auth key.</li>\n</ol>\n<h3><a href=\"https://tailscale.com/docs/install/cloud/gitpod#add-tailscale-to-a-custom-base-image\">Add Tailscale to a custom base image</a></h3>\n<p>If you're managing your own base image instead of using the default <code>full</code> workspace image, you can still use Tailscale as part of a <a href=\"https://www.gitpod.io/docs/config-docker\">custom Docker image</a> for your project in Gitpod. The following files from the <a href=\"https://github.com/gitpod-io/template-tailscale\"><code>gitpod-io/template-tailscale</code> repository</a> or the <a href=\"https://github.com/tailscale/gitpod\"><code>tailscale/gitpod</code> repository</a> will need to be incorporated:</p>\n<ol>\n<li><code>.gitpod.Dockerfile</code> should be a layer in the build, or incorporated into the project Dockerfile.</li>\n<li>The Tailscale task in <code>.gitpod.yml</code> needs to be incorporated into the project <code>.gitpod.yml</code> file.</li>\n</ol>\n<h2><a href=\"https://tailscale.com/docs/install/cloud/gitpod#authenticate-to-tailscale\">Authenticate to Tailscale</a></h2>\n<p>To allow the Gitpod workspace to join the tailnet, create an\r\n<a href=\"https://tailscale.com/docs/features/access-control/auth-keys\">auth key</a>\r\nfor your tailnet and add it as a <a href=\"https://gitpod.io/variables\">Gitpod environment variable</a>\r\nnamed <code>TAILSCALE_AUTHKEY</code>.</p>\n<p>Once you're connected, you should find your Gitpod workspace in your tailnet following the naming convention <code>gitpod--{user-name}--{repo-name}</code>. Consider <a href=\"https://tailscale.com/docs/features/magicdns\">enabling MagicDNS</a> to get a stable domain for your workspace, reachable from other nodes in your tailnet, such as your local machine.</p>\n<h3><a href=\"https://tailscale.com/docs/install/cloud/gitpod#use-an-ephemeral-auth-key-for-ephemeral-workspaces\">Use an ephemeral auth key for ephemeral workspaces</a></h3>\n<p>If you use a normal auth key, the Tailscale machine state will be stored in your Gitpod account, and your workspace will always reconnect as the same node.</p>\n<p>Several Gitpod workspaces started relatively close together will get incrementing hostnames like <code>gitpod--{user-name}--{repo-name}-1</code> and <code>gitpod--{user-name}--{repo-name}-2</code>.</p>\n<p>If you want to treat your Gitpod workspaces as ephemeral, instead use an <a href=\"https://tailscale.com/docs/features/ephemeral-nodes\">ephemeral auth key</a>.</p>\n<p><img src=\"https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fgitpod.cd201cfb.jpg&#x26;w=3840&#x26;q=75\" alt=\"Gitpod composing some Markdown\"></p>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}