This page provides an overview of all available configuration options for WireGuard Portal.
You can supply these configurations in a YAML file when starting the Portal. The path of the configuration file defaults to config/config.yaml (or config/config.yml) in the working directory of the executable. It is possible to override the 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 the config file is supported. Refer to the syntax.
Configuration examples are available on the Examples page.
This page provides an overview of all available configuration options for WireGuard Portal.
You can supply these configurations in a YAML file when starting the Portal. The path of the configuration file defaults to config/config.yaml (or config/config.yml) in the working directory of the executable. It is possible to override the 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 the config file is supported. Refer to the syntax.
Configuration examples are available on the Examples page.
Below you will find sections like core, backend, advanced, database, statistics, mail, auth, web and webhook. 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
Environment Variable:WG_PORTAL_CORE_ADMIN_USER
Description: The administrator user. This user will be created as a default admin if it does not yet exist.
Description: The administrator password. The default password should be changed immediately!
Important: The password should be strong and secure. The minimum password length is specified in auth.min_password_length. By default, it is 16 characters.
Description: If true, no admin user is created. This is useful if you plan to manage users exclusively through external authentication providers such as LDAP or OAuth.
Description: An API token for the admin user. If a token is provided, the REST API can be accessed using this token. If empty, the API is initially disabled for the admin user.
editable_keys
Default:true
Environment Variable:WG_PORTAL_CORE_EDITABLE_KEYS
Description: Allow editing of WireGuard key-pairs directly in the UI.
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.
Description: On startup, import existing WireGuard interfaces and peers into WireGuard Portal.
restore_state
Default:true
Environment Variable:WG_PORTAL_CORE_RESTORE_STATE
Description: Restore the WireGuard interface states (up/down) that existed before WireGuard Portal started.
Backend
Configuration options for the WireGuard backend, which manages the WireGuard interfaces and peers. The current MikroTik backend is in BETA and may not support all features.
default
Default:local
Description: The default backend to use for managing WireGuard interfaces. Valid options are: local, or other backend id's configured in the mikrotik section.
Description: Interface name prefix for WireGuard interfaces on the local system which is used to configure DNS servers with resolvconf. It depends on the resolvconf implementation you are using, most use a prefix of tun., but some have an empty prefix (e.g., systemd).
Description: A list of interface names to exclude when enumerating local interfaces. This is useful if you want to prevent certain interfaces from being imported from the local system.
Mikrotik
The mikrotik array contains a list of MikroTik backend definitions. Each entry describes how to connect to a MikroTik RouterOS instance that hosts WireGuard interfaces.
Below are the properties for each entry inside backend.mikrotik:
id
Default:(empty)
Description: A unique identifier for this backend. This value can be referenced by backend.default to use this backend as default. The identifier must be unique across all backends and must not use the reserved keyword local.
display_name
Default:(empty)
Description: A human-friendly display name for this backend. If omitted, the id will be used as the display name.
api_url
Default:(empty)
Description: Base URL of the MikroTik REST API, including scheme and path, e.g., https://10.10.10.10:8729/rest.
api_user
Default:(empty)
Description: Username for authenticating against the MikroTik API. Ensure that the user has sufficient permissions to manage WireGuard interfaces and peers.
api_password
Default:(empty)
Description: Password for the specified API user.
api_verify_tls
Default:false
Description: Whether to verify the TLS certificate of the MikroTik API endpoint. Set to false to allow self-signed certificates (not recommended for production).
api_timeout
Default:30s
Description: Timeout for API requests to the MikroTik device. Uses Go duration format (e.g., 10s, 1m). If omitted, a default of 30 seconds is used.
concurrency
Default:5
Description: Maximum number of concurrent API requests the backend will issue when enumerating interfaces and their details. If 0 or negative, a sane default of 5 is used.
ignored_interfaces
Default:(empty)
Description: A list of interface names to exclude during interface enumeration. This is useful if you want to prevent specific interfaces from being imported from the MikroTik device.
debug
Default:false
Description: Enable verbose debug logging for the MikroTik backend.
For more details on configuring the MikroTik backend, see the Backends documentation.
Advanced
Additional or more specialized configuration options for logging and interface creation details.
log_level
Default:info
Environment Variable:WG_PORTAL_ADVANCED_LOG_LEVEL
Description: The log level used by the application. Valid options are: trace, debug, info, warn, error.
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.
Description: A time threshold (e.g., 100ms) above which queries are considered slow and logged as warnings. If zero, slow query logging is disabled. Format uses s, ms for seconds, milliseconds, see time.ParseDuration. The value must be a string.
type
Default:sqlite
Environment Variable:WG_PORTAL_DATABASE_TYPE
Description: The database type. Valid options: sqlite, mssql, mysql, postgres.
dsn
Default:data/sqlite.db
Environment Variable:WG_PORTAL_DATABASE_DSN
Description: The Data Source Name (DSN) for connecting to the database. For example:
Description: Passphrase for encrypting sensitive values such as private keys in the database. Encryption is only applied if this passphrase is set. Important: Once you enable encryption by setting this passphrase, you cannot disable it or change it afterward. New or updated records will be encrypted; existing data remains in plaintext until it’s next modified.
Statistics
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
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.
Description: Address and port for the integrated Prometheus metric server (e.g., :8787 or 127.0.0.1:8787).
Mail
Options for configuring email notifications or sending peer configurations via email. By default, emails will only be sent to peers that have a valid user record linked. To send emails to all peers that have a valid email-address as user-identifier, set allow_peer_email to true.
Description: If true, and a peer has no valid user record linked, but the user-identifier of the peer is a valid email address, emails will be sent to that email address. If false, and the peer has no valid user record linked, emails will not be sent. If a peer has linked a valid user, the email address is always taken from the user record.
Auth
WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), Passkeys (webauthn) and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
Some core authentication options are shared across all providers, while others are specific to each provider type.
Description: Minimum password length for local authentication. This is not enforced for LDAP authentication. The default admin password strength is also enforced by this setting.
Important: The password should be strong and secure. It is recommended to use a password with at least 16 characters, including uppercase and lowercase letters, numbers, and special characters.
Description: If true, the login form is hidden and only the OIDC, OAuth, LDAP, or WebAuthn providers are shown. This is useful if you want to enforce a specific authentication method. If no social login providers are configured, the login form is always shown, regardless of this setting.
Important: You can still access the login form by adding the ?all query parameter to the login URL (e.g. https://wg.portal/#/login?all).
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).
allowed_domains
Default:(empty)
Description: A list of allowlisted domains. Only users with email addresses in these domains can log in or register. This is useful for restricting access to specific organizations or groups.
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:false
Description: If true, a new user will be created in WireGuard Portal if not already present.
log_user_info
Default:false
Description: If true, OIDC user data is logged at the trace level upon login (for debugging).
log_sensitive_info
Default:false
Description: If true, sensitive OIDC user data, such as tokens and raw responses, will be logged at the trace level upon login (for debugging).
Important: Keep this setting disabled in production environments! Remove logs once you finished debugging authentication issues.
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.
allowed_domains
Default:(empty)
Description: A list of allowlisted domains. Only users with email addresses in these domains can log in or register. This is useful for restricting access to specific organizations or groups.
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:false
Description: If true, new users are created automatically on successful login.
log_user_info
Default:false
Description: If true, logs user info at the trace level upon login.
log_sensitive_info
Default:false
Description: If true, sensitive OIDC user data, such as tokens and raw responses, will be logged at the trace level upon login (for debugging).
Important: Keep this setting disabled in production environments! Remove logs once you finished debugging authentication issues.
LDAP
The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
url
Default:(empty)
Description: The LDAP server URL (e.g., ldap://srv-ad01.company.local:389).
start_tls
Default:false
Description: If true, use STARTTLS to secure the LDAP connection.
cert_validation
Default:false
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: Passphrase for encrypting sensitive values such as private keys in the database. Encryption is only applied if this passphrase is set. Important: Once you enable encryption by setting this passphrase, you cannot disable it or change it afterward. New or updated records will be encrypted; existing data remains in plaintext until it’s next modified.
Statistics
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
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.
Description: Address and port for the integrated Prometheus metric server (e.g., :8787 or 127.0.0.1:8787).
Mail
Options for configuring email notifications or sending peer configurations via email. By default, emails will only be sent to peers that have a valid user record linked. To send emails to all peers that have a valid email-address as user-identifier, set allow_peer_email to true.
Description: If true, and a peer has no valid user record linked, but the user-identifier of the peer is a valid email address, emails will be sent to that email address. If false, and the peer has no valid user record linked, emails will not be sent. If a peer has linked a valid user, the email address is always taken from the user record.
Description: Path to the email template files that override embedded templates. Check usage documentation for an example.`
Auth
WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), Passkeys (webauthn) and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
Some core authentication options are shared across all providers, while others are specific to each provider type.
Description: Minimum password length for local authentication. This is not enforced for LDAP authentication. The default admin password strength is also enforced by this setting.
Important: The password should be strong and secure. It is recommended to use a password with at least 16 characters, including uppercase and lowercase letters, numbers, and special characters.
Description: If true, the login form is hidden and only the OIDC, OAuth, LDAP, or WebAuthn providers are shown. This is useful if you want to enforce a specific authentication method. If no social login providers are configured, the login form is always shown, regardless of this setting.
Important: You can still access the login form by adding the ?all query parameter to the login URL (e.g. https://wg.portal/#/login?all).
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).
allowed_domains
Default:(empty)
Description: A list of allowlisted domains. Only users with email addresses in these domains can log in or register. This is useful for restricting access to specific organizations or groups.
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:false
Description: If true, a new user will be created in WireGuard Portal if not already present.
log_user_info
Default:false
Description: If true, OIDC user data is logged at the trace level upon login (for debugging).
log_sensitive_info
Default:false
Description: If true, sensitive OIDC user data, such as tokens and raw responses, will be logged at the trace level upon login (for debugging).
Important: Keep this setting disabled in production environments! Remove logs once you finished debugging authentication issues.
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.
allowed_domains
Default:(empty)
Description: A list of allowlisted domains. Only users with email addresses in these domains can log in or register. This is useful for restricting access to specific organizations or groups.
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:false
Description: If true, new users are created automatically on successful login.
log_user_info
Default:false
Description: If true, logs user info at the trace level upon login.
log_sensitive_info
Default:false
Description: If true, sensitive OIDC user data, such as tokens and raw responses, will be logged at the trace level upon login (for debugging).
Important: Keep this setting disabled in production environments! Remove logs once you finished debugging authentication issues.
LDAP
The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
provider_name
Default:(empty)
Description: A unique name for this provider. Must not conflict with other providers.
url
Default:(empty)
Description: The LDAP server URL (e.g., ldap://srv-ad01.company.local:389).
start_tls
Default:false
Description: If true, use STARTTLS to secure the LDAP connection.
cert_validation
Default:false
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:
Important: The login_filter must always be a valid LDAP filter. It should at most return one user. If the filter returns multiple or no users, the login will fail.
admin_group
Default:(empty)
Description: A specific LDAP group whose members are considered administrators in WireGuard Portal. 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:
Description: If true, Passkey authentication is enabled. If false, WebAuthn is disabled. Users are encouraged to use Passkeys for secure authentication instead of passwords. If a passkey is registered, the password login is still available as a fallback. Ensure that the password is strong and secure.
Web
The web section contains configuration options for the web server, including the listening address, session management, and CSRF protection. It is important to specify a valid external_url for the web server, especially if you are using a reverse proxy. Without a valid external_url, the login process may fail due to CSRF protection.
Description: The listening address and port for the web server (e.g., :8888 to bind on all interfaces or 127.0.0.1:8888 to bind only on the loopback interface). Ensure that access to WireGuard Portal is protected against unauthorized access, especially if binding to all interfaces.
external_url
Default:http://localhost:8888
Environment Variable:WG_PORTAL_WEB_EXTERNAL_URL
Description: The URL where a client can access WireGuard Portal. This URL is used for generating links in emails and for performing OAUTH redirects. Important: If you are using a reverse proxy, set this to the external URL of the reverse proxy, otherwise login will fail. If you access the portal via IP address, set this to the IP address of the server.
Description: Expose the hostname and version of the WireGuard Portal server in an HTTP header. This is useful for debugging but may expose sensitive information.
cert_file
Default:(empty)
Environment Variable:WG_PORTAL_WEB_CERT_FILE
Description: (Optional) Path to the TLS certificate file.
key_file
Default:(empty)
Environment Variable:WG_PORTAL_WEB_KEY_FILE
Description: (Optional) Path to the TLS certificate key file.
Webhook
The webhook section allows you to configure a webhook that is called on certain events in WireGuard Portal. Further details can be found in the usage documentation.
url
Default:(empty)
Environment Variable:WG_PORTAL_WEBHOOK_URL
Description: The POST endpoint to which the webhook is sent. The URL must be reachable from the WireGuard Portal server. If the URL is empty, the webhook is disabled.
Description: If true, Passkey authentication is enabled. If false, WebAuthn is disabled. Users are encouraged to use Passkeys for secure authentication instead of passwords. If a passkey is registered, the password login is still available as a fallback. Ensure that the password is strong and secure.
Web
The web section contains configuration options for the web server, including the listening address, session management, and CSRF protection. It is important to specify a valid external_url for the web server, especially if you are using a reverse proxy. Without a valid external_url, the login process may fail due to CSRF protection.
Description: The listening address and port for the web server (e.g., :8888 to bind on all interfaces or 127.0.0.1:8888 to bind only on the loopback interface). Ensure that access to WireGuard Portal is protected against unauthorized access, especially if binding to all interfaces.
external_url
Default:http://localhost:8888
Environment Variable:WG_PORTAL_WEB_EXTERNAL_URL
Description: The URL where a client can access WireGuard Portal. This URL is used for generating links in emails and for performing OAUTH redirects. Important: If you are using a reverse proxy, set this to the external URL of the reverse proxy, otherwise login will fail. If you access the portal via IP address, set this to the IP address of the server.
Description: Expose the hostname and version of the WireGuard Portal server in an HTTP header. This is useful for debugging but may expose sensitive information.
cert_file
Default:(empty)
Environment Variable:WG_PORTAL_WEB_CERT_FILE
Description: (Optional) Path to the TLS certificate file.
key_file
Default:(empty)
Environment Variable:WG_PORTAL_WEB_KEY_FILE
Description: (Optional) Path to the TLS certificate key file.
Description: Optional base directory from which the web frontend is served. Check out the building documentation for more information on how to compile the frontend assets.
If the directory contains at least one file (recursively), these files are served at /app, overriding the embedded frontend assets.
If the directory is empty or does not exist on startup, the embedded frontend is copied into this directory automatically and then served.
If left empty, the embedded frontend is served and no files are written to disk.
Webhook
The webhook section allows you to configure a webhook that is called on certain events in WireGuard Portal. Further details can be found in the usage documentation.
url
Default:(empty)
Environment Variable:WG_PORTAL_WEBHOOK_URL
Description: The POST endpoint to which the webhook is sent. The URL must be reachable from the WireGuard Portal server. If the URL is empty, the webhook is disabled.
The WireGuard Portal Docker image is available on both Docker Hub and GitHub Container Registry. It is built on the official Alpine Linux base image and comes pre-packaged with all necessary WireGuard dependencies.
This container allows you to establish WireGuard VPN connections without relying on a host system that supports WireGuard or using the linuxserver/wireguard Docker image.
The recommended method for deploying WireGuard Portal is via Docker Compose for ease of configuration and management.
A sample docker-compose.yml (managing WireGuard interfaces directly on the host) is provided below:
The WireGuard Portal Docker image is available on both Docker Hub and GitHub Container Registry. It is built on the official Alpine Linux base image and comes pre-packaged with all necessary WireGuard dependencies.
This container allows you to establish WireGuard VPN connections without relying on a host system that supports WireGuard or using the linuxserver/wireguard Docker image.
The recommended method for deploying WireGuard Portal is via Docker Compose for ease of configuration and management.
A sample docker-compose.yml (managing WireGuard interfaces directly on the host) is provided below:
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.
Core configuration options. If external admins in auth are defined and there are no admin_user and admin_password defined here, the default admin account will be disabled.
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.web.appProtocol
string
"http"
Web service appProtocol. Will be auto set to https if certificate is enabled.
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. If enabled, certificate will be used for the web.
For production deployments, always serve the WireGuard Portal over HTTPS. You have two options to secure your connection:
Reverse Proxy
Let a front‐end proxy handle HTTPS for you. This also frees you from managing certificates manually and is therefore the preferred option. You can use Nginx, Traefik, Caddy or any other proxy.
Below is an example using a Docker Compose stack with Traefik. It exposes the WireGuard Portal on https://wg.domain.com and redirects initial HTTP traffic to HTTPS.
For production deployments, always serve the WireGuard Portal over HTTPS. You have two options to secure your connection:
Reverse Proxy
Let a front‐end proxy handle HTTPS for you. This also frees you from managing certificates manually and is therefore the preferred option. You can use Nginx, Traefik, Caddy or any other proxy.
Below is an example using a Docker Compose stack with Traefik. It exposes the WireGuard Portal on https://wg.domain.com and redirects initial HTTP traffic to HTTPS.