Setting up wireguard docker issues

scouserontour

New Member
Nov 3, 2022
1
0
1
I am trying to set up wireguard docker on a proxmox server using docker compose.

I installed the docker engine using the instructions on https://docs.docker.com/engine/install/debian/

Docker version 23.0.2, build 569dd73
Docker Compose version v2.17.2
Proxmox version: pve-manager/7.4-3/9002ab8a (running kernel: 5.15.102-1-pve)

Here is my docker-compose.yaml.

version: "3" services: wireguard: image: lscr.io/linuxserver/wireguard:latest container_name: wireguard cap_add: - NET_ADMIN - SYS_MODULE environment: - PUID=1000 - PGID=1000 - TZ=Europe/London - SERVERURL=example.com # Not actual url used - SERVERPORT=51820 #optional - PEERS=myPhone #optional - PEERDNS=auto #optional - INTERNAL_SUBNET=10.13.13.0 #optional - ALLOWEDIPS=0.0.0.0/0 #optional - LOG_CONFS=true #optional volumes: - /home/paul/appdata/wireguard:/config - /lib/modules:/lib/modules ports: - 51820:51820/udp sysctls: - net.ipv4.conf.all.src_valid_mark=1 restart: always


When run I get the following error in docker compose logs wireguard:

wireguard | [migrations] started wireguard | [migrations] no migrations found wireguard | ─────────────────────────────────────── wireguard | wireguard | ██╗ ███████╗██╗ ██████╗ wireguard | ██║ ██╔════╝██║██╔═══██╗ wireguard | ██║ ███████╗██║██║ ██║ wireguard | ██║ ╚════██║██║██║ ██║ wireguard | ███████╗███████║██║╚██████╔╝ wireguard | ╚══════╝╚══════╝╚═╝ ╚═════╝ wireguard | wireguard | Brought to you by linuxserver.io wireguard | ─────────────────────────────────────── wireguard | wireguard | To support the app dev(s) visit: wireguard | WireGuard: https://www.wireguard.com/donations/ wireguard | wireguard | To support LSIO projects visit: wireguard | https://www.linuxserver.io/donate/ wireguard | wireguard | ─────────────────────────────────────── wireguard | GID/UID wireguard | ─────────────────────────────────────── wireguard | wireguard | User UID: 1000 wireguard | User GID: 1000 wireguard | ─────────────────────────────────────── wireguard | wireguard | Uname info: Linux 955d60f0ddc4 5.15.102-1-pve #1 SMP PVE 5.15.102-1 (2023-03-14T13:48Z) x86_64 x86_64 x86_64 GNU/Linux wireguard | **** It seems the wireguard module is already active. Skipping kernel header install and module compilation. **** wireguard | **** As the wireguard module is already active you can remove the SYS_MODULE capability from your container run/compose. **** wireguard | mkdir: cannot create directory ‘/etc/wireguard’: Invalid argument wireguard | ln: failed to create symbolic link '/etc/wireguard/wg0.conf': No such file or directory wireguard | **** Server mode is selected **** wireguard | **** External server address is set to example.com **** wireguard | **** External server port is set to 51820. Make sure that port is properly forwarded to port 51820 inside this container **** wireguard | **** Internal subnet is set to 10.13.13.0 **** wireguard | **** AllowedIPs for peers 0.0.0.0/0 **** wireguard | **** PEERDNS var is either not set or is set to "auto", setting peer DNS to 10.13.13.1 to use wireguard docker host's DNS. **** wireguard | **** Server mode is selected **** wireguard | **** No changes to parameters. Existing configs are used. **** wireguard | [custom-init] No custom files found, skipping... wireguard | .:53 wireguard | CoreDNS-1.10.1 wireguard | linux/amd64, go1.20, 055b2c3 wireguard | wg-quick: `/etc/wireguard/wg0.conf' does not exist wireguard | s6-rc: warning: unable to start service svc-wireguard: command exited 1
Why is it trying to create /etc/wireguard/wg0.conf when it successfully creates /home/paul/appdata/wireguard/wg0.conf?

I have tried the same config on an a laptop running ubuntu 22.04 and I don't get this error.

Thanks,
Paul
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!