$ services: wg-monitoring: image: amneziavpn/amnezia-wg # or linuxserver/wireguard container_name: wg-monitoring cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 ports: - "51820:51820/udp" # The only port we expose to the internet volumes: - ./wireguard/config:/config -weight: 500;">restart: unless-stopped networks: - monitoring_net networks: monitoring_net: driver: bridge
services: wg-monitoring: image: amneziavpn/amnezia-wg # or linuxserver/wireguard container_name: wg-monitoring cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 ports: - "51820:51820/udp" # The only port we expose to the internet volumes: - ./wireguard/config:/config -weight: 500;">restart: unless-stopped networks: - monitoring_net networks: monitoring_net: driver: bridge
services: wg-monitoring: image: amneziavpn/amnezia-wg # or linuxserver/wireguard container_name: wg-monitoring cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 ports: - "51820:51820/udp" # The only port we expose to the internet volumes: - ./wireguard/config:/config -weight: 500;">restart: unless-stopped networks: - monitoring_net networks: monitoring_net: driver: bridge
prometheus: image: prom/prometheus container_name: prometheus # WARNING: This is where the magic happens! network_mode: "-weight: 500;">service:wg-monitoring" depends_on: - wg-monitoring volumes: - ./prometheus:/etc/prometheus -weight: 500;">restart: unless-stopped
prometheus: image: prom/prometheus container_name: prometheus # WARNING: This is where the magic happens! network_mode: "-weight: 500;">service:wg-monitoring" depends_on: - wg-monitoring volumes: - ./prometheus:/etc/prometheus -weight: 500;">restart: unless-stopped
prometheus: image: prom/prometheus container_name: prometheus # WARNING: This is where the magic happens! network_mode: "-weight: 500;">service:wg-monitoring" depends_on: - wg-monitoring volumes: - ./prometheus:/etc/prometheus -weight: 500;">restart: unless-stopped
services: wg-client: image: amneziavpn/amnezia-wg container_name: wg-client cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 volumes: - ./wireguard/config:/config # Client config with IP 10.10.0.2 -weight: 500;">restart: unless-stopped node-exporter: image: prom/node-exporter container_name: node-exporter network_mode: "-weight: 500;">service:wg-client" depends_on: - wg-client -weight: 500;">restart: unless-stopped volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro
services: wg-client: image: amneziavpn/amnezia-wg container_name: wg-client cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 volumes: - ./wireguard/config:/config # Client config with IP 10.10.0.2 -weight: 500;">restart: unless-stopped node-exporter: image: prom/node-exporter container_name: node-exporter network_mode: "-weight: 500;">service:wg-client" depends_on: - wg-client -weight: 500;">restart: unless-stopped volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro
services: wg-client: image: amneziavpn/amnezia-wg container_name: wg-client cap_add: - NET_ADMIN - SYS_MODULE sysctls: - net.ipv4.conf.all.src_valid_mark=1 volumes: - ./wireguard/config:/config # Client config with IP 10.10.0.2 -weight: 500;">restart: unless-stopped node-exporter: image: prom/node-exporter container_name: node-exporter network_mode: "-weight: 500;">service:wg-client" depends_on: - wg-client -weight: 500;">restart: unless-stopped volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro - We grant NET_ADMIN capabilities so the container can create the wg0 network interface.
- We expose UDP port 51820 so our remote servers can connect to this Hub.
- We mount a volume containing our standard wg0.conf (your WireGuard/AmneziaWG server configuration).