Skip to content

Instantly share code, notes, and snippets.

@randy3k
Last active August 27, 2021 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randy3k/d54ee474f6e83ce7a1361e057471ae29 to your computer and use it in GitHub Desktop.
Save randy3k/d54ee474f6e83ce7a1361e057471ae29 to your computer and use it in GitHub Desktop.
docker compose file for wireguard
# to show qr
# docker exec -it wireguard /app/show-peer 1
version: "2.1"
services:
wireguard:
image: linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=America/Los_Angeles
- SERVERPORT=51820 #optional
- PEERS=1 #optional
- PEERDNS=192.168.0.1
- INTERNAL_SUBNET=10.13.13.0 #optional
- ALLOWEDIPS=192.168.0.1/24, 10.13.13.0/24
volumes:
- /home/pi/wireguard/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment