version: '3.7' # https://docs.linuxserver.io/images/docker-wireguard # https://github.com/linuxserver/docker-wireguard/ networks: wireguard: services: wireguard: image: lscr.io/linuxserver/wireguard:latest container_name: wireguard restart: "${RESTART:-no}" hostname: vpn domainname: ${BASE_DOMAIN} cap_add: - NET_ADMIN environment: - USER_UID=1000 - USER_GID=1000 - TZ=${TIMEZONE} - LOG_CONFS=false - PEERS=${WIREGUARD_PEERS} ports: - '${WIREGUARD_VPN_PORT}:51820/udp' volumes: - ${BASE_DIR:-/srv}/wireguard/config:/config networks: - wireguard