You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ See the [Releases section](https://github.com/freifunkMUC/wg-access-server/relea
135
135
-`wg_access_server_devices_bytes_received_total`: sum of received bytes across devices
136
136
-`wg_access_server_devices_bytes_transmitted_total`: sum of transmitted bytes across devices
137
137
138
-
If both `EnableMetadata` and `EnableDeviceMetrics` are enabled, device-specific metrics are included in the output.
138
+
If both `EnableMetadata` and `EnableDeviceMetrics` are enabled, device-specific metrics are included in the output. Set `metrics.basicAuth.username` and `metrics.basicAuth.passwordHash` (bcrypt) to protect the `/metrics` endpoint with HTTP Basic Auth.
139
139
140
140
The software consists of a Golang server and a React app.
cli.Flag("external-host", "The external origin of the server (e.g. https://mydomain.com)").Envar("WG_EXTERNAL_HOST").StringVar(&cmd.AppConfig.ExternalHost)
46
46
cli.Flag("storage", "The storage backend connection string").Envar("WG_STORAGE").Default("memory://").StringVar(&cmd.AppConfig.Storage)
cli.Flag("inactive-device-grace-period", "Duration after inactive device are deleted").Envar("WG_INACTIVE_DEVICE_GRACE_PERIOD").Default((1*config.Year).String()).DurationVar(&cmd.AppConfig.InactiveDeviceGracePeriod)
51
52
cli.Flag("filename", "The configuration filename (e.g. WireGuard-Home)").Envar("WG_FILENAME").StringVar(&cmd.AppConfig.Filename)
Copy file name to clipboardExpand all lines: docs/2-configuration.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,8 @@ Here's what you can configure:
40
40
|`WG_STORAGE`|`--storage`|`storage`||`sqlite3:///data/db.sqlite3`| A storage backend connection string. See [storage docs](./3-storage.md)|
41
41
|`WG_ENABLE_METADATA`|`--enable-metadata`|`enableMetadata`||`false`| Turn on collection of device metadata logging. Includes last handshake time and RX/TX bytes only. |
42
42
|`WG_ENABLE_DEVICE_METRICS`|`--enable-device-metrics`|`enableDeviceMetrics`||`true`| Expose device-level Prometheus metrics on `/metrics`. Requires `enableMetadata` to provide data. |
43
+
|`WG_METRICS_BASIC_AUTH_USERNAME`|`--metrics-basic-auth-username`|`metrics.basicAuth.username`||| Username required when accessing `/metrics`. Leave empty to keep the endpoint unauthenticated. |
44
+
|`WG_METRICS_BASIC_AUTH_PASSWORD_HASH`|`--metrics-basic-auth-password-hash`|`metrics.basicAuth.passwordHash`||| Bcrypt hash of the password required for `/metrics`. Use together with the username to protect the endpoint. |
43
45
|`WG_ENABLE_INACTIVE_DEVICE_DELETION`|`--enable-inactive-device-deletion`|`enableInactiveDeviceDeletion`||`false`| Enable/Disable the automatic deletion of inactive devices. |
44
46
|`WG_INACTIVE_DEVICE_GRACE_PERIOD`|`--inactive-device-grace-period`|`inactiveDeviceGracePeriod`||`8760h` (1 Year) | The duration after which inactive devices are automatically deleted, if automatic deletion is enabled. A device is inactive if it has not been connected to the server for longer than the inactive device grace period. The duration format is the go duration string format |
45
47
|`WG_FILENAME `|`--filename`|`filename`||`WireGuard`| Change the name of the configuration file the user can download (Do not include the '.conf' extension ) |
0 commit comments