Add wireguard server

This commit is contained in:
2026-09-23 23:44:54 -06:00
parent 2334d9d933
commit fe0087314d
25 changed files with 142 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
---
services:
wireguard:
image: lscr.io/linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE #optional
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- SERVERURL=wg.happylizard.me #optional
- PEERS=${PEERS:-3}
- SERVERPORT=${PORT:-51820} #optional
- PEERDNS=auto #optional
- INTERNAL_SUBNET=10.20.0.0 #optional
- ALLOWEDIPS=0.0.0.0/0 #optional
- PERSISTENTKEEPALIVE_PEERS= #optional
- LOG_CONFS=true #optional
volumes:
- ./wireguard:/config
- /lib/modules:/lib/modules #optional
ports:
- ${PORT:-51820}:${PORT:-51820}/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped