diff --git a/README.md b/README.md index e3ed5377..b2bac98d 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,13 @@ make build Nico + + + Niek +
+ Niek van der Maas +
+ Eugen @@ -227,6 +234,8 @@ make build Eugen Biegler + + Aaron @@ -234,8 +243,6 @@ make build Aaron Bieber - - Fernando @@ -271,6 +278,8 @@ make build Paul Tötterman + + Casey @@ -278,8 +287,6 @@ make build Casey Marshall - - Silver @@ -315,6 +322,8 @@ make build Abraham Ingersoll + + Aofei @@ -322,8 +331,6 @@ make build Aofei Sheng - - Artem @@ -359,6 +366,8 @@ make build Felix Yan + + JJGadgets/ @@ -366,8 +375,6 @@ make build JJGadgets - - Jamie @@ -403,6 +410,8 @@ make build WhiteSource Renovate + + Ryan @@ -410,8 +419,6 @@ make build Ryan Fowler - - Shaanan @@ -447,6 +454,8 @@ make build Tianon Gravi + + Tjerk @@ -454,8 +463,6 @@ make build Tjerk Woudsma - - Yang @@ -491,6 +498,8 @@ make build derelm + + ignoramous/ @@ -498,8 +507,6 @@ make build ignoramous - - lion24/ diff --git a/docs/running-headscale-container.md b/docs/running-headscale-container.md index 36e63de9..b36f3bbf 100644 --- a/docs/running-headscale-container.md +++ b/docs/running-headscale-container.md @@ -14,8 +14,8 @@ not work with alternatives like [Podman](https://podman.io). The Docker image ca 1. Prepare a directory on the host Docker node in your directory of choice, used to hold `headscale` configuration and the [SQLite](https://www.sqlite.org/) database: ```shell -mkdir ./headscale && cd ./headscale -mkdir ./config +mkdir -p ./headscale/config +cd ./headscale ``` 2. Create an empty SQlite datebase in the headscale directory: @@ -45,6 +45,17 @@ touch ./config/config.yaml ``` Modify the config file to your preferences before launching Docker container. +Here are some settings that you likely want: + +```yaml +server_url: http://your-host-name:8080 # Change to your hostname or host IP +# Listen to 0.0.0.0 so it's accessible outside the container +metrics_listen_addr: 0.0.0.0:9090 +# The default /var/lib/headscale path is not writable in the container +private_key_path: /etc/headscale/private.key +# The default /var/lib/headscale path is not writable in the container +db_path: /etc/headscale/db.sqlite +``` 4. Start the headscale server while working in the host headscale directory: @@ -61,6 +72,8 @@ docker run \ ``` +Note: use `0.0.0.0:8080:8080` instead of `127.0.0.1:8080:8080` if you want to expose the container externally. + This command will mount `config/` under `/etc/headscale`, forward port 8080 out of the container so the `headscale` instance becomes available and then detach so headscale runs in the background. @@ -87,7 +100,8 @@ curl http://127.0.0.1:9090/metrics 6. Create a namespace ([tailnet](https://tailscale.com/kb/1136/tailnet/)): ```shell -docker exec headscale -- headscale namespaces create myfirstnamespace +docker exec headscale \ + headscale namespaces create myfirstnamespace ``` ### Register a machine (normal login) @@ -101,7 +115,7 @@ tailscale up --login-server YOUR_HEADSCALE_URL To register a machine when running `headscale` in a container, take the headscale command and pass it to the container: ```shell -docker exec headscale -- \ +docker exec headscale \ headscale --namespace myfirstnamespace nodes register --key ``` @@ -110,7 +124,7 @@ docker exec headscale -- \ Generate a key using the command line: ```shell -docker exec headscale -- \ +docker exec headscale \ headscale --namespace myfirstnamespace preauthkeys create --reusable --expiration 24h ```