ngoduykhanh / wireguard-ui

Wireguard web interface
MIT License
3.78k stars 464 forks source link

Wireguard UI doesnt restart Wireguard Service When Applying Config #478

Open fattyredpanda opened 8 months ago

fattyredpanda commented 8 months ago

Wireguard UI doesnt restart Wireguard Service When Applying Config. I have to manually restart from console everytime after clicking apply config for it to take effect.

Running Ubuntu 23

alex85us commented 7 months ago

+1

vrtareg commented 7 months ago

Same here Trying to run on TrueNAS FreeBSD based Jail Config is generated OK but unable to restart service and get stats of clients.

thenktor commented 7 months ago

Same on FreeBSD. To restart the service it should run service wireguard restart

vgallegoiz commented 7 months ago

Same as you, to apply the config I need to restart the wireguard container and then the wireguard-ui. Easier than service wireguard restart

OlegMuzych commented 6 months ago

Hi guys. To automatically restart the service, you need to: WGUI_MANAGE_RESTART=true https://github.com/ngoduykhanh/wireguard-ui#using-docker

dvett01 commented 6 months ago

I have issues with the WGUI_MANAGE_RESTART=true. Once I hit apply config my wireguard tunnell will be taken down, but will not start again.

I believe it might be related to an issue with iptables that I can see in my docker logs: ip link delete dev wg0 iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens6 -j MASQUERADE /usr/bin/wg-quick: line 295: iptables: command not found

To bring wireguard up again I need to run it manually with wg-quick start wg0

Any idea if I am doing something wrong?

kaganae commented 6 months ago

I am having the same issue, running within docker on a Synololgy NAS. When I apply the config, the changes are applied to wg0.conf, the wg0 interface is stopped, but it does not start after (but works fine when I manually start from the command line via wg-quick). Environment variables are as follows:

environment:

jantschaefer commented 5 months ago

I'm having the same problem on my Synology. #520 did not solve the issuse for me. Did anyone else already try version 0.6.0 and can confirm that the problem still persits?

jantschaefer commented 5 months ago

I've checked the log file of the WireGuard-UI container. There seems to be an issue with iptables. The error message is: iptables v1.8.10 (nf_tables): Could not fetch rule set generation id: Invalid argument. Previous versions (0.5.2) are running fine.

bukiru commented 4 months ago

Hi guys. To automatically restart the service, you need to: WGUI_MANAGE_RESTART=true https://github.com/ngoduykhanh/wireguard-ui#using-docker

but I don't use docker!!!!

kaganae commented 4 months ago

Yes, thanks. WGUI_MANAGE_RESTART is set to true, but it isn't working as documented.

KyKyIIIKuH commented 3 months ago

Replaced this ExecStart=/usr/bin/systemctl restart wg-quick@wg0.service on this ExecStart=/usr/bin/systemctl reload wg-quick@wg0.service

and everything started working