Update WG-Easy/Docker-Compose.yml
This commit is contained in:
+32
-18
@@ -1,25 +1,39 @@
|
|||||||
services:
|
services:
|
||||||
wg-easy:
|
wg-easy:
|
||||||
image: ghcr.io/wg-easy/wg-easy
|
#environment:
|
||||||
container_name: wg-easy
|
# Optional:
|
||||||
environment: # Environment variables to configure the instance.
|
# - PORT=51821
|
||||||
- LANG=en # Language settings.
|
# - HOST=0.0.0.0
|
||||||
- WG_HOST= # Public IP or domain name where WG-Easy is accessible.
|
# - INSECURE=false
|
||||||
- PASSWORD= # Password for accessing the WG-Easy web interface.
|
# - WG_MTU=1420
|
||||||
- PORT=51821 # Port for the web interface.
|
|
||||||
- WG_PORT=51820 # WireGuard port for VPN traffic.
|
image: ghcr.io/wg-easy/wg-easy:15
|
||||||
- WG_DEFAULT_ADDRESS=10.10.0.x
|
container_name: wg-easy
|
||||||
- WG_DEFAULT_DNS=1.1.1.1
|
networks:
|
||||||
# - WG_MTU=1420
|
wg:
|
||||||
|
ipv4_address: 10.42.42.42
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/docker/wg-easy:/etc/wireguard # Volume mapping for WireGuard configuration files.
|
- /srv/docker/wg-easy:/etc/wireguard # Volume mapping for WireGuard configuration files.
|
||||||
|
- /lib/modules:/lib/modules:ro
|
||||||
ports:
|
ports:
|
||||||
- "51820:51820/udp" # UDP port used by WireGuard.
|
- "51820:51820/udp" # UDP port used by WireGuard.
|
||||||
- "51821:51821/tcp" # TCP port for accessing the web interface.
|
- "51821:51821/tcp" # TCP port for accessing the web interface.
|
||||||
cap_add: # Capabilities required for managing networking features.
|
restart: unless-stopped
|
||||||
|
cap_add: # Capabilities required for managing networking features.
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- SYS_MODULE
|
- SYS_MODULE
|
||||||
sysctls: # Kernel parameters that need to be set for WireGuard.
|
# - NET_RAW # ⚠️ Uncomment if using Podman
|
||||||
- net.ipv4.conf.all.src_valid_mark=1
|
sysctls: # Kernel parameters that need to be set for WireGuard.
|
||||||
- net.ipv4.ip_forward=1
|
- net.ipv4.ip_forward=1
|
||||||
restart: unless-stopped
|
- net.ipv4.conf.all.src_valid_mark=1
|
||||||
|
- net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
- net.ipv6.conf.all.forwarding=1
|
||||||
|
- net.ipv6.conf.default.forwarding=1
|
||||||
|
|
||||||
|
networks:
|
||||||
|
wg:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- subnet: 10.42.42.0/24
|
||||||
Reference in New Issue
Block a user