Get started
Login
© 2024

Access your tailnet GitHub Codespaces

GitHub Codespaces is a way to run Visual Studio Code—with its editor, terminal, debugger, version control, settings sync, and the entire ecosystem of extensions—hosted in the cloud.

Tailscale can be installed within a Codespace to be able to access private resources such as package registries or license servers securely, regardless of whether they're in the cloud or on premises. You can also use Tailscale to share your development or staging environment with a colleague.

Integration

When using GitHub Codespaces, you can include Tailscale as a feature in your dev container. This feature is available from the tailscale/codespace repository.

To use the Tailscale feature, in your devcontainer.json include:

    "runArgs": ["--device=/dev/net/tun"],
    "features": {
        // ...
        "ghcr.io/tailscale/codespace/tailscale": {}
        // ...
    }

Then launch your codespace.

Authorization

The first time the codespace starts it is necessary to authenticate it to join the tailnet. In the terminal window run: tailscale up --accept-routes

This will print a URL to visit in a browser where you can log into the desired account.

GitHub Codespace writing this article