wireguard-ui icon indicating copy to clipboard operation
wireguard-ui copied to clipboard

Wireguard UI doesnt restart Wireguard Service When Applying Config

Open fattyredpanda opened this issue 2 years ago • 12 comments

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

fattyredpanda avatar Oct 31 '23 16:10 fattyredpanda

+1

alex85us avatar Nov 11 '23 06:11 alex85us

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

vrtareg avatar Nov 21 '23 19:11 vrtareg

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

thenktor avatar Nov 29 '23 14:11 thenktor

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

vgallegoiz avatar Nov 30 '23 15:11 vgallegoiz

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

OlegMuzych avatar Dec 23 '23 00:12 OlegMuzych

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?

dvett01 avatar Dec 29 '23 14:12 dvett01

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: - SENDGRID_API_KEY - EMAIL_FROM_ADDRESS - EMAIL_FROM_NAME - SESSION_SECRET - WG_CONF_TEMPLATE - WGUI_MANAGE_START=false - WGUI_MANAGE_RESTART=true

kaganae avatar Dec 30 '23 16:12 kaganae

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 avatar Jan 06 '24 10:01 jantschaefer

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.

jantschaefer avatar Jan 10 '24 07:01 jantschaefer

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!!!!

bukiru avatar Feb 21 '24 06:02 bukiru

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

kaganae avatar Feb 21 '24 21:02 kaganae

Replaced this ExecStart=/usr/bin/systemctl restart [email protected] on this ExecStart=/usr/bin/systemctl reload [email protected]

and everything started working

KyKyIIIKuH avatar Mar 13 '24 10:03 KyKyIIIKuH