diff --git a/master/documentation/configuration/overview/index.html b/master/documentation/configuration/overview/index.html index 96620d9..991ed1d 100644 --- a/master/documentation/configuration/overview/index.html +++ b/master/documentation/configuration/overview/index.html @@ -45,7 +45,7 @@ host: 127.0.0.1 port: 25 encryption: none - cert_validation: false + cert_validation: true username: "" password: "" auth_type: plain @@ -69,7 +69,7 @@ cert_file: "" key_File: ""
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.
These are the primary configuration options that control fundamental WireGuard Portal behavior. More advanced options are found in the subsequent Advanced
section.
admin_user
admin@wgportal.local
admin_password
wgportal
wgportal
should be changed immediately.admin_api_token
editable_keys
true
create_default_peer
false
create_default_peer_on_creation
false
re_enable_peer_after_user_enable
true
delete_peer_after_user_deleted
false
self_provisioning_allowed
false
import_existing
true
restore_state
true
Additional or more specialized configuration options for logging and interface creation details.
log_level
info
trace
, debug
, info
, warn
, error
.log_pretty
false
true
, log messages are colorized and formatted for readability (pretty-print).log_json
false
true
, log messages are structured in JSON format.start_listen_port
51820
start_cidr_v4
10.11.12.0/24
start_cidr_v6
fdfd:d3ad:c0de:1234::0/64
use_ip_v6
true
config_storage_path
wg-quick
style configuration files will be stored (if you need local filesystem configs).expiry_check_interval
15m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.rule_prio_offset
20000
route_table_offset
20000
api_admin_only
true
true
, the public REST API is accessible only to admin users. The API docs live at /api/v1/doc.html
.Configuration for the underlying database used by WireGuard Portal. Supported databases include SQLite, MySQL, Microsoft SQL Server, and Postgres.
debug
false
true
, logs all database statements (verbose).slow_query_threshold
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
sqlite
sqlite
, mssql
, mysql
, postgres
.dsn
data/sqlite.db
user:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local
-
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checks
true
ping_check_workers
10
ping_unprivileged
false
false
, ping checks run without root privileges. This is currently considered BETA.ping_check_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.data_collection_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.collect_interface_data
true
true
, collects interface-level data (bytes in/out) for monitoring and statistics.collect_peer_data
true
true
, collects peer-level data (bytes, last handshake, endpoint, etc.).collect_audit_data
true
true
, logs certain portal events (such as user logins) to the database.listening_address
:8787
:8787
).Options for configuring email notifications or sending peer configurations via email.
host
127.0.0.1
port
25
encryption
none
none
, tls
, starttls
.cert_validation
false
true
, validate the SMTP server certificate (relevant if encryption
= tls
).username
password
auth_type
plain
plain
, login
, crammd5
.from
Wireguard Portal <noreply@wireguard.local>
link_only
false
true
, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.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.
The oidc
array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc
:
provider_name
display_name
base_url
https://accounts.google.com
).client_id
client_secret
extra_scopes
profile
, email
).field_map
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
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
true
, a new user will be created in WireGuard Portal if not already present.log_user_info
true
, OIDC user data is logged at the trace level upon login (for debugging).The oauth
array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth
:
provider_name
display_name
client_id
client_secret
auth_url
token_url
user_info_url
scopes
field_map
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
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
true
, new users are created automatically on successful login.log_user_info
true
, logs user info at the trace level upon login.The ldap
array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap
:
url
ldap://srv-ad01.company.local:389
).start_tls
true
, use STARTTLS to secure the LDAP connection.cert_validation
true
, validate the LDAP server’s TLS certificate.tls_certificate_path
tls_key_path
base_dn
DC=COMPANY,DC=LOCAL
).bind_user
company\\ldap_wireguard
or ldap_wireguard@company.local
).bind_pass
field_map
Description: Maps LDAP attributes to WireGuard Portal 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. |
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
{{login_identifier}}
to insert the username. For example: (&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))
+
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checks
true
ping_check_workers
10
ping_unprivileged
false
false
, ping checks run without root privileges. This is currently considered BETA.ping_check_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.data_collection_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.collect_interface_data
true
true
, collects interface-level data (bytes in/out) for monitoring and statistics.collect_peer_data
true
true
, collects peer-level data (bytes, last handshake, endpoint, etc.).collect_audit_data
true
true
, logs certain portal events (such as user logins) to the database.listening_address
:8787
:8787
).Options for configuring email notifications or sending peer configurations via email.
host
127.0.0.1
port
25
encryption
none
none
, tls
, starttls
.cert_validation
true
true
, validate the SMTP server certificate (relevant if encryption
= tls
).username
password
auth_type
plain
plain
, login
, crammd5
.from
Wireguard Portal <noreply@wireguard.local>
link_only
false
true
, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.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.
The oidc
array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc
:
provider_name
display_name
base_url
https://accounts.google.com
).client_id
client_secret
extra_scopes
profile
, email
).field_map
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
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
true
, a new user will be created in WireGuard Portal if not already present.log_user_info
true
, OIDC user data is logged at the trace level upon login (for debugging).The oauth
array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth
:
provider_name
display_name
client_id
client_secret
auth_url
token_url
user_info_url
scopes
field_map
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
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
true
, new users are created automatically on successful login.log_user_info
true
, logs user info at the trace level upon login.The ldap
array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap
:
url
ldap://srv-ad01.company.local:389
).start_tls
true
, use STARTTLS to secure the LDAP connection.cert_validation
true
, validate the LDAP server’s TLS certificate.tls_certificate_path
tls_key_path
base_dn
DC=COMPANY,DC=LOCAL
).bind_user
company\\ldap_wireguard
or ldap_wireguard@company.local
).bind_pass
field_map
Description: Maps LDAP attributes to WireGuard Portal 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. |
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
{{login_identifier}}
to insert the username. For example: (&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))
admin_group
CN=WireGuardAdmins,OU=Some-OU,DC=YOURDOMAIN,DC=LOCAL
sync_interval
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
(&(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))
disable_missing
true
, any user not found in LDAP (during sync) is disabled in WireGuard Portal.auto_re_enable
true
, users that where disabled because they were missing (see disable_missing
) will be re-enabled once they are found again.registration_enabled
true
, new user accounts are created in WireGuard Portal upon first login.log_user_info
true
, logs LDAP user data at the trace level upon login.listening_address
:8888
external_url
http://localhost:8888
site_company_name
WireGuard Portal
site_title
WireGuard Portal
session_identifier
wgPortalSession
session_secret
very_secret
csrf_secret
extremely_secret
request_logging
false
cert_file
key_file