|
34 | 34 |
|
35 | 35 | - There is a Status option that needs docker to be able to access the network of the host in order to read the
|
36 | 36 | wireguard interface stats. See the `cap_add` and `network_mode` options on the docker-compose.yaml
|
| 37 | +- Similarly the `WGUI_MANAGE_START` and `WGUI_MANAGE_RESTART` settings need the same access, in order to restart the wireguard interface. |
37 | 38 | - Because the `network_mode` is set to `host`, we don't need to specify the exposed ports. The app will listen on port `5000` by default.
|
38 | 39 |
|
39 | 40 |
|
@@ -75,6 +76,15 @@ These environment variables are used to set the defaults used in `New Client` di
|
75 | 76 | | `WGUI_DEFAULT_CLIENT_USE_SERVER_DNS` | Boolean value [`0`, `f`, `F`, `false`, `False`, `FALSE`, `1`, `t`, `T`, `true`, `True`, `TRUE`] (default `true`) |
|
76 | 77 | | `WGUI_DEFAULT_CLIENT_ENABLE_AFTER_CREATION` | Boolean value [`0`, `f`, `F`, `false`, `False`, `FALSE`, `1`, `t`, `T`, `true`, `True`, `TRUE`] (default `true`) |
|
77 | 78 |
|
| 79 | +### Docker only |
| 80 | + |
| 81 | +These environment variables only apply to the docker container. |
| 82 | + |
| 83 | +| Variable | Description | |
| 84 | +|-----------------------|----------------------------------------------------------------------------------| |
| 85 | +| `WGUI_MANAGE_START` | Start/stop WireGaurd when the container is started/stopped. (default `false`) | |
| 86 | +| `WGUI_MANAGE_RESTART` | Auto restart WireGuard when we Apply Config changes in the UI. (default `false`) | |
| 87 | + |
78 | 88 | ### Email configuration
|
79 | 89 |
|
80 | 90 | To use custom `wg.conf` template set the `WG_CONF_TEMPLATE` environment variable to a path to such file. Make sure `wireguard-ui` will be able to work with it - use [default template](templates/wg.conf) for reference.
|
@@ -168,6 +178,12 @@ rc-service wgui start
|
168 | 178 | rc-update add wgui default
|
169 | 179 | ```
|
170 | 180 |
|
| 181 | +### docker |
| 182 | + |
| 183 | +Set `WGUI_MANAGE_RESTART=true` to manage Wireguard interface restarts. |
| 184 | +Using `WGUI_MANAGE_START=true` can also replace the function of `wg-quick@wg0` service, to start Wireguard at boot, by running the container with `restart: unless-stopped`. |
| 185 | +These settings can also pick up changes to Wireguard Config File Path, after restarting the container. |
| 186 | + |
171 | 187 | ## Build
|
172 | 188 |
|
173 | 189 | ### Build docker image
|
|
0 commit comments