A feature-complete Web UI for Headscale
Go to file
2024-03-26 11:25:55 -04:00
.github/workflows feat: add docker build tag 2024-03-26 10:18:11 -04:00
app feat: add sign in via api key 2024-03-26 11:11:12 -04:00
assets chore: add preview 2024-03-26 11:01:58 -04:00
public chore: initial commit from create-remix 2024-03-25 17:50:10 -04:00
.dockerignore feat: add docker build 2024-03-26 10:10:34 -04:00
.env.example feat: add docker build 2024-03-26 10:10:34 -04:00
.eslintrc feat: initial bootstrappy stuff 2024-03-25 17:50:58 -04:00
.gitignore chore: initial commit from create-remix 2024-03-25 17:50:10 -04:00
Dockerfile feat: add docker build 2024-03-26 10:10:34 -04:00
LICENSE chore: add license and readme again 2024-03-26 10:24:28 -04:00
package.json feat: add machine data 2024-03-25 18:54:04 -04:00
pnpm-lock.yaml feat: add machine data 2024-03-25 18:54:04 -04:00
postcss.config.js feat: initial bootstrappy stuff 2024-03-25 17:50:58 -04:00
README.md feat: add documentation on deployment 2024-03-26 11:25:55 -04:00
tailwind.config.ts feat: initial bootstrappy stuff 2024-03-25 17:50:58 -04:00
tsconfig.json feat: initial bootstrappy stuff 2024-03-25 17:50:58 -04:00
vite.config.ts fix: nice one remix 2024-03-26 10:32:55 -04:00

Headplane

An advanced UI for juanfont/headscale

Preview

Headscale is a self-hosted version of the Tailscale control server, however, it currently lacks a first-party web UI. This is a relatively tiny Remix app that aims to provide a usable GUI for the Headscale server. It's still very early in it's development, however these are some of the features that are planned.

  • Editable tags, machine names, users, etc
  • ACL control through Docker integration
  • OIDC based login for the web UI
  • Automated API key regeneration
  • Editable headscale configuration

Deployment

The docker image is not available yet. For now you can build it locally with docker build -t ghcr.io/tale/headplane:latest .

Currently I'd only recommend deploying this with Docker because environment variables are required. Here's a very basic docker-compose.yaml file that utilizes each configuration variable.

version: '3.8'
services:
  headplane:
    container_name: headplane
    image: ghcr.io/tale/headplane:latest
    restart: unless-stopped
    environment:
      HEADSCALE_URL: 'https://tailscale.example.com'
      API_KEY: 'abcdefghijklmnopqrstuvwxyz'
      COOKIE_SECRET: 'abcdefghijklmnopqrstuvwxyz'
      OIDC_CLIENT_ID: 'headscale'
      OIDC_ISSUER: 'https://sso.example.com'
      OIDC_CLIENT_SECRET: 'super_secret_client_secret'
      DISABLE_API_KEY_LOGIN: 'true'
      HOST: '0.0.0.0'
      PORT: '3000'

Required Variables

  • HEADSCALE_URL: The public URL of your Headscale server.
  • API_KEY: An API key used to issue new ones for sessions (keep expiry fairly long).
  • COOKIE_SECRET: A secret used to sign cookies (use a relatively long and random string).

Optional Variables

  • HOST: The host to bind the server to (default: 0.0.0.0).
  • PORT: The port to bind the server to (default: 3000).

SSO/OpenID Connect

If you want to use OpenID Connect for SSO, you'll need to provide these variables. Headplane will utilize the expiry of your tokens to determine the expiry of the session.

  • OIDC_ISSUER: The issuer URL of your OIDC provider.
  • OIDC_CLIENT_ID: The client ID of your OIDC provider.
  • OIDC_CLIENT_SECRET: The client secret of your OIDC provider.
  • DISABLE_API_KEY_LOGIN: If you want to disable API key login, set this to true.

Here's what an example with Authelia would look like if you used the same client for both Headscale and Headplane. Keep in mind that the recommended deployment would be putting Headplane behind /admin on a reverse proxy. If you use a different domain than the Headscale server, you'll need to make sure that Headscale responds with CORS headers.

- client_id: 'headscale'
  client_name: 'Headscale and Headplane'
  public: false
  authorization_policy: 'two_factor'
  redirect_uris:
      - 'https://headscale.example.com/oidc/callback'
      - 'https://headscale.example.com/admin/oidc/callback'
  scopes:
      - 'openid'
      - 'profile'
      - 'email'
  userinfo_signed_response_alg: 'none'
  client_secret: 'my_super_secret_client_secret'

Instructions for deploying this will come soon. It will utilize Docker to support advanced features. If you do want to fight with the environment variables right now, the image is ghcr.io/tale/headplane:latest

Contributing

If you would like to contribute, please install a relatively modern version of Node.js and PNPM. Clone this repository, run pnpm install, and then run pnpm dev to start the development server.

Copyright (c) 2024 Aarnav Tale