version: "3.8"
services:
  wg-easy:
    environment:
    
      - LANG=es # (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi) 
      # ⚠️ Required:
      # Change this to your host's public address
      - WG_HOST=tuddns #ponemos nuestro DDNS sin puerto

      # Optional:
      - PASSWORD=tuPassword #la password superefectiva
      - WG_PORT=51820
      - WG_DEFAULT_ADDRESS=10.9.1.x # Puedes cambiar el rango, pero deja el ultimo como x
      - WG_DEFAULT_DNS=IPdetuNAS #IP de tu nas para que actue Pihole
      - WG_MTU=1420
      - WG_ALLOWED_IPS=0.0.0.0/0, #192.168.x.x/24 el valor de tu red local. Sustituye "x.x" por tu rango. 192.168.x.x es opcional, ponlo si no puedes acceder a tus direcciones internas
      - WG_PERSISTENT_KEEPALIVE=25

    image: ghcr.io/wg-easy/wg-easy
    container_name: wg-easy
    volumes:
      - /volume1/docker/wg-easy:/etc/wireguard
    ports:
      - "51820:51820/udp"
      - "51821:51821/tcp"
    restart: always
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv4.ip_forward=1
      - net.ipv4.conf.all.src_valid_mark=1
