rename ho-to guides

This commit is contained in:
Pascal Fischer
2023-05-10 17:27:35 +02:00
parent 1a1bdc388d
commit 292a0bf427
9 changed files with 119 additions and 133 deletions

View File

@@ -5,7 +5,7 @@ The NetBird client installation adds a binary called `netbird` to your system. T
your computer or server to the NetBirt network as a peer. But it can also be used as a client to control the daemon service.
This section will explore the commands available in `netbird`.
### Syntax
## Syntax
Use the following syntax to run `netbird` commands from your terminal window:
```shell
netbird [command] [subcommand] [flags]
@@ -18,7 +18,7 @@ netbird [command] [subcommand] [flags]
To see detailed command information, use the flag `--help` after each command
</Note>
### Global flags
## Global flags
`netbird` has a set of global flags that are available in every command. They specify settings that are core or shared between two or more commands, e.g. `--setup-key` is used by `login` and `up` to authenticate the client against a management service.
Below is the list of global flags:
@@ -47,19 +47,19 @@ netbird up
```
The `up` command would process the variables, read the configuration file on `/opt/netbird/config.json` and attempt to connect to the management service running at `https://api.self-hosted.com:33073`.
### Commands
#### up
## Commands
### up
Single command to log in and start the NetBird client. It can send a signal to the daemon service or run in the foreground with the flag `--foreground-mode`.
The command will check if the peer is logged in and connect to the management service. If the peer is not logged in, by default, it will attempt to initiate an SSO login flow.
##### Flags
#### Flags
```shell
--dns-resolver-address string Sets a custom address for NetBird's local DNS resolver. If set, the agent won't attempt to discover the best ip and port to listen on. An empty string "" clears the previous configuration. E.g. --dns-resolver-address 127.0.0.1:5053 or --dns-resolver-address ""
--external-ip-map strings Sets external IPs maps between local addresses and interfaces.You can specify a comma-separated list with a single IP and IP/IP or IP/Interface Name. An empty string "" clears the previous configuration. E.g. --external-ip-map 12.34.56.78/10.0.0.1 or --external-ip-map 12.34.56.200,12.34.56.78/10.0.0.1,12.34.56.80/eth1 or --external-ip-map ""
-F, --foreground-mode start service in foreground
```
##### Usage
#### Usage
The minimal form of running the command is:
```shell
netbird up
@@ -80,9 +80,9 @@ In case you need to use a setup key, use the `--setup-key` flag :
netbird up --setup-key AAAA-BBB-CCC-DDDDDD
```
#### login
### login
Command to authenticate the NetBird client to a management service. If the peer is not logged in, by default, it will attempt to initiate an SSO login flow.
##### Usage
#### Usage
The minimal form of running the command is:
```shell
netbird login
@@ -100,23 +100,23 @@ Passing a management url and a setup key:
netbird login --setup-key AAAA-BBB-CCC-DDDDDD --management-url https://api.self-hosted.com:33073
```
#### down
### down
Command to stop a connection with the management service and other peers in a NetBird network. After running this command, the daemon service will enter an `Idle` state.
##### Usage
#### Usage
The minimal form of running the command is:
```shell
netbird down
```
#### status
### status
Retrieves the peer status from the daemon service.
##### Flags
#### Flags
```shell
-d, --detail display detailed status information
--filter-by-ips strings filters the detailed output by a list of one or more IPs, e.g. --filter-by-ips 100.64.0.100,100.64.0.200
--filter-by-status string filters the detailed output by connection status(connected|disconnected), e.g. --filter-by-status connected
```
##### Usage
#### Usage
The minimal form of running the command is:
```shell
netbird status
@@ -262,19 +262,19 @@ Peers count: 2/3 Connected
The peer with IP `100.119.85.4` wasn't returned because it was not connected
</Note>
#### ssh
### ssh
Command to connect using ssh to a remote peer in your NetBird network.
You should run the ssh command with elevated permissions.
##### Flags
#### Flags
```shell
-p, --port int Sets remote SSH port. Defaults to 44338 (default 44338)
```
##### Arguments
#### Arguments
The ssh command accepts one argument, `user@host`; this argument indicates the remote host to connect:
* `user`: indicates the remote user to login
* `host`: indicates the remote peer host IP address
##### Usage
#### Usage
The minimal form of running the command is:
```shell
sudo netbird ssh user@100.119.230.104
@@ -284,9 +284,9 @@ If you the remote peer agent is running the ssh service on a different port, you
sudo netbird ssh -p 3434 user@100.119.230.104
```
#### version
### version
Outputs the `netbird` command version.
##### Usage
#### Usage
The minimal form of running the command is:
```shell
netbird version
@@ -296,14 +296,14 @@ This will output:
0.8.2
```
#### service
### service
The service command is a top-level command with subcommands to perform operations related to the daemon service.
You should run the service command with elevated permissions.
#### service install
### service install
The install installs the daemon service on the system.
##### Usage
#### Usage
The minimal form of running the command is:
```shell
sudo netbird service install
@@ -317,25 +317,25 @@ You can set a custom configuration path with the flag `--config`
sudo netbird service install --config /opt/netbird/config.json
```
#### service uninstall
### service uninstall
The uninstall uninstalls the daemon service from the system.
##### Usage
#### Usage
The minimal form of running the command is:
```shell
sudo netbird service uninstall
```
#### service start
### service start
Starts the daemon service
##### Usage
#### Usage
The minimal form of running the command is:
```shell
sudo netbird service start
```
#### service stop
### service stop
Stops the daemon service
##### Usage
#### Usage
The minimal form of running the command is:
```shell
sudo netbird service stop