2021-05-23 18:25:14 +08:00
|
|
|
# WireGuard Easy
|
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
### 1. Install Docker
|
|
|
|
Make sure you have [Docker](https://docs.docker.com/get-docker/) installed.
|
|
|
|
|
|
|
|
### 2. Configure
|
2021-05-23 18:25:14 +08:00
|
|
|
|
|
|
|
```bash
|
2021-05-23 21:55:50 +08:00
|
|
|
# Create a directory for the configuration files
|
2021-05-23 21:59:50 +08:00
|
|
|
$ mkdir ~/.wg-easy
|
|
|
|
$ cd ~/.wg-easy
|
2021-05-23 21:55:50 +08:00
|
|
|
$ curl https://raw.githubusercontent.com/WeeJeWel/wg-easy/master/docker-compose.yml
|
|
|
|
$ open docker-compose.yml
|
2021-05-23 18:25:14 +08:00
|
|
|
```
|
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
Then change `WG_HOST=raspberrypi.local` to your server's public address, e.g. `WG_HOST=vpn.mydomain.com`.
|
|
|
|
|
|
|
|
Optionally, set a Web UI password by uncommenting `PASSWORD=foobar123` and change the password.
|
|
|
|
|
|
|
|
### 3. Run
|
2021-05-23 18:25:14 +08:00
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
```bash
|
|
|
|
$ docker compose up
|
|
|
|
```
|
2021-05-23 18:25:14 +08:00
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
The Web UI will be available on `http://0.0.0.0:51821`. You can create new clients there.
|
2021-05-23 18:25:14 +08:00
|
|
|
|
|
|
|
## Options
|
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
These options can be configured in `docker-compose.yml` under `environment`.
|
2021-05-23 18:25:14 +08:00
|
|
|
|
|
|
|
| Env | Default | Example | Description |
|
|
|
|
| - | - | - | - |
|
2021-05-23 21:55:50 +08:00
|
|
|
| `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. |
|
2021-05-23 18:25:14 +08:00
|
|
|
| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server |
|
|
|
|
| `WG_PORT` | `51820` | `51820` | The public UDP port of your VPN server |
|
|
|
|
| `WG_DEFAULT_ADDRESS` | `10.8.0.x` | `10.6.0.x` | Clients IP address range |
|
|
|
|
| `WG_DEFAULT_DNS` | `1.1.1.1` | `8.8.8.8, 8.8.4.4` | DNS server clients will use |
|
|
|
|
|
2021-05-23 21:55:50 +08:00
|
|
|
> If you change `WG_PORT`, make sure to also change the exposed port.
|