Admin web-ui for @juanfont/headscale with a focus on easy ACL management thru 3D network visualization
- Interactive 3D Network Visualization: Visualize your network topology in 3D for intuitive management.
- Simplified ACL Management: Easily manage Access Control Lists, Groups and more with a user-friendly interface.
Note
The provided server does not support TLS and is best used behind a reverse proxy.
Headnet is available as a distroless Docker container a basic golang webserver.
latest
: Latest stable releasex.x.x
: Specific release versionsx.x.x-pre
: Pre-release versions (potentially unstable)unstable
: Built on every push to the main branch
docker run -d -p 3000:3000 ghcr.io/rickli-cloud/headnet:unstable
Create a docker-compose.yaml
file:
version: '3.9'
services:
headnet:
image: ghcr.io/rickli-cloud/headnet:${HEADNET_VERSION:-unstable}
container_name: headnet
restart: always
ports:
- 3000:3000
environment:
PUBLIC_MOCK_ENABLED: 'true' # Enable demo mode (requires a build with MSW included!)
Start the service:
docker compose up -d
You can download a zip archive for each release containing almost everything needed to deploy headnet on a static webserver like Nginx or Apache.
Standalone executables and installers for different platforms are provided for each release.
These applications include special client integrations to bypass any CORS restrictions. This allows it to work with any Headscale instance without additional configuration.
Environment variables can be configured in different ways depending on the deployment method.
Some variables might only be affective during development or at buildtime!
Reads environment variables starting with PUBLIC_
and serves them automatically on /admin/_app/env.js
.
Configure environment at buildtime or modify the /_app/env.js
file. Example to Enable Mocking:
export const env = { PUBLIC_MOCK_ENABLED: 'true' };
Unfortunately you can not configure anything after buildtime.
Mock the whole API with the help of a service worker. This enables "demo mode"
# Linux
export PUBLIC_MOCK_ENABLED="false"
# Windows
$env:PUBLIC_MOCK_ENABLED="false"
Important
This only works if the build includes the required service worker.
To keep the size down it is not included in the production releases.
Create the service worker with: deno task msw:init
Only affective during development & buildtime
# Linux
export BASE_PATH="/admin"
# Windows
$env:BASE_PATH="/admin"
Only affective during development
To circumvent CORS issues vite provides a dev proxy leading to your headscale instance.
# Linux
export HEADSCALE_HOST="https://headscale.example.com"
# Windows
$env:HEADSCALE_HOST="https://headscale.example.com"
Install Dependencies:
deno install
Starting Development Server:
deno task dev
Tip
This can be done in Docker:
docker run -it --rm --workdir /app -v ${PWD}:/app:rw --entrypoint /bin/sh denoland/deno:latest
Install Dependencies:
deno install
deno task build
Ensure the following configuration:
BASE_PATH = "/"
Then run:
deno task tauri build
The docker image does not build the svelte app, only bundles the static files into a small server.
docker build . -t headnet:custom
Headnet is built using the following technologies:
- 3d-force-graph
- deno 2
- json-ast-comments
- mock service worker
- monaco editor
- openapi-typescript
- shadcn svelte
- svelte 5
- tauri 2
Note
Deno provides additional functionality, such as automatic types for third-party modules. Node.js does not support this and will not work