docker-compose.yml 1002 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. volumes:
  2. etc_wireguard:
  3. services:
  4. wg-easy:
  5. environment:
  6. # Optional:
  7. # - PORT=51821
  8. - SERVERURL=vpn.algometic.com
  9. # - INSECURE=false
  10. image: ghcr.io/wg-easy/wg-easy:15
  11. container_name: wg-easy
  12. networks:
  13. wg:
  14. ipv4_address: 10.42.42.42
  15. # ipv6_address: fdcc:ad94:bacf:61a3::2a
  16. volumes:
  17. - etc_wireguard:/etc/wireguard
  18. - /lib/modules:/lib/modules:ro
  19. ports:
  20. - "51820:51820/udp"
  21. - "8165:51821/tcp"
  22. restart: unless-stopped
  23. cap_add:
  24. - NET_ADMIN
  25. - SYS_MODULE
  26. # - NET_RAW # ⚠️ Uncomment if using Podman
  27. sysctls:
  28. - net.ipv4.ip_forward=1
  29. - net.ipv4.conf.all.src_valid_mark=1
  30. - net.ipv6.conf.all.disable_ipv6=0
  31. - net.ipv6.conf.all.forwarding=1
  32. - net.ipv6.conf.default.forwarding=1
  33. networks:
  34. wg:
  35. driver: bridge
  36. enable_ipv6: true
  37. ipam:
  38. driver: default
  39. config:
  40. - subnet: 10.42.42.0/24
  41. # - subnet: fdcc:ad94:bacf:61a3::/64