Browse Source

add ipv6 support to docker compose and readme

pull/1356/head
Bernd Storath 8 months ago
parent
commit
77db402803
  1. 30
      README.md
  2. 14
      docker-compose.yml

30
README.md

@ -62,25 +62,39 @@ And log in again.
### 2. Run WireGuard Easy ### 2. Run WireGuard Easy
To setup the IPv6 Network, simply run once:
```bash
docker network create \
-d bridge --ipv6 \
-d default \
--subnet 10.42.42.0/24 \
--subnet fdcc:ad94:bacf:61a3::/64 wg \
```
To automatically install & run wg-easy, simply run: To automatically install & run wg-easy, simply run:
```bash ```bash
docker run -d \ docker run -d \
--name=wg-easy \ --net wg \
-e PORT=51821 \ -e PORT=51821 \
--name wg-easy \
--ip6 fdcc:ad94:bacf:61a3::2a \
--ip 10.42.42.42 \
-v ~/.wg-easy:/etc/wireguard \ -v ~/.wg-easy:/etc/wireguard \
-p 51820:51820/udp \ -p 51820:51820/udp \
-p 51821:51821/tcp \ -p 51821:51821/tcp \
--cap-add=NET_ADMIN \ --cap-add NET_ADMIN \
--cap-add=SYS_MODULE \ --cap-add SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \ --sysctl net.ipv4.ip_forward=1 \
--sysctl="net.ipv4.ip_forward=1" \ --sysctl net.ipv4.conf.all.src_valid_mark=1 \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv6.conf.all.forwarding=1 \
--sysctl net.ipv6.conf.default.forwarding=1 \
--restart unless-stopped \ --restart unless-stopped \
ghcr.io/wg-easy/wg-easy ghcr.io/wg-easy/wg-easy
``` ```
> 💡 Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname.
The Web UI will now be available on `http://0.0.0.0:51821`. The Web UI will now be available on `http://0.0.0.0:51821`.
The Prometheus metrics will now be available on `http://0.0.0.0:51821/metrics`. Grafana dashboard [21733](https://grafana.com/grafana/dashboards/21733-wireguard/) The Prometheus metrics will now be available on `http://0.0.0.0:51821/metrics`. Grafana dashboard [21733](https://grafana.com/grafana/dashboards/21733-wireguard/)
@ -89,7 +103,7 @@ The Prometheus metrics will now be available on `http://0.0.0.0:51821/metrics`.
WireGuard Easy can be launched with Docker Compose as well - just download WireGuard Easy can be launched with Docker Compose as well - just download
[`docker-compose.yml`](docker-compose.yml), make necessary adjustments and [`docker-compose.yml`](docker-compose.yml), make necessary adjustments and
execute `docker compose up --detach`. execute `docker compose up -d`.
### 3. Sponsor ### 3. Sponsor

14
docker-compose.yml

@ -11,6 +11,10 @@ services:
image: ghcr.io/wg-easy/wg-easy image: ghcr.io/wg-easy/wg-easy
container_name: wg-easy container_name: wg-easy
networks:
wg:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
volumes: volumes:
- etc_wireguard:/etc/wireguard - etc_wireguard:/etc/wireguard
ports: ports:
@ -27,3 +31,13 @@ services:
- net.ipv6.conf.all.disable_ipv6=0 - net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1 - net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1 - net.ipv6.conf.default.forwarding=1
networks:
wg:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64

Loading…
Cancel
Save