Closed hiduser0 closed 1 year ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
A human has marked this issue as invalid, this likely happened because the issue template was not used in the creation of the issue.
Does it work without attaching some random 3rd party container to the network?
No it doesn’t work
Can you provide some logs or other evidence of the container not working on its own?
What are you mean? If I look at the interfaces where is no wg0. What are you need?
We have no idea what you're referring to by that statement/question because you haven't properly filled out the issue template.
Remove the other ui container. Post a compose yaml and a full log of the wireguard container, along with the contents of the wg0.conf
docker compose.yaml: version: "3"
services:
wireguard: image: linuxserver/wireguard:latest container_name: wireguard cap_add:
"51820:51820/udp"
wireguard-ui: image: ngoduykhanh/wireguard-ui:latest container_name: wireguard-ui depends_on:
network_mode: service:wireguard environment:
cat config/wg0.conf
[Interface] Address = 10.252.1.0/24 ListenPort = 51820 PrivateKey = qFDfxBOprivateFQ7LQwy94p/lzxyckeroiw0= MTU = 1450 PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE Table = auto
[Peer] PublicKey = q80Z0SkowEsHc9pADT20m+9NPKGYoXvcNv8LR+cNczI= PresharedKey = mFaipDZJxn8zEhHhLtAD6AF4qMFl9fDiRUQC0HXjcZQ= AllowedIPs = 10.252.1.1/32
Our wireguard container is not designed nor tested to work with third party containers.
I stopped the other containers
Had the same error.
Turns out the environment variable WGUI_MANAGE_START=true
in the wireguard-ui container was the problem for me.
Setting this to false prevents the ui container from starting wireguard, and the Linuxserver container comes up just fine then.
If this is discussion about a third party webui container, it's outside of what we support. If users are doing this, they need to contact that project for support.
Is there an existing issue for this?
Current Behavior
If I want the wireguard Docker Container to start with docker compose up I'll got this log: wireguard | It seems the wireguard module is already active. Skipping kernel header install and module compilation. wireguard-ui | [#] ip link set mtu 1420 up dev wg0 wireguard-ui | Wireguard UI wireguard-ui | App Version : dev wireguard-ui | Git Commit : 6bbe230 wireguard-ui | Git Ref : N/A wireguard-ui | Build Time : 07-29-2023 14:35:37 wireguard-ui | Git Repo : https://github.com/ngoduykhanh/wireguard-ui wireguard-ui | Authentication : true wireguard-ui | Bind address : 0.0.0.0:5000 wireguard-ui | Email from : wireguard-ui | Email from name : WireGuard UI wireguard-ui | Custom wg.conf : wireguard-ui | Base path : / wireguard-ui | ⇨ http server started on [::]:5000 wireguard | Client mode selected. wireguard | [custom-init] No custom files found, skipping... wireguard | Disabling CoreDNS wireguard | Warning:
/config/wg0.conf' is world accessible wireguard | wg-quick:
wg0' already exists wireguard | s6-rc: warning: unable to start service svc-wireguard: command exited 1Expected Behavior
The Wireguard Container starts
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs