1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-04-19 14:07:46 +02:00

Compare commits

..

No commits in common. "83ec160f333eeac531999b7cd064950072c0f133" and "cac00a3ec39bb6631e41cd037862d58403282d72" have entirely different histories.

View File

@ -18,7 +18,21 @@ It is also possible to give a list of clients separated by commas
The following shows the two options. The following shows the two options.
Then run `./rebuild.sh` Then run `./rebuild.sh`
### Environment-Variables ## Usage
### Retrieve Client Certificates by QR-Code
The client certificates can be retrieved with the following command.
`<peer-number>` is the number or identifier of the peer.
```sh
docker exec -it wireguard /app/show-peer <peer-number>
```
After running the command a QR-code should be displayed that describes the
certificate.
## Environment-Variables
Set the following variables with the -e tag. Set the following variables with the -e tag.
@ -30,7 +44,7 @@ Set the following variables with the -e tag.
| `SERVERURL` | URL of server | | | `SERVERURL` | URL of server | |
| `PEERS` | Number of peers | | | `PEERS` | Number of peers | |
### Volumes ## Volumes
Set the following volumes with the -v tag. Set the following volumes with the -v tag.
@ -38,7 +52,7 @@ Set the following volumes with the -v tag.
| ------------------------- | --------------- | ----------------------- | | ------------------------- | --------------- | ----------------------- |
| `wireguard` | `/config` | Configuration files | | `wireguard` | `/config` | Configuration files |
### Ports ## Ports
Set the following ports with the -p tag. Set the following ports with the -p tag.
@ -46,7 +60,7 @@ Set the following ports with the -p tag.
| -------------- | ------------------------ | -------- | ----------- | | -------------- | ------------------------ | -------- | ----------- |
| `51820` | `51820` | UDP | VPN port | | `51820` | `51820` | UDP | VPN port |
### Additional ## Additional
There are some special variables to set. There are some special variables to set.
@ -54,7 +68,7 @@ There are some special variables to set.
| ----------- | ---------------------- | | ----------- | ---------------------- |
| `--cap-add` | add linux capabilities | | `--cap-add` | add linux capabilities |
### rebuild.sh ## rebuild.sh
```sh ```sh
#!/bin/sh #!/bin/sh
@ -75,22 +89,3 @@ docker run --name=wireguard \
--restart unless-stopped \ --restart unless-stopped \
-d lscr.io/linuxserver/wireguard:latest -d lscr.io/linuxserver/wireguard:latest
``` ```
## Usage
### Retrieve Client Certificates by QR-Code
The client certificates can be retrieved with the following command.
`<peer-number>` is the number or identifier of the peer.
```sh
docker exec -it wireguard /app/show-peer <peer-number>
```
After running the command a QR-code should be displayed that describes the
certificate.
### Add New Client to Existing WireGuard Installation
To add a new client to the existing WireGuard installation increase the number
of peers or append a peer to the list of peers specified in the [setup section](#set-up) section.