Skip to content

Instantly share code, notes, and snippets.

@ToshY
Last active July 20, 2021 18:33
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 ToshY/84a8091e04e849cde86b961fee8b2d48 to your computer and use it in GitHub Desktop.
Save ToshY/84a8091e04e849cde86b961fee8b2d48 to your computer and use it in GitHub Desktop.
Wireguard docker-compose config example
version: '3.7'
services:
wireguard:
image: ghcr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- SERVERURL=auto
- SERVERPORT={port}
- PEERS={peers}
- PEERDNS=auto
- INTERNAL_SUBNET=10.13.13.0 #optional
- ALLOWEDIPS=0.0.0.0/0 #optional
volumes:
- {path}/config:/config
- /lib/modules:/lib/modules
ports:
- {port}:{port}/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