Title
Support for Headscale API Keys (hskey prefix) and Custom API Endpoints
Platform
Web-app
Is it related to an issue?
No.
Description
I am currently using Termix on a Debian host that is part of a Tailnet managed by Headscale (the open-source implementation of the Tailscale control server).
While the connectivity and Tailscale SSH work perfectly (since the host is connected to the network), the Device Discovery feature is currently unusable. When attempting to configure the Tailscale API key in the Admin Settings, the UI does not recognize the key and displays a message stating that no API key is configured.
The current implementation seems to assume a hardcoded dependency on the official Tailscale infrastructure. This creates two main blockers for self-hosted users:
- Fixed API Endpoint: The application likely points to
api.tailscale.com by default, making it impossible to communicate with a private Headscale instance.
- Key Prefix Validation: Maybe the UI enforces a validation check that only accepts keys starting with
tskey (official Tailscale)? Headscale API keys, which start with hskey, are rejected as invalid before any request is even sent.
The Solution
I suggest decoupling the Tailscale integration to allow for different control plane providers:
- Configurable API Endpoint: Add a field in the Admin Settings to define the API base URL. This would allow users to point Termix to their own Headscale instance (e.g.,
https://headscale.example.com).
- Flexible Key Validation: Update the API key validation logic to support different prefixes based on the provider (or simply allow both
tskey and hskey). If a custom endpoint is provided, the system should accept the hskey format used by Headscale.
Additional Context
Use Case
This would allow users who prefer self-hosting their control plane to enjoy the full "Device Discovery" experience, enabling them to select hosts from their Tailnet via a dropdown menu rather than manually entering the 100.x.y.z IP addresses for every device.
Environment
- OS: Debian 12 (running in Docker)
- Control Plane: Headscale (running in Docker)
- Connectivity: Tailscale SSH enabled
Thank you for your great work on Termix!
Title
Support for Headscale API Keys (hskey prefix) and Custom API Endpoints
Platform
Web-app
Is it related to an issue?
No.
Description
I am currently using Termix on a Debian host that is part of a Tailnet managed by Headscale (the open-source implementation of the Tailscale control server).
While the connectivity and Tailscale SSH work perfectly (since the host is connected to the network), the Device Discovery feature is currently unusable. When attempting to configure the Tailscale API key in the Admin Settings, the UI does not recognize the key and displays a message stating that no API key is configured.
The current implementation seems to assume a hardcoded dependency on the official Tailscale infrastructure. This creates two main blockers for self-hosted users:
api.tailscale.comby default, making it impossible to communicate with a private Headscale instance.tskey(official Tailscale)? Headscale API keys, which start withhskey, are rejected as invalid before any request is even sent.The Solution
I suggest decoupling the Tailscale integration to allow for different control plane providers:
https://headscale.example.com).tskeyandhskey). If a custom endpoint is provided, the system should accept thehskeyformat used by Headscale.Additional Context
Use Case
This would allow users who prefer self-hosting their control plane to enjoy the full "Device Discovery" experience, enabling them to select hosts from their Tailnet via a dropdown menu rather than manually entering the 100.x.y.z IP addresses for every device.
Environment
Thank you for your great work on Termix!