Skip to content

[FEATURE] Tailscale auth key injection in devc-remote.sh #230

Closed as not planned

Description

@gerchowl

Summary

Extend devc-remote.sh to automatically generate and inject a Tailscale ephemeral auth key into the remote container's docker-compose.local.yaml before compose up. This enables the container to join the tailnet without manual key setup on the remote host.

Context

Design

Prerequisites (local machine)

  • TS_CLIENT_ID and TS_CLIENT_SECRET environment variables (from Tailscale OAuth client with auth_keys scope and tag:devcontainer)
  • curl and jq available

Flow

  1. After remote_preflight, before remote_compose_up
  2. Check if TS_CLIENT_ID is set locally — if not, skip (opt-in, like everything Tailscale)
  3. Generate an OAuth access token from api.tailscale.com/api/v2/oauth/token
  4. Create an ephemeral (non-reusable) auth key via api.tailscale.com/api/v2/tailnet/-/keys with tag:devcontainer
  5. Inject TAILSCALE_AUTHKEY=<key> into the remote docker-compose.local.yaml via SSH
  6. Proceed with compose up — container installs Tailscale and joins tailnet
  7. Output the Tailscale hostname for downstream use (IDE wrappers, direct SSH)

Constraints

  • OAuth client must have tag:devcontainer — ACLs must allow SSH to tagged devices
  • Key is ephemeral: container removal auto-cleans the tailnet node
  • Non-reusable: one key per container session, not shared across rebuilds
  • docker-compose.local.yaml is git-ignored, safe to write

Scope boundary

This issue covers only the infra side — key generation + injection + container on tailnet. IDE-specific connection (Cursor, VS Code) is a separate concern (see linked issue).

Depends on

References

Activity

  1. added
    feature
    area:workspace
    effort:medium
    semver:minor
    on Mar 6, 2026
  2. c-vigo commented on Jul 8, 2026

    @c-vigo
    Contributor

    Closing as part of an agreed backlog cleanup (with @gerchowl). The remote-devcontainer / devc-remote / Tailscale initiative predates the Nix + Claude-native migration (#625) and has had no activity since Feb–Mar 2026. If remote provisioning is wanted again it will be re-planned from scratch after the devkit rename (#781). Reopen/refile if revived.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspaceeffort:mediumfeaturesemver:minor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions