diff --git a/tailscale-headscale/headscale.md b/tailscale-headscale/headscale.md new file mode 100644 index 0000000..289944e --- /dev/null +++ b/tailscale-headscale/headscale.md @@ -0,0 +1,34 @@ +# headscale server +## Docker (Truenas Scale App) + +### user +You need to be have at least one user. You can think of a user as one local network. +``` +sudo docker exec ix-headscale-headscale-1 headscale users create +``` + +List the users: +``` +sudo docker exec ix-headscale-headscale-1 headscale users list +``` + +Add a key to a user: +``` +sudo docker exec ix-headscale-headscale-1 headscale nodes register --user --key +``` + +### nodes/devices +The nodes are the devices registered to a user/network. +List the nodes: +``` +sudo docker exec ix-headscale-headscale-1 headscale nodes list +``` + +### Creating key +Normaly you just let the Truenas Client create the key for you. +But if you want to run the docker app to add a device to a tailscale/headscale instance you need to manually create a key. +``` +sudo docker exec ix-headscale-headscale-1 headscale preauthkeys create --user --reusable=false +sudo docker exec ix-headscale-headscale-1 headscale preauthkeys create --user --reusable=true +``` +You get the ID from listing all the Users. \ No newline at end of file diff --git a/tailscale-headscale/tailscale-client.md b/tailscale-headscale/tailscale-client.md new file mode 100644 index 0000000..2efd5a1 --- /dev/null +++ b/tailscale-headscale/tailscale-client.md @@ -0,0 +1,5 @@ +# Adding a client to headscale +## headscale +``` +sudo tailscale up --login-server +``` \ No newline at end of file