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

Path to configuration file on first start

Open vrtareg opened this issue 2 years ago • 4 comments

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?

vrtareg avatar Nov 21 '23 19:11 vrtareg

You should define WGUI_CONFIG_FILE_PATH env variable while starting wgui.

nebulosa2007 avatar Nov 23 '23 10:11 nebulosa2007

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.

vrtareg avatar Nov 24 '23 14:11 vrtareg

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:

  • a command line argument for the config file path
  • a change of the default path on FreeBSD to /usr/local/etc/wireguard/wg0.conf

thenktor avatar Nov 29 '23 13:11 thenktor

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

bukiru avatar Feb 21 '24 06:02 bukiru