Skip to content

Instantly share code, notes, and snippets.

@d4vidsha
Created January 16, 2023 00:22
Show Gist options
  • Save d4vidsha/553cda739e9cd73e253177be360d226a to your computer and use it in GitHub Desktop.
Save d4vidsha/553cda739e9cd73e253177be360d226a to your computer and use it in GitHub Desktop.
The Wireguard Docker Compose file which can be used with Portainer.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment