Skip to content

Instantly share code, notes, and snippets.

@d4vidsha
Created January 16, 2023 00:22
Show Gist options
  • Select an option

  • Save d4vidsha/553cda739e9cd73e253177be360d226a to your computer and use it in GitHub Desktop.

Select an option

Save d4vidsha/553cda739e9cd73e253177be360d226a to your computer and use it in GitHub Desktop.

Revisions

  1. d4vidsha created this gist Jan 16, 2023.
    24 changes: 24 additions & 0 deletions wireguard-docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    version: "2.1"
    services:
    wireguard:
    image: lscr.io/linuxserver/wireguard
    container_name: wireguard
    cap_add:
    - NET_ADMIN
    - SYS_MODULE
    environment:
    - PUID=1000
    - PGID=1000
    - TZ=Australia/Sydney
    - SERVERURL=wireguard.myserver.com #set to auto if server has static IP, otherwise use a DDNS hostname
    - SERVERPORT=51822
    - PEERS=macbook,iphone,ipad
    - PEERDNS=auto
    - INTERNAL_SUBNET=10.13.13.0 #optional
    - ALLOWEDIPS=0.0.0.0/0 #full tunnel always
    volumes:
    - /srv/disk/Appdata/wireguard/config:/config
    - /lib/modules:/lib/modules #do not change
    ports:
    - 51822:51820/udp
    restart: unless-stopped