Skip to main content

2. Alternative Docker Compose

If you have errors with the previous docker compose, then please try out this one. Comments from before still apply here

version: "3.8"

services:
  wg-easy:
    environment:
      - 'WG_HOST=wireguard.example.com'
      - 'PASSWORD=123456789'
      - 'WG_PERSISTENT_KEEPALIVE=25'
      - 'WG_PORT=64443'
    image: weejewel/wg-easy
    container_name: wg-easy
    volumes:
      - 'wg-easy:/etc/wireguard'
    ports:
      - "64443:51820/udp"
      - "51821:51821/tcp"
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv4.ip_forward=1
      - net.ipv4.conf.all.src_valid_mark=1
      
volumes:            #Use this if you don't care about persisting your install
  wg-easy:
    driver: local