-
Notifications
You must be signed in to change notification settings - Fork 14
/
wireguardDocker.md
58 lines (52 loc) · 1.68 KB
/
wireguardDocker.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# WireGuard Docker
[WireGuard®](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography.
## Docker
```sh
docker run -d \
--name=wireguard \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Asia/Shanghai \
-e SERVERURL=wireguard.domain.com `#optional` \
-e SERVERPORT=51820 `#optional` \
-e PEERS=1 `#optional` \
-e PEERDNS=auto `#optional` \
-e INTERNAL_SUBNET=10.13.13.0 `#optional` \
-e ALLOWEDIPS=0.0.0.0/0 `#optional` \
-e LOG_CONFS=true `#optional` \
-p 51820:51820/udp \
-v $PWD/wireguard/config:/config \
-v $PWD/wireguard/lib/modules:/lib/modules \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--restart unless-stopped \
linuxserver/wireguard
```
## WireGuard Easy
The easiest way to run WireGuard VPN + Web-based Admin UI.
### Docker
```sh
docker run -d \
--name=wg-easy \
-e WG_HOST=🚨YOUR_SERVER_IP \
-e PASSWORD=🚨YOUR_ADMIN_PASSWORD \
-v ~/.wg-easy:/etc/wireguard \
-p 51820:51820/udp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
weejewel/wg-easy
```
[http://localhost:51821/](http://localhost:51821/)
### Screenshots
![](https://github.com/WeeJeWel/wg-easy/raw/master/assets/screenshot.png)
## References
- [WireGuard Docker](https://hub.docker.com/r/linuxserver/wireguard)
- [WireGuard GitHub](https://github.com/WireGuard)
- [WireGuard](https://www.wireguard.com/)
- [WireGuard Easy GitHub](https://github.com/WeeJeWel/wg-easy)
- [WireGuard Easy Docker](https://hub.docker.com/r/weejewel/wg-easy)