Headscale
An open source, self-hosted implementation of the Tailscale control server
- 1Copy the script below
- 2In HexOS, open Apps, find Headscale and choose Custom Install
- 3Paste, then press Install — full guide with screenshots
1{
12 "version": 5,
23 "script": {
4 "version": "0.1.0",
5 "changeLog": "Auto-generated draft from TrueNAS headscale 1.1.17"
6 },
37 "installation_questions": [
8 {
9 "question": "Base domain",
10 "type": "text",
11 "key": "base_domain",
12 "required": true
13 }
14 ],
15 "requirements": {
416 "locations": ["ApplicationsPerformance"],
517 "specifications": ["2CORE"],
618 "permissions": ["READ_WRITE_LOCATIONS"],
719 "ports": [30210]
20 },
821 "ensure_directories_exists": [
22 {"path": "$LOCATION(ApplicationsPerformance)"},
23 {"path": "$LOCATION(ApplicationsPerformance)/headscale"},
24 {
25 "path": "$LOCATION(ApplicationsPerformance)/headscale/config",
26 "owner": {"user": "apps"},
27 "snapshot": {"id": "config"}
28 },
29 {
30 "path": "$LOCATION(ApplicationsPerformance)/headscale/lib",
31 "owner": {"user": "apps"},
32 "snapshot": {"id": "lib"}
33 },
34 {
35 "path": "$LOCATION(ApplicationsPerformance)/headscale/run",
36 "owner": {"user": "apps"},
37 "snapshot": {"id": "run"}
38 }
39 ],
40 "app_values": {
41 "headscale": {
942 "server_url": "http://$SERVER_LAN_IP:30210",
1043 "dns": {"base_domain": "$QUESTION(base_domain)"}
44 },
45 "storage": {
1146 "config": "$HOST_PATH($LOCATION(ApplicationsPerformance)/headscale/config)",
1247 "lib": "$HOST_PATH($LOCATION(ApplicationsPerformance)/headscale/lib)",
1348 "run": "$HOST_PATH($LOCATION(ApplicationsPerformance)/headscale/run)"
49 },
50 "network": {
1451 "api_port": {"bind_mode": "published", "port_number": 30210}
52 },
1553 "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
54 }
55}
What this script does
Hover or tap a box to see the lines it explains.
-
Script format
Tells HexOS this is a version 5 install script, so it knows how to read the rest.
Line 2
-
Script revision
This copy of the script is revision 0.1.0. Latest change: “Auto-generated draft from TrueNAS headscale 1.1.17”.
Lines 3–6
-
Questions you'll be asked
Before installing, HexOS will ask you for: Base domain. Your answers are slotted into the settings further down wherever you see $QUESTION(...).
Lines 7–14
-
Storage locations it needs
The app uses these HexOS storage locations: App storage (fast). If one isn't set up yet, HexOS will ask you to pick a place for it.
Line 16
-
Minimum hardware
Recommended minimum: 2 CPU cores.
Line 17
-
Permission to use your folders
Allows the app to read and write files inside the storage locations listed above — and nowhere else.
Line 18
-
Network ports
The app needs port 30210 to be free on your server. A port is like an apartment number for your server's address.
Line 19
-
Folders created on install
Creates the folders the app needs before it starts: App storage (fast) › headscale, App storage (fast) › headscale › config, App storage (fast) › headscale › lib and App storage (fast) › headscale › run. Some folders are handed to a specific system user so the app is allowed to write to them. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.
Lines 21–39
-
Your server's address (server url)
Automatically set to your server's address on your home network (http://your-server-ip:30210).
Line 42
-
Your answer: base domain
Filled in with what you typed for “base domain” when you installed.
Line 43
-
Where the app's settings is saved
Where the app's settings is saved on your server: App storage (fast) › headscale › config.
Line 46
-
Where the app's “lib” files is saved
Where the app's “lib” files is saved on your server: App storage (fast) › headscale › lib.
Line 47
-
Where the app's “run” files is saved
Where the app's “run” files is saved on your server: App storage (fast) › headscale › run.
Line 48
-
Api port: 30210
Publishes the app's api port as 30210.
Line 51
-
Resource limits
Caps how much of your server the app can use: 2 CPU cores and 10% of your server's memory, but never more than 4 GB. This keeps one busy app from slowing everything else down.
Line 53