mirror of
https://github.com/WeeJeWel/wg-easy.git
synced 2024-12-22 17:19:23 +08:00
update readme
This commit is contained in:
parent
bbc8bf1ba2
commit
98a40949a8
62
README.md
62
README.md
@ -9,7 +9,7 @@
|
|||||||
You have found the easiest way to install & manage WireGuard on any Linux host!
|
You have found the easiest way to install & manage WireGuard on any Linux host!
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./assets/screenshot.png" width="702" />
|
<img src="./assets/screenshot.png" width="802" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
@ -20,6 +20,7 @@ You have found the easiest way to install & manage WireGuard on any Linux host!
|
|||||||
* Show a client's QR code.
|
* Show a client's QR code.
|
||||||
* Download a client's configuration file.
|
* Download a client's configuration file.
|
||||||
* Statistics for which clients are connected.
|
* Statistics for which clients are connected.
|
||||||
|
* Tx/Rx charts for each connected client.
|
||||||
* Gravatar support.
|
* Gravatar support.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@ -41,42 +42,37 @@ $ exit
|
|||||||
|
|
||||||
And log in again.
|
And log in again.
|
||||||
|
|
||||||
You might need to install docker-compose separately. For example, on a Raspberry Pi:
|
### 2. Run WireGuard Easy
|
||||||
|
|
||||||
```bash
|
To automatically install & run wg-easy, in a terminal:
|
||||||
sudo apt-get install docker-compose
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Configure WireGuard
|
<pre>
|
||||||
|
docker run -d \
|
||||||
|
--name=wg-easy \
|
||||||
|
--cap-add=NET_ADMIN \
|
||||||
|
--cap-add=SYS_MODULE \
|
||||||
|
-e WG_HOST=<b>YOUR_SERVER_IP</b> \
|
||||||
|
-e PASSWORD=<b>YOUR_ADMIN_PASSWORD</b> \
|
||||||
|
-v ~/.wg-easy:/etc/wireguard \
|
||||||
|
-p 51820:51820/udp \
|
||||||
|
-p 51821:51821/tcp \
|
||||||
|
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
|
||||||
|
--sysctl="net.ipv4.ip_forward=1" \
|
||||||
|
--restart unless-stopped \
|
||||||
|
weejewel/wg-easy
|
||||||
|
</pre>
|
||||||
|
|
||||||
Run these commands to prepare and configure WireGuard.
|
> 🌍 Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname.
|
||||||
|
>
|
||||||
|
> 🔑 Replace `YOUR_ADMIN_PASSWORD` with a password to log in on the Web UI.
|
||||||
|
|
||||||
```bash
|
The Web UI will now be available on `http://0.0.0.0:51821`.
|
||||||
$ mkdir ~/.wg-easy
|
|
||||||
$ cd ~/.wg-easy
|
|
||||||
$ wget https://raw.githubusercontent.com/WeeJeWel/wg-easy/master/docker-compose.yml
|
|
||||||
$ vim docker-compose.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
Change `WG_HOST=raspberrypi.local` to your server's public address, e.g. `WG_HOST=vpn.mydomain.com`.
|
> 💾 Your configuration files will be saved in `~/.wg-easy`
|
||||||
|
|
||||||
Optionally, set a Web UI password by uncommenting `PASSWORD=foobar123` and change the password.
|
|
||||||
|
|
||||||
> By default, any WireGuard client will have access to the Web UI, unless you set a password.
|
|
||||||
|
|
||||||
### 3. Run WireGuard
|
|
||||||
|
|
||||||
Finally, run WireGuard. It will automatically start after a reboot.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ docker-compose up --detach
|
|
||||||
```
|
|
||||||
|
|
||||||
The Web UI will be available on `http://0.0.0.0:51821`. You can create new clients there.
|
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
These options can be configured in `docker-compose.yml` under `environment`.
|
These options can be configured by setting environment variables using `-e KEY="VALUE"` in the `docker run` command.
|
||||||
|
|
||||||
| Env | Default | Example | Description |
|
| Env | Default | Example | Description |
|
||||||
| - | - | - | - |
|
| - | - | - | - |
|
||||||
@ -95,8 +91,8 @@ These options can be configured in `docker-compose.yml` under `environment`.
|
|||||||
To update to the latest version, run:
|
To update to the latest version, run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose down
|
docker stop wg-easy
|
||||||
docker-compose pull
|
docker rm wg-easy
|
||||||
docker-compose up --detach --remove-orphans
|
|
||||||
docker image prune
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
And then run the 'Run WireGuard Easy' command above again.
|
Loading…
Reference in New Issue
Block a user