diff --git a/latest b/latest
index 7096349..8b25206 120000
--- a/latest
+++ b/latest
@@ -1 +1 @@
-v2.0.0-beta.5
\ No newline at end of file
+master
\ No newline at end of file
diff --git a/master/404.html b/master/404.html
index 9f46c2d..d5a81bb 100644
--- a/master/404.html
+++ b/master/404.html
@@ -1 +1 @@
-
# ... (basic configuration)auth:oidc:
+# a sample Entra ID provider with environment variable substitution
+-id:azure
+provider_name:azure
+display_name:Login with</br>Entra ID
+registration_enabled:true
+base_url:"https://login.microsoftonline.com/${AZURE_TENANT_ID}/v2.0"
+client_id:"${AZURE_CLIENT_ID}"
+client_secret:"${AZURE_CLIENT_SECRET}"
+extra_scopes:
+-profile
+-email
-# a sample provider where users with the attribute `wg_admin` set to `true` are considered as admins
+# a sample provider where users with the attribute `wg_admin` set to `true` are considered as admins-id:oidc-with-admin-attributeprovider_name:googledisplay_name:Login with</br>Google
@@ -82,7 +92,7 @@
registration_enabled:truelog_user_info:true
-# a sample provider where users in the group `the-admin-group` are considered as admins
+# a sample provider where users in the group `the-admin-group` are considered as admins-id:oidc-with-admin-groupprovider_name:google2display_name:Login with</br>Google2
@@ -104,13 +114,12 @@
-admin_group_regex:^the-admin-group$registration_enabled:truelog_user_info:true
-
Plain OAuth2 Authentication Configuration
# ... (basic configuration)
+
Plain OAuth2 Authentication
# ... (basic configuration)auth:oauth:
-
# a sample provider where users with the attribute `this-attribute-must-be-true` set to `true` or `True`
-# are considered as admins
+# are considered as admins-id:google_plain_oauth-with-admin-attributeprovider_name:google3display_name:Login with</br>Google3
@@ -133,7 +142,7 @@
registration_enabled:true# a sample provider where either users with the attribute `this-attribute-must-be-true` set to `true` or
-# users in the group `admin-group-name` are considered as admins
+# users in the group `admin-group-name` are considered as admins-id:google_plain_oauth_with_groupsprovider_name:google4display_name:Login with</br>Google4
@@ -158,7 +167,7 @@
admin_group_regex:^admin-group-name$registration_enabled:truelog_user_info:true
-
This page provides an overview of all available configuration options for WireGuard Portal. You can supply these configurations in a YAML file (e.g. config.yaml) when starting the Portal. Complete configuration examples are available in the Configuration Examples page.
Below you will find sections like core, advanced, statistics, mail, auth, database, and web. Each section describes the individual configuration keys, their default values, and a brief explanation of their purpose.
Core
These are the primary configuration options that control fundamental WireGuard Portal behavior. More advanced options are found in the subsequent Advanced section.
admin_user
Default:admin@wgportal.local
Description: The administrator user. This user will be created as a default admin if it does not yet exist.
admin_password
Default:wgportal
Description: The administrator password. The default password of wgportal should be changed immediately.
editable_keys
Default:true
Description: Allow editing of WireGuard key-pairs directly in the UI.
create_default_peer
Default:false
Description: If a user logs in for the first time with no existing peers, automatically create a new WireGuard peer for all server interfaces.
create_default_peer_on_creation
Default:false
Description: If an LDAP user is created (e.g., through LDAP sync) and has no peers, automatically create a new WireGuard peer for all server interfaces.
re_enable_peer_after_user_enable
Default:true
Description: Re-enable all peers that were previously disabled if the associated user is re-enabled.
delete_peer_after_user_deleted
Default:false
Description: If a user is deleted, remove all linked peers. Otherwise, peers remain but are disabled.
self_provisioning_allowed
Default:false
Description: Allow registered (non-admin) users to self-provision peers from their profile page.
import_existing
Default:true
Description: On startup, import existing WireGuard interfaces and peers into WireGuard Portal.
restore_state
Default:true
Description: Restore the WireGuard interface states (up/down) that existed before WireGuard Portal started.
Advanced
Additional or more specialized configuration options for logging and interface creation details.
log_level
Default:info
Description: The log level used by the application. Valid options are: trace, debug, info, warn, error.
log_pretty
Default:false
Description: If true, log messages are colorized and formatted for readability (pretty-print).
log_json
Default:false
Description: If true, log messages are structured in JSON format.
start_listen_port
Default:51820
Description: The first port to use when automatically creating new WireGuard interfaces.
start_cidr_v4
Default:10.11.12.0/24
Description: The initial IPv4 subnet to use when automatically creating new WireGuard interfaces.
start_cidr_v6
Default:fdfd:d3ad:c0de:1234::0/64
Description: The initial IPv6 subnet to use when automatically creating new WireGuard interfaces.
use_ip_v6
Default:true
Description: Enable or disable IPv6 support.
config_storage_path
Default:(empty)
Description: Path to a directory where wg-quick style configuration files will be stored (if you need local filesystem configs).
expiry_check_interval
Default:15m
Description: Interval after which existing peers are checked if they are expired. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
rule_prio_offset
Default:20000
Description: Offset for IP route rule priorities when configuring routing.
route_table_offset
Default:20000
Description: Offset for IP route table IDs when configuring routing.
api_admin_only
Default:true
Description: If true, the public REST API is accessible only to admin users. The API docs live at /api/v1/doc.html.
Database
Configuration for the underlying database used by WireGuard Portal. Supported databases include SQLite, MySQL, Microsoft SQL Server, and Postgres.
debug
Default:false
Description: If true, logs all database statements (verbose).
slow_query_threshold
Default: 0
Description: A time threshold (e.g., 100ms) above which queries are considered slow and logged as warnings. If empty or zero, slow query logging is disabled. Format uses s, ms for seconds, milliseconds, see time.ParseDuration.
type
Default:sqlite
Description: The database type. Valid options: sqlite, mssql, mysql, postgres.
dsn
Default:data/sqlite.db
Description: The Data Source Name (DSN) for connecting to the database. For example:
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checks
Default:true
Description: Enable periodic ping checks to verify that peers remain responsive.
ping_check_workers
Default:10
Description: Number of parallel worker processes for ping checks.
ping_unprivileged
Default:false
Description: If false, ping checks run without root privileges. This is currently considered BETA.
ping_check_interval
Default:1m
Description: Interval between consecutive ping checks for all peers. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
data_collection_interval
Default:1m
Description: Interval between data collection cycles (bytes sent/received, handshake times, etc.). Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
collect_interface_data
Default:true
Description: If true, collects interface-level data (bytes in/out) for monitoring and statistics.
collect_peer_data
Default:true
Description: If true, collects peer-level data (bytes, last handshake, endpoint, etc.).
collect_audit_data
Default:true
Description: If true, logs certain portal events (such as user logins) to the database.
listening_address
Default::8787
Description: Address and port for the integrated Prometheus metric server (e.g., :8787).
Mail
Options for configuring email notifications or sending peer configurations via email.
Description: The default "From" address when sending emails.
link_only
Default:false
Description: If true, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.
Auth
WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
OIDC Provider Properties
The oidc array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
display_name
Default:(empty)
Description: A user-friendly name shown on the login page (e.g., "Login with Google").
base_url
Default:(empty)
Description: The OIDC provider’s base URL (e.g., https://accounts.google.com).
client_id
Default:(empty)
Description: The OAuth client ID from the OIDC provider.
client_secret
Default:(empty)
Description: The OAuth client secret from the OIDC provider.
extra_scopes
Default:(empty)
Description: A list of additional OIDC scopes (e.g., profile, email).
field_map
Default:(empty)
Description: Maps OIDC claims to WireGuard Portal user fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
Field
Typical OIDC Claim
Explanation
user_identifier
sub or preferred_username
A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique.
email
email
The user’s email address as provided by the IdP. Not always verified, depending on IdP settings.
firstname
given_name
The user’s first name, typically provided by the IdP in the given_name claim.
lastname
family_name
The user’s last (family) name, typically provided by the IdP in the family_name claim.
phone
phone_number
The user’s phone number. This may require additional scopes/permissions from the IdP to access.
department
Custom claim (e.g., department)
If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute).
is_admin
Custom claim or derived role
If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership.
user_groups
groups or another custom claim
A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups.
admin_mapping
Default:(empty)
Description: WgPortal can grant a user admin rights by matching the value of the is_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.
admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).
admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.
registration_enabled
Default:(empty)
Description: If true, a new user will be created in WireGuard Portal if not already present.
log_user_info
Default:(empty)
Description: If true, OIDC user data is logged at the trace level upon login (for debugging).
OAuth Provider Properties
The oauth array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
display_name
Default:(empty)
Description: A user-friendly name shown on the login page.
client_id
Default:(empty)
Description: The OAuth client ID for the provider.
client_secret
Default:(empty)
Description: The OAuth client secret for the provider.
auth_url
Default:(empty)
Description: URL of the authentication endpoint.
token_url
Default:(empty)
Description: URL of the token endpoint.
user_info_url
Default:(empty)
Description: URL of the user information endpoint.
scopes
Default:(empty)
Description: A list of OAuth scopes.
field_map
Default:(empty)
Description: Maps OAuth attributes to WireGuard Portal fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
Field
Typical Claim
Explanation
user_identifier
sub or preferred_username
A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique.
email
email
The user’s email address as provided by the IdP. Not always verified, depending on IdP settings.
firstname
given_name
The user’s first name, typically provided by the IdP in the given_name claim.
lastname
family_name
The user’s last (family) name, typically provided by the IdP in the family_name claim.
phone
phone_number
The user’s phone number. This may require additional scopes/permissions from the IdP to access.
department
Custom claim (e.g., department)
If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute).
is_admin
Custom claim or derived role
If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership.
user_groups
groups or another custom claim
A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups.
admin_mapping
Default:(empty)
Description: WgPortal can grant a user admin rights by matching the value of the is_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.
admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).
admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.
registration_enabled
Default:(empty)
Description: If true, new users are created automatically on successful login.
log_user_info
Default:(empty)
Description: If true, logs user info at the trace level upon login.
LDAP Provider Properties
The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
url
Default:(empty)
Description: The LDAP server URL (e.g., ldap://srv-ad01.company.local:389).
start_tls
Default:(empty)
Description: If true, use STARTTLS to secure the LDAP connection.
cert_validation
Default:(empty)
Description: If true, validate the LDAP server’s TLS certificate.
tls_certificate_path
Default:(empty)
Description: Path to a TLS certificate if needed for LDAP connections.
tls_key_path
Default:(empty)
Description: Path to the corresponding TLS certificate key.
base_dn
Default:(empty)
Description: The base DN for user searches (e.g., DC=COMPANY,DC=LOCAL).
bind_user
Default:(empty)
Description: The bind user for LDAP (e.g., company\\ldap_wireguard or ldap_wireguard@company.local).
bind_pass
Default:(empty)
Description: The bind password for LDAP authentication.
field_map
Default:(empty)
Description: Maps LDAP attributes to WireGuard Portal fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, memberof.
WireGuard Portal Field
Typical LDAP Attribute
Short Description
user_identifier
sAMAccountName / uid
Uniquely identifies the user within the LDAP directory.
email
mail / userPrincipalName
Stores the user's primary email address.
firstname
givenName
Contains the user's first (given) name.
lastname
sn
Contains the user's last (surname) name.
phone
telephoneNumber / mobile
Holds the user's phone or mobile number.
department
departmentNumber / ou
Specifies the department or organizational unit of the user.
memberof
memberOf
Lists the groups and roles to which the user belongs.
login_filter
Default:(empty)
Description: An LDAP filter to restrict which users can log in. Use {{login_identifier}} to insert the username. For example:
This page provides an overview of all available configuration options for WireGuard Portal.
You can supply these configurations in a YAML file (e.g. config.yaml) when starting the Portal. The path of the configuration file defaults to config/config.yml in the working directory of the executable. It is possible to override configuration filepath using the environment variable WG_PORTAL_CONFIG. For example: WG_PORTAL_CONFIG=/etc/wg-portal/config.yaml ./wg-portal. Also, environment variable substitution in config file is supported. Refer to syntax.
Configuration examples are available on the Examples page.
Below you will find sections like core, advanced, database, statistics, mail, auth and web. Each section describes the individual configuration keys, their default values, and a brief explanation of their purpose.
Core
These are the primary configuration options that control fundamental WireGuard Portal behavior. More advanced options are found in the subsequent Advanced section.
admin_user
Default:admin@wgportal.local
Description: The administrator user. This user will be created as a default admin if it does not yet exist.
admin_password
Default:wgportal
Description: The administrator password. The default password of wgportal should be changed immediately.
editable_keys
Default:true
Description: Allow editing of WireGuard key-pairs directly in the UI.
create_default_peer
Default:false
Description: If a user logs in for the first time with no existing peers, automatically create a new WireGuard peer for all server interfaces.
create_default_peer_on_creation
Default:false
Description: If an LDAP user is created (e.g., through LDAP sync) and has no peers, automatically create a new WireGuard peer for all server interfaces.
re_enable_peer_after_user_enable
Default:true
Description: Re-enable all peers that were previously disabled if the associated user is re-enabled.
delete_peer_after_user_deleted
Default:false
Description: If a user is deleted, remove all linked peers. Otherwise, peers remain but are disabled.
self_provisioning_allowed
Default:false
Description: Allow registered (non-admin) users to self-provision peers from their profile page.
import_existing
Default:true
Description: On startup, import existing WireGuard interfaces and peers into WireGuard Portal.
restore_state
Default:true
Description: Restore the WireGuard interface states (up/down) that existed before WireGuard Portal started.
Advanced
Additional or more specialized configuration options for logging and interface creation details.
log_level
Default:info
Description: The log level used by the application. Valid options are: trace, debug, info, warn, error.
log_pretty
Default:false
Description: If true, log messages are colorized and formatted for readability (pretty-print).
log_json
Default:false
Description: If true, log messages are structured in JSON format.
start_listen_port
Default:51820
Description: The first port to use when automatically creating new WireGuard interfaces.
start_cidr_v4
Default:10.11.12.0/24
Description: The initial IPv4 subnet to use when automatically creating new WireGuard interfaces.
start_cidr_v6
Default:fdfd:d3ad:c0de:1234::0/64
Description: The initial IPv6 subnet to use when automatically creating new WireGuard interfaces.
use_ip_v6
Default:true
Description: Enable or disable IPv6 support.
config_storage_path
Default:(empty)
Description: Path to a directory where wg-quick style configuration files will be stored (if you need local filesystem configs).
expiry_check_interval
Default:15m
Description: Interval after which existing peers are checked if they are expired. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
rule_prio_offset
Default:20000
Description: Offset for IP route rule priorities when configuring routing.
route_table_offset
Default:20000
Description: Offset for IP route table IDs when configuring routing.
api_admin_only
Default:true
Description: If true, the public REST API is accessible only to admin users. The API docs live at /api/v1/doc.html.
Database
Configuration for the underlying database used by WireGuard Portal. Supported databases include SQLite, MySQL, Microsoft SQL Server, and Postgres.
debug
Default:false
Description: If true, logs all database statements (verbose).
slow_query_threshold
Default: 0
Description: A time threshold (e.g., 100ms) above which queries are considered slow and logged as warnings. If empty or zero, slow query logging is disabled. Format uses s, ms for seconds, milliseconds, see time.ParseDuration.
type
Default:sqlite
Description: The database type. Valid options: sqlite, mssql, mysql, postgres.
dsn
Default:data/sqlite.db
Description: The Data Source Name (DSN) for connecting to the database. For example:
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checks
Default:true
Description: Enable periodic ping checks to verify that peers remain responsive.
ping_check_workers
Default:10
Description: Number of parallel worker processes for ping checks.
ping_unprivileged
Default:false
Description: If false, ping checks run without root privileges. This is currently considered BETA.
ping_check_interval
Default:1m
Description: Interval between consecutive ping checks for all peers. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
data_collection_interval
Default:1m
Description: Interval between data collection cycles (bytes sent/received, handshake times, etc.). Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.
collect_interface_data
Default:true
Description: If true, collects interface-level data (bytes in/out) for monitoring and statistics.
collect_peer_data
Default:true
Description: If true, collects peer-level data (bytes, last handshake, endpoint, etc.).
collect_audit_data
Default:true
Description: If true, logs certain portal events (such as user logins) to the database.
listening_address
Default::8787
Description: Address and port for the integrated Prometheus metric server (e.g., :8787).
Mail
Options for configuring email notifications or sending peer configurations via email.
Description: The default "From" address when sending emails.
link_only
Default:false
Description: If true, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.
Auth
WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
OIDC
The oidc array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
display_name
Default:(empty)
Description: A user-friendly name shown on the login page (e.g., "Login with Google").
base_url
Default:(empty)
Description: The OIDC provider’s base URL (e.g., https://accounts.google.com).
client_id
Default:(empty)
Description: The OAuth client ID from the OIDC provider.
client_secret
Default:(empty)
Description: The OAuth client secret from the OIDC provider.
extra_scopes
Default:(empty)
Description: A list of additional OIDC scopes (e.g., profile, email).
field_map
Default:(empty)
Description: Maps OIDC claims to WireGuard Portal user fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
Field
Typical OIDC Claim
Explanation
user_identifier
sub or preferred_username
A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique.
email
email
The user’s email address as provided by the IdP. Not always verified, depending on IdP settings.
firstname
given_name
The user’s first name, typically provided by the IdP in the given_name claim.
lastname
family_name
The user’s last (family) name, typically provided by the IdP in the family_name claim.
phone
phone_number
The user’s phone number. This may require additional scopes/permissions from the IdP to access.
department
Custom claim (e.g., department)
If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute).
is_admin
Custom claim or derived role
If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership.
user_groups
groups or another custom claim
A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups.
admin_mapping
Default:(empty)
Description: WgPortal can grant a user admin rights by matching the value of the is_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.
admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).
admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.
registration_enabled
Default:(empty)
Description: If true, a new user will be created in WireGuard Portal if not already present.
log_user_info
Default:(empty)
Description: If true, OIDC user data is logged at the trace level upon login (for debugging).
OAuth
The oauth array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
display_name
Default:(empty)
Description: A user-friendly name shown on the login page.
client_id
Default:(empty)
Description: The OAuth client ID for the provider.
client_secret
Default:(empty)
Description: The OAuth client secret for the provider.
auth_url
Default:(empty)
Description: URL of the authentication endpoint.
token_url
Default:(empty)
Description: URL of the token endpoint.
user_info_url
Default:(empty)
Description: URL of the user information endpoint.
scopes
Default:(empty)
Description: A list of OAuth scopes.
field_map
Default:(empty)
Description: Maps OAuth attributes to WireGuard Portal fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
Field
Typical Claim
Explanation
user_identifier
sub or preferred_username
A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique.
email
email
The user’s email address as provided by the IdP. Not always verified, depending on IdP settings.
firstname
given_name
The user’s first name, typically provided by the IdP in the given_name claim.
lastname
family_name
The user’s last (family) name, typically provided by the IdP in the family_name claim.
phone
phone_number
The user’s phone number. This may require additional scopes/permissions from the IdP to access.
department
Custom claim (e.g., department)
If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute).
is_admin
Custom claim or derived role
If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership.
user_groups
groups or another custom claim
A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups.
admin_mapping
Default:(empty)
Description: WgPortal can grant a user admin rights by matching the value of the is_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.
admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).
admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.
registration_enabled
Default:(empty)
Description: If true, new users are created automatically on successful login.
log_user_info
Default:(empty)
Description: If true, logs user info at the trace level upon login.
LDAP
The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
url
Default:(empty)
Description: The LDAP server URL (e.g., ldap://srv-ad01.company.local:389).
start_tls
Default:(empty)
Description: If true, use STARTTLS to secure the LDAP connection.
cert_validation
Default:(empty)
Description: If true, validate the LDAP server’s TLS certificate.
tls_certificate_path
Default:(empty)
Description: Path to a TLS certificate if needed for LDAP connections.
tls_key_path
Default:(empty)
Description: Path to the corresponding TLS certificate key.
base_dn
Default:(empty)
Description: The base DN for user searches (e.g., DC=COMPANY,DC=LOCAL).
bind_user
Default:(empty)
Description: The bind user for LDAP (e.g., company\\ldap_wireguard or ldap_wireguard@company.local).
bind_pass
Default:(empty)
Description: The bind password for LDAP authentication.
field_map
Default:(empty)
Description: Maps LDAP attributes to WireGuard Portal fields.
Available fields: user_identifier, email, firstname, lastname, phone, department, memberof.
WireGuard Portal Field
Typical LDAP Attribute
Short Description
user_identifier
sAMAccountName / uid
Uniquely identifies the user within the LDAP directory.
email
mail / userPrincipalName
Stores the user's primary email address.
firstname
givenName
Contains the user's first (given) name.
lastname
sn
Contains the user's last (surname) name.
phone
telephoneNumber / mobile
Holds the user's phone or mobile number.
department
departmentNumber / ou
Specifies the department or organizational unit of the user.
memberof
memberOf
Lists the groups and roles to which the user belongs.
login_filter
Default:(empty)
Description: An LDAP filter to restrict which users can log in. Use {{login_identifier}} to insert the username. For example:
Description: How frequently (in duration, e.g. 30m) to synchronize users from LDAP. Empty or 0 disables sync. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration. Only users that match the sync_filter are synchronized, if disable_missing is true, users not found in LDAP are disabled.
sync_filter
Default:(empty)
Description: An LDAP filter to select which users get synchronized into WireGuard Portal. For example:
To build a standalone application, use the Makefile provided in the repository. Go version 1.23 or higher has to be installed to build WireGuard Portal. If you want to re-compile the frontend, NodeJS 18 and NPM >= 9 is required.
# build the frontend (optional)
-makefrontend
-
-# build the binary
-makebuild
-
\ No newline at end of file
diff --git a/master/documentation/getting-started/docker/index.html b/master/documentation/getting-started/docker/index.html
index a7d7aa3..0ca312a 100644
--- a/master/documentation/getting-started/docker/index.html
+++ b/master/documentation/getting-started/docker/index.html
@@ -1,19 +1,22 @@
- Docker Container - WireGuard Portal
These are official releases of WireGuard Portal. They correspond to the GitHub tags that we make, and you can see the release notes for them here: https://github.com/h44z/wg-portal/releases.
Once these tags show up in this repository, they will never change.
For production deployments of WireGuard Portal, we strongly recommend using one of these tags, e.g. wgportal/wg-portal:1.0.19, instead of the latest or canary tags.
If you only want to stay at the same major or major+minor version, use either v[MAJOR] or [MAJOR].[MINOR] tags. For example v1 or 1.0.
Version 1 is currently stable, version 2 is in development.
latest
This is the most recent build to master! It changes a lot and is very unstable.
We recommend that you don't use it except for development purposes.
Branch tags
For each commit in the master and the stable branch, a corresponding Docker image is build. These images use the master or stable tags.
Configuration
You can configure WireGuard Portal using a yaml configuration file. The filepath of the yaml configuration file defaults to /app/config/config.yml. It is possible to override the configuration filepath using the environment variable WG_PORTAL_CONFIG.
By default, WireGuard Portal uses a SQLite database. The database is stored in /app/data/sqlite.db.
You should mount those directories as a volume: - /app/data - /app/config
A detailed description of the configuration options can be found here.
This command deploy wg-portal on the Kubernetes cluster in the default configuration. The Values section lists the parameters that can be configured during installation.
Values
Key
Type
Default
Description
nameOverride
string
""
Partially override resource names (adds suffix)
fullnameOverride
string
""
Fully override resource names
extraDeploy
list
[]
Array of extra objects to deploy with the release
config.advanced
tpl/object
{}
Advanced configuration options.
config.auth
tpl/object
{}
Auth configuration options.
config.core
tpl/object
{}
Core configuration options. If external admins in auth are not defined and there are no admin_user and admin_password defined here, the default credentials will be generated.
config.database
tpl/object
{}
Database configuration options
config.mail
tpl/object
{}
Mail configuration options
config.statistics
tpl/object
{}
Statistics configuration options
config.web
tpl/object
{}
Web configuration options. listening_address will be set automatically from service.web.port. external_url is required to enable ingress and certificate resources.
revisionHistoryLimit
string
10
The number of old ReplicaSets to retain to allow rollback.
workloadType
string
"Deployment"
Workload type - Deployment or StatefulSet
strategy
object
{"type":"RollingUpdate"}
Update strategy for the workload Valid values are: RollingUpdate or Recreate for Deployment, RollingUpdate or OnDelete for StatefulSet
image.repository
string
"ghcr.io/h44z/wg-portal"
Image repository
image.pullPolicy
string
"IfNotPresent"
Image pull policy
image.tag
string
""
Overrides the image tag whose default is the chart appVersion
imagePullSecrets
list
[]
Image pull secrets
podAnnotations
tpl/object
{}
Extra annotations to add to the pod
podLabels
object
{}
Extra labels to add to the pod
podSecurityContext
object
{}
Pod Security Context
securityContext.capabilities.add
list
["NET_ADMIN"]
Add capabilities to the container
initContainers
tpl/list
[]
Pod init containers
sidecarContainers
tpl/list
[]
Pod sidecar containers
dnsPolicy
string
"ClusterFirst"
Set DNS policy for the pod. Valid values are ClusterFirstWithHostNet, ClusterFirst, Default or None.
restartPolicy
string
"Always"
Restart policy for all containers within the pod. Valid values are Always, OnFailure or Never.
hostNetwork
string
false.
Use the host's network namespace.
resources
object
{}
Resources requests and limits
command
list
[]
Overwrite pod command
args
list
[]
Additional pod arguments
env
tpl/list
[]
Additional environment variables
envFrom
tpl/list
[]
Additional environment variables from a secret or configMap
livenessProbe
object
{}
Liveness probe configuration
readinessProbe
object
{}
Readiness probe configuration
startupProbe
object
{}
Startup probe configuration
volumes
tpl/list
[]
Additional volumes
volumeMounts
tpl/list
[]
Additional volumeMounts
nodeSelector
object
{"kubernetes.io/os":"linux"}
Node Selector configuration
tolerations
list
[]
Tolerations configuration
affinity
object
{}
Affinity configuration
service.mixed.enabled
bool
false
Whether to create a single service for the web and wireguard interfaces
service.mixed.type
string
"LoadBalancer"
Service type
service.web.annotations
object
{}
Annotations for the web service
service.web.type
string
"ClusterIP"
Web service type
service.web.port
int
8888
Web service port Used for the web interface listener
service.wireguard.annotations
object
{}
Annotations for the WireGuard service
service.wireguard.type
string
"LoadBalancer"
Wireguard service type
service.wireguard.ports
list
[51820]
Wireguard service ports. Exposes the WireGuard ports for created interfaces. Lowerest port is selected as start port for the first interface. Increment next port by 1 for each additional interface.
service.metrics.port
int
8787
ingress.enabled
bool
false
Specifies whether an ingress resource should be created
ingress.className
string
""
Ingress class name
ingress.annotations
object
{}
Ingress annotations
ingress.tls
bool
false
Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret
certificate.enabled
bool
false
Specifies whether a certificate resource should be created
For production deployments of WireGuard Portal, we strongly recommend using version 1. If you want to use version 2, please be aware that it is still in beta and not feature complete.
Upgrade from v1 to v2
Before upgrading from V1, make sure that you have a backup of your currently working configuration files and database!
To start the upgrade process, start the wg-portal binary with the -migrateFrom parameter. The configuration (config.yml) for WireGuard Portal must be updated and valid before starting the upgrade.
To upgrade from a previous SQLite database, start wg-portal like:
./wg-portal-amd64-migrateFrom=old_wg_portal.db
-
You can also specify the database type using the parameter -migrateFromType, supported types: mysql, mssql, postgres or sqlite. For example:
The upgrade will transform the old, existing database and store the values in the new database specified in the config.yml configuration file. Ensure that the new database does not contain any data!
If you are using Docker, you can adapt the docker-compose.yml file to start the upgrade process:
services:
-wg-portal:
-image:wgportal/wg-portal:latest
-# ... other settings
-restart:no
-command:["-migrateFrom=/app/data/wg_portal.db"]
-
\ No newline at end of file
diff --git a/master/documentation/monitoring/prometheus/index.html b/master/documentation/monitoring/prometheus/index.html
new file mode 100644
index 0000000..d2c6804
--- /dev/null
+++ b/master/documentation/monitoring/prometheus/index.html
@@ -0,0 +1,73 @@
+
+ Monitoring - WireGuard Portal
By default WG-Portal exposes Prometheus metrics on port 8787 if interface/peer statistic data collection is enabled.
Exposed Metrics
Metric
Type
Description
wireguard_interface_received_bytes_total
gauge
Bytes received through the interface.
wireguard_interface_sent_bytes_total
gauge
Bytes sent through the interface.
wireguard_peer_last_handshake_seconds
gauge
Seconds from the last handshake with the peer.
wireguard_peer_received_bytes_total
gauge
Bytes received from the peer.
wireguard_peer_sent_bytes_total
gauge
Bytes sent to the peer.
wireguard_peer_up
gauge
Peer connection state (boolean: 1/0).
Prometheus Config
Add following scrape job to your Prometheus config file:
# prometheus.yaml
+scrape_configs:
+-job_name:wg-portal
+scrape_interval:60s
+static_configs:
+-targets:
+-localhost:8787# Change localhost to IP Address or hostname with WG-Portal
+
Grafana Dashboard
You may import dashboard.json into your Grafana instance.
\ No newline at end of file
diff --git a/master/documentation/overview/index.html b/master/documentation/overview/index.html
index c2233d8..da28a47 100644
--- a/master/documentation/overview/index.html
+++ b/master/documentation/overview/index.html
@@ -1,5 +1,5 @@
- Overview - WireGuard Portal
WireGuard Portal is a simple, web based configuration portal for WireGuard. The portal uses the WireGuard wgctrl library to manage existing VPN interfaces. This allows for seamless activation or deactivation of new users, without disturbing existing VPN connections.
The configuration portal supports using a database (SQLite, MySQL, MsSQL or Postgres), OAuth or LDAP (Active Directory or OpenLDAP) as a user source for authentication and profile data.
Features
Self-hosted - the whole application is a single binary
Responsive web UI written in Vue.JS
Automatically select IP from the network pool assigned to client
QR-Code for convenient mobile client configuration
Sent email to client with QR-code and client config
Enable / Disable clients seamlessly
Generation of wg-quick configuration file (wgX.conf) if required
User authentication (database, OAuth or LDAP)
IPv6 ready
Docker ready
Can be used with existing WireGuard setups
Support for multiple WireGuard interfaces
Peer Expiry Feature
Handle route and DNS settings like wg-quick does
REST API for management and client deployment
Quick-Start
The easiest way to get started is to use the provided Docker image.
WireGuard Portal is a simple, web-based configuration portal for WireGuard server management. The portal uses the WireGuard wgctrl library to manage existing VPN interfaces. This allows for the seamless activation or deactivation of new users without disturbing existing VPN connections.
The configuration portal supports using a database (SQLite, MySQL, MsSQL or Postgres), OAuth or LDAP (Active Directory or OpenLDAP) as a user source for authentication and profile data.
Features
Self-hosted - the whole application is a single binary
Responsive multi-language web UI written in Vue.JS
Automatically selects IP from the network pool assigned to the client
QR-Code for convenient mobile client configuration
Sends email to the client with QR-code and client config
Enable / Disable clients seamlessly
Generation of wg-quick configuration file (wgX.conf) if required
User authentication (database, OAuth, or LDAP)
IPv6 ready
Docker ready
Can be used with existing WireGuard setups
Support for multiple WireGuard interfaces
Peer Expiry Feature
Handles route and DNS settings like wg-quick does
Exposes Prometheus metrics for monitoring and alertingt
For production deployments of WireGuard Portal, we strongly recommend using version 1. If you want to use version 2, please be aware that it is still in beta and not feature complete.
Upgrade from v1 to v2
Before upgrading from V1, make sure that you have a backup of your currently working configuration files and database!
To start the upgrade process, start the wg-portal binary with the -migrateFrom parameter. The configuration (config.yml) for WireGuard Portal must be updated and valid before starting the upgrade.
To upgrade from a previous SQLite database, start wg-portal like:
./wg-portal-amd64-migrateFrom=old_wg_portal.db
+
You can also specify the database type using the parameter -migrateFromType, supported types: mysql, mssql, postgres or sqlite. For example:
The upgrade will transform the old, existing database and store the values in the new database specified in the config.yml configuration file. Ensure that the new database does not contain any data!
If you are using Docker, you can adapt the docker-compose.yml file to start the upgrade process:
services:
+wg-portal:
+image:wgportal/wg-portal:latest
+# ... other settings
+restart:no
+command:["-migrateFrom=/app/data/wg_portal.db"]
+
\ No newline at end of file
diff --git a/master/index.html b/master/index.html
index 3aa7563..9c80352 100644
--- a/master/index.html
+++ b/master/index.html
@@ -293,7 +293,7 @@
background: var(--md-accent-fg-color--transparent);
}
-
A beautiful and simple UI to manage your WireGuard peers and interfaces
WireGuard Portal is an open source web-based user interface that makes it easy to setup and manage WireGuard VPN connections. It's built on top of WireGuard's official wgctrl library.
WireGuard® is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography.
WireGuard uses state-of-the-art cryptography and still manages to be as easy to configure and deploy as SSH. A combination of extremely high-speed cryptographic primitives and the fact that WireGuard lives inside the Linux kernel means that secure networking can be very high-speed. It is suitable for both small embedded devices like smartphones and fully loaded backbone routers.