ngoduykhanh / wireguard-ui

Wireguard web interface
MIT License
4.22k stars 517 forks source link

Path to configuration file on first start #489

Open vrtareg opened 12 months ago

vrtareg commented 12 months ago

I was trying to run ui in TrueNAS FreeBSD style Jail but it was trying to read configuration from /etc/wireguard/wg0.conf location which doesn't exist in this implementation.

They are under /usr/local/etc/wireguard/wg0.conf

There was no way to fix it until I created symlink in /etc folder.

Any way of specifying this in command line for first startup?

nebulosa2007 commented 11 months ago

You should define WGUI_CONFIG_FILE_PATH env variable while starting wgui.

vrtareg commented 11 months ago

Also looks like that on TrueNAS CORE FreeBSD Jail running wireguard wireguard-ui is not able to determine the connected clients and restart service ... I am going to check the code.

thenktor commented 11 months ago

Just stumbled upon the same issue on FreeBSD 14. The env variable only works on first start, afterwards it is ignored. IMHO it would be nice to have:

bukiru commented 8 months ago

totally agree for *BSD systems it needs to create symlink or to edit wireguard/db/server/global_settings.json or use ./wireguard-ui -wg-conf-template=/usr/local/etc/wireguard/wg0.conf