opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

A web UI for headscale that lives on the same subdomain to avoid CORS headaches

A web UI for headscale that lives on the same subdomain to avoid CORS headaches

GitHub RepoImpressions505

Project Description

View on GitHub

Here's a developer-friendly blog post based on the tweet and repository you provided.


Headscale UI: A Web Dashboard That Plays Nice With CORS

Let’s be honest: CORS errors make you want to throw your laptop out the window. They’re especially annoying when you’re trying to build a simple web UI for a backend tool like Headscale. You just want a nice dashboard to manage your Tailscale-compatible nodes, but the browser keeps screaming at you about cross-origin requests.

One clever solution? Don’t fight CORS. Just run the UI on the same subdomain as the Headscale server.

That’s exactly what headscale-ui does. It’s a tiny, no-fuss web interface that sits right next to your Headscale instance, sidestepping the whole CORS headache entirely.

What It Does

headscale-ui is a lightweight frontend for Headscale. It lets you:

  • View and manage nodes (machines) in your Tailnet.
  • Check user assignments.
  • See expiration and last-seen timestamps.
  • Authenticate directly through Headscale’s built-in session cookie or API key.

The twist? It’s designed to be served from the same domain (or subdomain) as your Headscale API. No proxy hacks, no Access-Control-Allow-Origin fiddling.

Why It’s Cool

  1. CORS-free by design
    Instead of adding yet another middleware or configuration flag to Headscale, this UI just assumes you’ll serve it from headscale.example.com and let the browser treat everything as same-origin. Simple. Effective.

  2. Zero build step
    It’s a pure HTML/CSS/JS app. No Webpack, no Vite, no npm install. Copy the files behind a reverse proxy (like nginx or Caddy) and you’re done.

  3. Works with existing Headscale setups
    You don’t need to change how you run Headscale. Just point your reverse proxy to serve the UI files, and tweak a small config to trust the same domain.

  4. Good for homelabbers and small teams
    If you’re running Headscale for a few dozen nodes, this UI gives you a web dashboard without standing up a separate server or dealing with OAuth proxies.

How to Try It

You can grab the code from the repo:

git clone https://github.com/gurucomputing/headscale-ui.git

Then serve the folder behind a reverse proxy. For example, with nginx:

server {
    listen 443 ssl;
    server_name headscale.example.com;

    location / {
        root /path/to/headscale-ui;
        try_files $uri /index.html;
    }

    location /api/ {
        proxy_pass http://localhost:8080; # your Headscale server
    }
}

Make sure your Headscale configuration has server_url set to https://headscale.example.com. That’s it.

If you just want to peek at the interface without installing anything, check the repo’s README for screenshots and a demo link.

Final Thoughts

headscale-ui won’t win a design award, and that’s fine. It’s a practical tool built by someone who got tired of dealing with CORS errors. For developers running Headscale in a homelab or small deployment, it hits the sweet spot: no extra dependencies, no complex build pipeline, and it works with your existing reverse proxy.

Sometimes the best fix really is “just serve it on the same domain.” If you’re already running Headscale and wish there was a simple web UI, give this a spin. It might save you a few aspirin.


Shared by @githubprojects

Back to Projects
Project ID: 3d05bcd1-e69a-4a9f-b6f1-3a0ecd32c5b3Last updated: June 23, 2026 at 03:55 PM