mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-20 07:41:31 +02:00
Use registration key instead of machine key
This commit is contained in:
committed by
nblock
parent
d32f6707f7
commit
2695d1527e
@@ -54,7 +54,7 @@ Headscale server at `/swagger` for details.
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
curl -H "Authorization: Bearer <API_KEY>" \
|
curl -H "Authorization: Bearer <API_KEY>" \
|
||||||
-d user=<USER> -d key=<KEY> \
|
-d user=<USER> -d key=<REGISTRATION_KEY> \
|
||||||
https://headscale.example.com/api/v1/node/register
|
https://headscale.example.com/api/v1/node/register
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -109,20 +109,20 @@ On a client machine, run the `tailscale up` command and provide the FQDN of your
|
|||||||
tailscale up --login-server <YOUR_HEADSCALE_URL>
|
tailscale up --login-server <YOUR_HEADSCALE_URL>
|
||||||
```
|
```
|
||||||
|
|
||||||
Usually, a browser window with further instructions is opened and contains the value for `<YOUR_MACHINE_KEY>`. Approve
|
Usually, a browser window with further instructions is opened. This page explains how to complete the registration on
|
||||||
and register the node on your headscale server:
|
your headscale server and it also prints the registration key required to approve the node:
|
||||||
|
|
||||||
=== "Native"
|
=== "Native"
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
headscale nodes register --user <USER> --key <YOUR_MACHINE_KEY>
|
headscale nodes register --user <USER> --key <REGISTRATION_KEY>
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Container"
|
=== "Container"
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker exec -it headscale \
|
docker exec -it headscale \
|
||||||
headscale nodes register --user <USER> --key <YOUR_MACHINE_KEY>
|
headscale nodes register --user <USER> --key <REGISTRATION_KEY>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using a preauthkey
|
### Using a preauthkey
|
||||||
|
|||||||
Reference in New Issue
Block a user