Skip to content

Commit

Permalink
docs/remote-cli: fix formatting
Browse files Browse the repository at this point in the history
* Indent blocks below line numbers to restore numbering
* Fix minor typos
  • Loading branch information
nblock committed Sep 2, 2024
1 parent 0047222 commit 8d725ca
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions docs/remote-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,40 @@ headscale apikeys expire --prefix "<PREFIX>"

3. Make `headscale` executable:

```shell
chmod +x /usr/local/bin/headscale
```
```shell
chmod +x /usr/local/bin/headscale
```

4. Configure the CLI through Environment Variables
4. Configure the CLI through environment variables

```shell
export HEADSCALE_CLI_ADDRESS="<HEADSCALE ADDRESS>:<PORT>"
export HEADSCALE_CLI_API_KEY="<API KEY FROM PREVIOUS STAGE>"
```
```shell
export HEADSCALE_CLI_ADDRESS="<HEADSCALE ADDRESS>:<PORT>"
export HEADSCALE_CLI_API_KEY="<API KEY FROM PREVIOUS STAGE>"
```

for example:
for example:

```shell
export HEADSCALE_CLI_ADDRESS="headscale.example.com:50443"
export HEADSCALE_CLI_API_KEY="abcde12345"
```
```shell
export HEADSCALE_CLI_ADDRESS="headscale.example.com:50443"
export HEADSCALE_CLI_API_KEY="abcde12345"
```

This will tell the `headscale` binary to connect to a remote instance, instead of looking
for a local instance (which is what it does on the server).
This will tell the `headscale` binary to connect to a remote instance, instead of looking
for a local instance (which is what it does on the server).

The API key is needed to make sure that your are allowed to access the server. The key is _not_
needed when running directly on the server, as the connection is local.
The API key is needed to make sure that your are allowed to access the server. The key is _not_
needed when running directly on the server, as the connection is local.

5. Test the connection

Let us run the headscale command to verify that we can connect by listing our nodes:
Let us run the headscale command to verify that we can connect by listing our nodes:

```shell
headscale nodes list
```
```shell
headscale nodes list
```

You should now be able to see a list of your nodes from your workstation, and you can
now control the `headscale` server from your workstation.
You should now be able to see a list of your nodes from your workstation, and you can
now control the `headscale` server from your workstation.

## Behind a proxy

Expand Down

0 comments on commit 8d725ca

Please sign in to comment.