wg-portal/v2.0.0-beta.7/search/search_index.json

1 line
61 KiB
JSON

{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"documentation/overview/","title":"Overview","text":"<p>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.</p> <p>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.</p>"},{"location":"documentation/overview/#features","title":"Features","text":"<ul> <li>Self-hosted - the whole application is a single binary</li> <li>Responsive multi-language web UI written in Vue.JS</li> <li>Automatically selects IP from the network pool assigned to the client</li> <li>QR-Code for convenient mobile client configuration</li> <li>Sends email to the client with QR-code and client config</li> <li>Enable / Disable clients seamlessly</li> <li>Generation of wg-quick configuration file (<code>wgX.conf</code>) if required</li> <li>User authentication (database, OAuth, or LDAP)</li> <li>IPv6 ready</li> <li>Docker ready</li> <li>Can be used with existing WireGuard setups</li> <li>Support for multiple WireGuard interfaces</li> <li>Peer Expiry Feature</li> <li>Handles route and DNS settings like wg-quick does</li> <li>Exposes Prometheus metrics for monitoring and alertingt</li> <li>REST API for management and client deployment</li> </ul>"},{"location":"documentation/configuration/examples/","title":"Examples","text":"<p>Below are some sample YAML configurations demonstrating how to override some default values.</p>"},{"location":"documentation/configuration/examples/#basic","title":"Basic","text":"<pre><code>core:\n admin_user: test@example.com\n admin_password: password\n admin_api_token: super-s3cr3t-api-token-or-a-UUID\n import_existing: false\n create_default_peer: true\n self_provisioning_allowed: true\n\nweb:\n site_title: My WireGuard Server\n site_company_name: My Company\n listening_address: :8080\n external_url: https://my.externa-domain.com\n csrf_secret: super-s3cr3t-csrf\n session_secret: super-s3cr3t-session\n request_logging: true\n\nadvanced:\n log_level: trace\n log_pretty: true\n log_json: false\n config_storage_path: /etc/wireguard\n expiry_check_interval: 5m\n\ndatabase:\n debug: true\n type: sqlite\n dsn: data/sqlite.db\n</code></pre>"},{"location":"documentation/configuration/examples/#ldap-authentication-and-synchronization","title":"LDAP Authentication and Synchronization","text":"<pre><code># ... (basic configuration)\n\nauth:\n ldap:\n # a sample LDAP provider with user sync enabled\n - id: ldap\n provider_name: Active Directory\n display_name: Login with&lt;/br&gt;AD\n url: ldap://srv-ad1.company.local:389\n bind_user: ldap_wireguard@company.local\n bind_pass: super-s3cr3t-ldap\n base_dn: DC=COMPANY,DC=LOCAL\n login_filter: (&amp;(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))\n sync_interval: 15m\n sync_filter: (&amp;(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))\n disable_missing: true\n field_map:\n user_identifier: sAMAccountName\n email: mail\n firstname: givenName\n lastname: sn\n phone: telephoneNumber\n department: department\n memberof: memberOf\n admin_group: CN=WireGuardAdmins,OU=Some-OU,DC=COMPANY,DC=LOCAL\n registration_enabled: true\n log_user_info: true\n</code></pre>"},{"location":"documentation/configuration/examples/#openid-connect-oidc-authentication","title":"OpenID Connect (OIDC) Authentication","text":"<pre><code># ... (basic configuration)\n\nauth:\n oidc:\n # a sample Entra ID provider with environment variable substitution\n - id: azure\n provider_name: azure\n display_name: Login with&lt;/br&gt;Entra ID\n registration_enabled: true\n base_url: \"https://login.microsoftonline.com/${AZURE_TENANT_ID}/v2.0\"\n client_id: \"${AZURE_CLIENT_ID}\"\n client_secret: \"${AZURE_CLIENT_SECRET}\"\n extra_scopes:\n - profile\n - email\n\n # a sample provider where users with the attribute `wg_admin` set to `true` are considered as admins\n - id: oidc-with-admin-attribute\n provider_name: google\n display_name: Login with&lt;/br&gt;Google\n base_url: https://accounts.google.com\n client_id: the-client-id-1234.apps.googleusercontent.com\n client_secret: A_CLIENT_SECRET\n extra_scopes:\n - https://www.googleapis.com/auth/userinfo.email\n - https://www.googleapis.com/auth/userinfo.profile\n field_map:\n user_identifier: sub\n email: email\n firstname: given_name\n lastname: family_name\n phone: phone_number\n department: department\n is_admin: wg_admin\n admin_mapping:\n admin_value_regex: ^true$\n registration_enabled: true\n log_user_info: true\n\n # a sample provider where users in the group `the-admin-group` are considered as admins\n - id: oidc-with-admin-group\n provider_name: google2\n display_name: Login with&lt;/br&gt;Google2\n base_url: https://accounts.google.com\n client_id: another-client-id-1234.apps.googleusercontent.com\n client_secret: A_CLIENT_SECRET\n extra_scopes:\n - https://www.googleapis.com/auth/userinfo.email\n - https://www.googleapis.com/auth/userinfo.profile\n field_map:\n user_identifier: sub\n email: email\n firstname: given_name\n lastname: family_name\n phone: phone_number\n department: department\n user_groups: groups\n admin_mapping:\n admin_group_regex: ^the-admin-group$\n registration_enabled: true\n log_user_info: true\n</code></pre>"},{"location":"documentation/configuration/examples/#plain-oauth2-authentication","title":"Plain OAuth2 Authentication","text":"<pre><code># ... (basic configuration)\n\nauth:\n oauth:\n # a sample provider where users with the attribute `this-attribute-must-be-true` set to `true` or `True`\n # are considered as admins\n - id: google_plain_oauth-with-admin-attribute\n provider_name: google3\n display_name: Login with&lt;/br&gt;Google3\n client_id: another-client-id-1234.apps.googleusercontent.com\n client_secret: A_CLIENT_SECRET\n auth_url: https://accounts.google.com/o/oauth2/v2/auth\n token_url: https://oauth2.googleapis.com/token\n user_info_url: https://openidconnect.googleapis.com/v1/userinfo\n scopes:\n - openid\n - email\n - profile\n field_map:\n user_identifier: sub\n email: email\n firstname: name\n is_admin: this-attribute-must-be-true\n admin_mapping:\n admin_value_regex: ^(True|true)$\n registration_enabled: true\n\n # a sample provider where either users with the attribute `this-attribute-must-be-true` set to `true` or \n # users in the group `admin-group-name` are considered as admins\n - id: google_plain_oauth_with_groups\n provider_name: google4\n display_name: Login with&lt;/br&gt;Google4\n client_id: another-client-id-1234.apps.googleusercontent.com\n client_secret: A_CLIENT_SECRET\n auth_url: https://accounts.google.com/o/oauth2/v2/auth\n token_url: https://oauth2.googleapis.com/token\n user_info_url: https://openidconnect.googleapis.com/v1/userinfo\n scopes:\n - openid\n - email\n - profile\n - i-want-some-groups\n field_map:\n email: email\n firstname: name\n user_identifier: sub\n is_admin: this-attribute-must-be-true\n user_groups: groups\n admin_mapping:\n admin_value_regex: ^true$\n admin_group_regex: ^admin-group-name$\n registration_enabled: true\n log_user_info: true\n</code></pre>"},{"location":"documentation/configuration/overview/","title":"Overview","text":"<p>This page provides an overview of all available configuration options for WireGuard Portal.</p> <p>You can supply these configurations in a YAML file (e.g. <code>config.yaml</code>) 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 <code>WG_PORTAL_CONFIG</code>. For example: <code>WG_PORTAL_CONFIG=/etc/wg-portal/config.yaml ./wg-portal</code>. Also, environment variable substitution in config file is supported. Refer to syntax.</p> <p>Configuration examples are available on the Examples page.</p> Default configuration <pre><code>core:\n admin_user: admin@wgportal.local\n admin_password: wgportal\n editable_keys: true\n create_default_peer: false\n create_default_peer_on_creation: false\n re_enable_peer_after_user_enable: true\n delete_peer_after_user_deleted: false\n self_provisioning_allowed: false\n import_existing: true\n restore_state: true\n\nadvanced:\n log_level: info\n log_pretty: false\n log_json: false\n start_listen_port: 51820\n start_cidr_v4: 10.11.12.0/24\n start_cidr_v6: fdfd:d3ad:c0de:1234::0/64\n use_ip_v6: true\n config_storage_path: \"\"\n expiry_check_interval: 15m\n rule_prio_offset: 20000\n api_admin_only: true\n\ndatabase:\n debug: false\n slow_query_threshold: 0\n type: sqlite\n dsn: data/sqlite.db\n\nstatistics:\n use_ping_checks: true\n ping_check_workers: 10\n ping_unprivileged: false\n ping_check_interval: 1m\n data_collection_interval: 1m\n collect_interface_data: true\n collect_peer_data: true\n collect_audit_data: true\n listening_address: :8787\n\nmail:\n host: 127.0.0.1\n port: 25\n encryption: none\n cert_validation: false\n username: \"\"\n password: \"\"\n auth_type: plain\n from: Wireguard Portal &lt;noreply@wireguard.local&gt;\n link_only: false\n\nauth:\n oidc: []\n oauth: []\n ldap: []\n\nweb:\n listening_address: :8888\n external_url: http://localhost:8888\n site_company_name: WireGuard Portal\n site_title: WireGuard Portal\n session_identifier: wgPortalSession\n session_secret: very_secret\n csrf_secret: extremely_secret\n request_logging: false\n cert_file: \"\"\n key_File: \"\"\n</code></pre> <p>Below you will find sections like <code>core</code>, <code>advanced</code>, <code>database</code>, <code>statistics</code>, <code>mail</code>, <code>auth</code> and <code>web</code>. Each section describes the individual configuration keys, their default values, and a brief explanation of their purpose.</p>"},{"location":"documentation/configuration/overview/#core","title":"Core","text":"<p>These are the primary configuration options that control fundamental WireGuard Portal behavior. More advanced options are found in the subsequent <code>Advanced</code> section.</p>"},{"location":"documentation/configuration/overview/#admin_user","title":"<code>admin_user</code>","text":"<ul> <li>Default: <code>admin@wgportal.local</code></li> <li>Description: The administrator user. This user will be created as a default admin if it does not yet exist.</li> </ul>"},{"location":"documentation/configuration/overview/#admin_password","title":"<code>admin_password</code>","text":"<ul> <li>Default: <code>wgportal</code></li> <li>Description: The administrator password. The default password of <code>wgportal</code> should be changed immediately.</li> </ul>"},{"location":"documentation/configuration/overview/#admin_api_token","title":"<code>admin_api_token</code>","text":"<ul> <li>Default: (empty)</li> <li>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.</li> </ul>"},{"location":"documentation/configuration/overview/#editable_keys","title":"<code>editable_keys</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: Allow editing of WireGuard key-pairs directly in the UI.</li> </ul>"},{"location":"documentation/configuration/overview/#create_default_peer","title":"<code>create_default_peer</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If a user logs in for the first time with no existing peers, automatically create a new WireGuard peer for all server interfaces.</li> </ul>"},{"location":"documentation/configuration/overview/#create_default_peer_on_creation","title":"<code>create_default_peer_on_creation</code>","text":"<ul> <li>Default: <code>false</code></li> <li>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.</li> </ul>"},{"location":"documentation/configuration/overview/#re_enable_peer_after_user_enable","title":"<code>re_enable_peer_after_user_enable</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: Re-enable all peers that were previously disabled if the associated user is re-enabled.</li> </ul>"},{"location":"documentation/configuration/overview/#delete_peer_after_user_deleted","title":"<code>delete_peer_after_user_deleted</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If a user is deleted, remove all linked peers. Otherwise, peers remain but are disabled.</li> </ul>"},{"location":"documentation/configuration/overview/#self_provisioning_allowed","title":"<code>self_provisioning_allowed</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: Allow registered (non-admin) users to self-provision peers from their profile page.</li> </ul>"},{"location":"documentation/configuration/overview/#import_existing","title":"<code>import_existing</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: On startup, import existing WireGuard interfaces and peers into WireGuard Portal.</li> </ul>"},{"location":"documentation/configuration/overview/#restore_state","title":"<code>restore_state</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: Restore the WireGuard interface states (up/down) that existed before WireGuard Portal started.</li> </ul>"},{"location":"documentation/configuration/overview/#advanced","title":"Advanced","text":"<p>Additional or more specialized configuration options for logging and interface creation details.</p>"},{"location":"documentation/configuration/overview/#log_level","title":"<code>log_level</code>","text":"<ul> <li>Default: <code>info</code></li> <li>Description: The log level used by the application. Valid options are: <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code>.</li> </ul>"},{"location":"documentation/configuration/overview/#log_pretty","title":"<code>log_pretty</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>true</code>, log messages are colorized and formatted for readability (pretty-print).</li> </ul>"},{"location":"documentation/configuration/overview/#log_json","title":"<code>log_json</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>true</code>, log messages are structured in JSON format.</li> </ul>"},{"location":"documentation/configuration/overview/#start_listen_port","title":"<code>start_listen_port</code>","text":"<ul> <li>Default: <code>51820</code></li> <li>Description: The first port to use when automatically creating new WireGuard interfaces.</li> </ul>"},{"location":"documentation/configuration/overview/#start_cidr_v4","title":"<code>start_cidr_v4</code>","text":"<ul> <li>Default: <code>10.11.12.0/24</code></li> <li>Description: The initial IPv4 subnet to use when automatically creating new WireGuard interfaces.</li> </ul>"},{"location":"documentation/configuration/overview/#start_cidr_v6","title":"<code>start_cidr_v6</code>","text":"<ul> <li>Default: <code>fdfd:d3ad:c0de:1234::0/64</code></li> <li>Description: The initial IPv6 subnet to use when automatically creating new WireGuard interfaces.</li> </ul>"},{"location":"documentation/configuration/overview/#use_ip_v6","title":"<code>use_ip_v6</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: Enable or disable IPv6 support.</li> </ul>"},{"location":"documentation/configuration/overview/#config_storage_path","title":"<code>config_storage_path</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Path to a directory where <code>wg-quick</code> style configuration files will be stored (if you need local filesystem configs).</li> </ul>"},{"location":"documentation/configuration/overview/#expiry_check_interval","title":"<code>expiry_check_interval</code>","text":"<ul> <li>Default: <code>15m</code></li> <li>Description: Interval after which existing peers are checked if they are expired. Format uses <code>s</code>, <code>m</code>, <code>h</code>, <code>d</code> for seconds, minutes, hours, days, see time.ParseDuration.</li> </ul>"},{"location":"documentation/configuration/overview/#rule_prio_offset","title":"<code>rule_prio_offset</code>","text":"<ul> <li>Default: <code>20000</code></li> <li>Description: Offset for IP route rule priorities when configuring routing.</li> </ul>"},{"location":"documentation/configuration/overview/#route_table_offset","title":"<code>route_table_offset</code>","text":"<ul> <li>Default: <code>20000</code></li> <li>Description: Offset for IP route table IDs when configuring routing.</li> </ul>"},{"location":"documentation/configuration/overview/#api_admin_only","title":"<code>api_admin_only</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: If <code>true</code>, the public REST API is accessible only to admin users. The API docs live at <code>/api/v1/doc.html</code>.</li> </ul>"},{"location":"documentation/configuration/overview/#database","title":"Database","text":"<p>Configuration for the underlying database used by WireGuard Portal. Supported databases include SQLite, MySQL, Microsoft SQL Server, and Postgres.</p>"},{"location":"documentation/configuration/overview/#debug","title":"<code>debug</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>true</code>, logs all database statements (verbose).</li> </ul>"},{"location":"documentation/configuration/overview/#slow_query_threshold","title":"<code>slow_query_threshold</code>","text":"<ul> <li>Default: 0</li> <li>Description: A time threshold (e.g., <code>100ms</code>) above which queries are considered slow and logged as warnings. If empty or zero, slow query logging is disabled. Format uses <code>s</code>, <code>ms</code> for seconds, milliseconds, see time.ParseDuration.</li> </ul>"},{"location":"documentation/configuration/overview/#type","title":"<code>type</code>","text":"<ul> <li>Default: <code>sqlite</code></li> <li>Description: The database type. Valid options: <code>sqlite</code>, <code>mssql</code>, <code>mysql</code>, <code>postgres</code>.</li> </ul>"},{"location":"documentation/configuration/overview/#dsn","title":"<code>dsn</code>","text":"<ul> <li>Default: <code>data/sqlite.db</code></li> <li>Description: The Data Source Name (DSN) for connecting to the database. For example: <pre><code>user:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4&amp;parseTime=True&amp;loc=Local\n</code></pre></li> </ul>"},{"location":"documentation/configuration/overview/#statistics","title":"Statistics","text":"<p>Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.</p>"},{"location":"documentation/configuration/overview/#use_ping_checks","title":"<code>use_ping_checks</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: Enable periodic ping checks to verify that peers remain responsive.</li> </ul>"},{"location":"documentation/configuration/overview/#ping_check_workers","title":"<code>ping_check_workers</code>","text":"<ul> <li>Default: <code>10</code></li> <li>Description: Number of parallel worker processes for ping checks.</li> </ul>"},{"location":"documentation/configuration/overview/#ping_unprivileged","title":"<code>ping_unprivileged</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>false</code>, ping checks run without root privileges. This is currently considered BETA.</li> </ul>"},{"location":"documentation/configuration/overview/#ping_check_interval","title":"<code>ping_check_interval</code>","text":"<ul> <li>Default: <code>1m</code></li> <li>Description: Interval between consecutive ping checks for all peers. Format uses <code>s</code>, <code>m</code>, <code>h</code>, <code>d</code> for seconds, minutes, hours, days, see time.ParseDuration.</li> </ul>"},{"location":"documentation/configuration/overview/#data_collection_interval","title":"<code>data_collection_interval</code>","text":"<ul> <li>Default: <code>1m</code></li> <li>Description: Interval between data collection cycles (bytes sent/received, handshake times, etc.). Format uses <code>s</code>, <code>m</code>, <code>h</code>, <code>d</code> for seconds, minutes, hours, days, see time.ParseDuration.</li> </ul>"},{"location":"documentation/configuration/overview/#collect_interface_data","title":"<code>collect_interface_data</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: If <code>true</code>, collects interface-level data (bytes in/out) for monitoring and statistics.</li> </ul>"},{"location":"documentation/configuration/overview/#collect_peer_data","title":"<code>collect_peer_data</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: If <code>true</code>, collects peer-level data (bytes, last handshake, endpoint, etc.).</li> </ul>"},{"location":"documentation/configuration/overview/#collect_audit_data","title":"<code>collect_audit_data</code>","text":"<ul> <li>Default: <code>true</code></li> <li>Description: If <code>true</code>, logs certain portal events (such as user logins) to the database.</li> </ul>"},{"location":"documentation/configuration/overview/#listening_address","title":"<code>listening_address</code>","text":"<ul> <li>Default: <code>:8787</code></li> <li>Description: Address and port for the integrated Prometheus metric server (e.g., <code>:8787</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#mail","title":"Mail","text":"<p>Options for configuring email notifications or sending peer configurations via email.</p>"},{"location":"documentation/configuration/overview/#host","title":"<code>host</code>","text":"<ul> <li>Default: <code>127.0.0.1</code></li> <li>Description: Hostname or IP of the SMTP server.</li> </ul>"},{"location":"documentation/configuration/overview/#port","title":"<code>port</code>","text":"<ul> <li>Default: <code>25</code></li> <li>Description: Port number for the SMTP server.</li> </ul>"},{"location":"documentation/configuration/overview/#encryption","title":"<code>encryption</code>","text":"<ul> <li>Default: <code>none</code></li> <li>Description: SMTP encryption type. Valid values: <code>none</code>, <code>tls</code>, <code>starttls</code>.</li> </ul>"},{"location":"documentation/configuration/overview/#cert_validation","title":"<code>cert_validation</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>true</code>, validate the SMTP server certificate (relevant if <code>encryption</code> = <code>tls</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#username","title":"<code>username</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Optional SMTP username for authentication.</li> </ul>"},{"location":"documentation/configuration/overview/#password","title":"<code>password</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Optional SMTP password for authentication.</li> </ul>"},{"location":"documentation/configuration/overview/#auth_type","title":"<code>auth_type</code>","text":"<ul> <li>Default: <code>plain</code></li> <li>Description: SMTP authentication type. Valid values: <code>plain</code>, <code>login</code>, <code>crammd5</code>.</li> </ul>"},{"location":"documentation/configuration/overview/#from","title":"<code>from</code>","text":"<ul> <li>Default: <code>Wireguard Portal &lt;noreply@wireguard.local&gt;</code></li> <li>Description: The default \"From\" address when sending emails.</li> </ul>"},{"location":"documentation/configuration/overview/#link_only","title":"<code>link_only</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: If <code>true</code>, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.</li> </ul>"},{"location":"documentation/configuration/overview/#auth","title":"Auth","text":"<p>WireGuard Portal supports multiple authentication strategies, including OpenID Connect (<code>oidc</code>), OAuth (<code>oauth</code>), and LDAP (<code>ldap</code>). Each can have multiple providers configured. Below are the relevant keys.</p>"},{"location":"documentation/configuration/overview/#oidc","title":"OIDC","text":"<p>The <code>oidc</code> array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside <code>auth.oidc</code>:</p>"},{"location":"documentation/configuration/overview/#provider_name","title":"<code>provider_name</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A unique name for this provider. Must not conflict with other providers.</li> </ul>"},{"location":"documentation/configuration/overview/#display_name","title":"<code>display_name</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A user-friendly name shown on the login page (e.g., \"Login with Google\").</li> </ul>"},{"location":"documentation/configuration/overview/#base_url","title":"<code>base_url</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The OIDC provider\u2019s base URL (e.g., <code>https://accounts.google.com</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#client_id","title":"<code>client_id</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The OAuth client ID from the OIDC provider.</li> </ul>"},{"location":"documentation/configuration/overview/#client_secret","title":"<code>client_secret</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The OAuth client secret from the OIDC provider.</li> </ul>"},{"location":"documentation/configuration/overview/#extra_scopes","title":"<code>extra_scopes</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A list of additional OIDC scopes (e.g., <code>profile</code>, <code>email</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#field_map","title":"<code>field_map</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Maps OIDC claims to WireGuard Portal user fields. </li> <li> <p>Available fields: <code>user_identifier</code>, <code>email</code>, <code>firstname</code>, <code>lastname</code>, <code>phone</code>, <code>department</code>, <code>is_admin</code>, <code>user_groups</code>.</p> Field Typical OIDC Claim Explanation <code>user_identifier</code> <code>sub</code> or <code>preferred_username</code> A unique identifier for the user. Often the OIDC <code>sub</code> claim is used because it\u2019s guaranteed to be unique for the user within the IdP. Some providers also support <code>preferred_username</code> if it\u2019s unique. <code>email</code> <code>email</code> The user\u2019s email address as provided by the IdP. Not always verified, depending on IdP settings. <code>firstname</code> <code>given_name</code> The user\u2019s first name, typically provided by the IdP in the <code>given_name</code> claim. <code>lastname</code> <code>family_name</code> The user\u2019s last (family) name, typically provided by the IdP in the <code>family_name</code> claim. <code>phone</code> <code>phone_number</code> The user\u2019s phone number. This may require additional scopes/permissions from the IdP to access. <code>department</code> Custom claim (e.g., <code>department</code>) If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., <code>department</code>, <code>org</code>, or another attribute). <code>is_admin</code> Custom claim or derived role If the IdP returns a role or admin flag, you can map that to <code>is_admin</code>. Often this is managed through custom claims or group membership. <code>user_groups</code> <code>groups</code> or another custom claim A list of group memberships for the user. Some IdPs provide <code>groups</code> out of the box; others require custom claims or directory lookups. </li> </ul>"},{"location":"documentation/configuration/overview/#admin_mapping","title":"<code>admin_mapping</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: WgPortal can grant a user admin rights by matching the value of the <code>is_admin</code> 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 <code>user_group</code> claim. The regular expressions are defined in <code>admin_value_regex</code> and <code>admin_group_regex</code>.<ul> <li><code>admin_value_regex</code>: A regular expression to match the <code>is_admin</code> claim. By default, this expression matches the string \"true\" (<code>^true$</code>).</li> <li><code>admin_group_regex</code>: A regular expression to match the <code>user_groups</code> claim. Each entry in the <code>user_groups</code> claim is checked against this regex.</li> </ul> </li> </ul>"},{"location":"documentation/configuration/overview/#registration_enabled","title":"<code>registration_enabled</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, a new user will be created in WireGuard Portal if not already present.</li> </ul>"},{"location":"documentation/configuration/overview/#log_user_info","title":"<code>log_user_info</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, OIDC user data is logged at the trace level upon login (for debugging).</li> </ul>"},{"location":"documentation/configuration/overview/#oauth","title":"OAuth","text":"<p>The <code>oauth</code> array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside <code>auth.oauth</code>:</p>"},{"location":"documentation/configuration/overview/#provider_name_1","title":"<code>provider_name</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A unique name for this provider. Must not conflict with other providers.</li> </ul>"},{"location":"documentation/configuration/overview/#display_name_1","title":"<code>display_name</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A user-friendly name shown on the login page.</li> </ul>"},{"location":"documentation/configuration/overview/#client_id_1","title":"<code>client_id</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The OAuth client ID for the provider.</li> </ul>"},{"location":"documentation/configuration/overview/#client_secret_1","title":"<code>client_secret</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The OAuth client secret for the provider.</li> </ul>"},{"location":"documentation/configuration/overview/#auth_url","title":"<code>auth_url</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: URL of the authentication endpoint.</li> </ul>"},{"location":"documentation/configuration/overview/#token_url","title":"<code>token_url</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: URL of the token endpoint.</li> </ul>"},{"location":"documentation/configuration/overview/#user_info_url","title":"<code>user_info_url</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: URL of the user information endpoint.</li> </ul>"},{"location":"documentation/configuration/overview/#scopes","title":"<code>scopes</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A list of OAuth scopes.</li> </ul>"},{"location":"documentation/configuration/overview/#field_map_1","title":"<code>field_map</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Maps OAuth attributes to WireGuard Portal fields.</li> <li> <p>Available fields: <code>user_identifier</code>, <code>email</code>, <code>firstname</code>, <code>lastname</code>, <code>phone</code>, <code>department</code>, <code>is_admin</code>, <code>user_groups</code>.</p> Field Typical Claim Explanation <code>user_identifier</code> <code>sub</code> or <code>preferred_username</code> A unique identifier for the user. Often the OIDC <code>sub</code> claim is used because it\u2019s guaranteed to be unique for the user within the IdP. Some providers also support <code>preferred_username</code> if it\u2019s unique. <code>email</code> <code>email</code> The user\u2019s email address as provided by the IdP. Not always verified, depending on IdP settings. <code>firstname</code> <code>given_name</code> The user\u2019s first name, typically provided by the IdP in the <code>given_name</code> claim. <code>lastname</code> <code>family_name</code> The user\u2019s last (family) name, typically provided by the IdP in the <code>family_name</code> claim. <code>phone</code> <code>phone_number</code> The user\u2019s phone number. This may require additional scopes/permissions from the IdP to access. <code>department</code> Custom claim (e.g., <code>department</code>) If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., <code>department</code>, <code>org</code>, or another attribute). <code>is_admin</code> Custom claim or derived role If the IdP returns a role or admin flag, you can map that to <code>is_admin</code>. Often this is managed through custom claims or group membership. <code>user_groups</code> <code>groups</code> or another custom claim A list of group memberships for the user. Some IdPs provide <code>groups</code> out of the box; others require custom claims or directory lookups. </li> </ul>"},{"location":"documentation/configuration/overview/#admin_mapping_1","title":"<code>admin_mapping</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: WgPortal can grant a user admin rights by matching the value of the <code>is_admin</code> 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 <code>user_group</code> claim. The regular expressions are defined in <code>admin_value_regex</code> and <code>admin_group_regex</code>.</li> <li><code>admin_value_regex</code>: A regular expression to match the <code>is_admin</code> claim. By default, this expression matches the string \"true\" (<code>^true$</code>).</li> <li><code>admin_group_regex</code>: A regular expression to match the <code>user_groups</code> claim. Each entry in the <code>user_groups</code> claim is checked against this regex.</li> </ul>"},{"location":"documentation/configuration/overview/#registration_enabled_1","title":"<code>registration_enabled</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, new users are created automatically on successful login.</li> </ul>"},{"location":"documentation/configuration/overview/#log_user_info_1","title":"<code>log_user_info</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, logs user info at the trace level upon login.</li> </ul>"},{"location":"documentation/configuration/overview/#ldap","title":"LDAP","text":"<p>The <code>ldap</code> array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside <code>auth.ldap</code>:</p>"},{"location":"documentation/configuration/overview/#url","title":"<code>url</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The LDAP server URL (e.g., <code>ldap://srv-ad01.company.local:389</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#start_tls","title":"<code>start_tls</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, use STARTTLS to secure the LDAP connection.</li> </ul>"},{"location":"documentation/configuration/overview/#cert_validation_1","title":"<code>cert_validation</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, validate the LDAP server\u2019s TLS certificate.</li> </ul>"},{"location":"documentation/configuration/overview/#tls_certificate_path","title":"<code>tls_certificate_path</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Path to a TLS certificate if needed for LDAP connections.</li> </ul>"},{"location":"documentation/configuration/overview/#tls_key_path","title":"<code>tls_key_path</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: Path to the corresponding TLS certificate key.</li> </ul>"},{"location":"documentation/configuration/overview/#base_dn","title":"<code>base_dn</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The base DN for user searches (e.g., <code>DC=COMPANY,DC=LOCAL</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#bind_user","title":"<code>bind_user</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The bind user for LDAP (e.g., <code>company\\\\ldap_wireguard</code> or <code>ldap_wireguard@company.local</code>).</li> </ul>"},{"location":"documentation/configuration/overview/#bind_pass","title":"<code>bind_pass</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: The bind password for LDAP authentication.</li> </ul>"},{"location":"documentation/configuration/overview/#field_map_2","title":"<code>field_map</code>","text":"<ul> <li>Default: (empty)</li> <li> <p>Description: Maps LDAP attributes to WireGuard Portal fields.</p> <ul> <li>Available fields: <code>user_identifier</code>, <code>email</code>, <code>firstname</code>, <code>lastname</code>, <code>phone</code>, <code>department</code>, <code>memberof</code>.</li> </ul> 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. </li> </ul>"},{"location":"documentation/configuration/overview/#login_filter","title":"<code>login_filter</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: An LDAP filter to restrict which users can log in. Use <code>{{login_identifier}}</code> to insert the username. For example: <pre><code>(&amp;(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))\n</code></pre></li> </ul>"},{"location":"documentation/configuration/overview/#admin_group","title":"<code>admin_group</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: A specific LDAP group whose members are considered administrators in WireGuard Portal. For example: <pre><code>CN=WireGuardAdmins,OU=Some-OU,DC=YOURDOMAIN,DC=LOCAL\n</code></pre></li> </ul>"},{"location":"documentation/configuration/overview/#sync_interval","title":"<code>sync_interval</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: How frequently (in duration, e.g. <code>30m</code>) to synchronize users from LDAP. Empty or <code>0</code> disables sync. Format uses <code>s</code>, <code>m</code>, <code>h</code>, <code>d</code> for seconds, minutes, hours, days, see time.ParseDuration. Only users that match the <code>sync_filter</code> are synchronized, if <code>disable_missing</code> is <code>true</code>, users not found in LDAP are disabled.</li> </ul>"},{"location":"documentation/configuration/overview/#sync_filter","title":"<code>sync_filter</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: An LDAP filter to select which users get synchronized into WireGuard Portal. For example: <pre><code>(&amp;(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))\n</code></pre></li> </ul>"},{"location":"documentation/configuration/overview/#disable_missing","title":"<code>disable_missing</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, any user not found in LDAP (during sync) is disabled in WireGuard Portal.</li> </ul>"},{"location":"documentation/configuration/overview/#auto_re_enable","title":"<code>auto_re_enable</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, users that where disabled because they were missing (see <code>disable_missing</code>) will be re-enabled once they are found again.</li> </ul>"},{"location":"documentation/configuration/overview/#registration_enabled_2","title":"<code>registration_enabled</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, new user accounts are created in WireGuard Portal upon first login.</li> </ul>"},{"location":"documentation/configuration/overview/#log_user_info_2","title":"<code>log_user_info</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: If <code>true</code>, logs LDAP user data at the trace level upon login.</li> </ul>"},{"location":"documentation/configuration/overview/#web","title":"Web","text":""},{"location":"documentation/configuration/overview/#listening_address_1","title":"<code>listening_address</code>","text":"<ul> <li>Default: <code>:8888</code></li> <li>Description: The listening port of the web server.</li> </ul>"},{"location":"documentation/configuration/overview/#external_url","title":"<code>external_url</code>","text":"<ul> <li>Default: <code>http://localhost:8888</code></li> <li>Description: The URL where a client can access WireGuard Portal.</li> </ul>"},{"location":"documentation/configuration/overview/#site_company_name","title":"<code>site_company_name</code>","text":"<ul> <li>Default: <code>WireGuard Portal</code></li> <li>Description: The company name that is shown at the bottom of the web frontend.</li> </ul>"},{"location":"documentation/configuration/overview/#site_title","title":"<code>site_title</code>","text":"<ul> <li>Default: <code>WireGuard Portal</code></li> <li>Description: The title that is shown in the web frontend.</li> </ul>"},{"location":"documentation/configuration/overview/#session_identifier","title":"<code>session_identifier</code>","text":"<ul> <li>Default: <code>wgPortalSession</code></li> <li>Description: The session identifier for the web frontend.</li> </ul>"},{"location":"documentation/configuration/overview/#session_secret","title":"<code>session_secret</code>","text":"<ul> <li>Default: <code>very_secret</code></li> <li>Description: The session secret for the web frontend.</li> </ul>"},{"location":"documentation/configuration/overview/#csrf_secret","title":"<code>csrf_secret</code>","text":"<ul> <li>Default: <code>extremely_secret</code></li> <li>Description: The CSRF secret.</li> </ul>"},{"location":"documentation/configuration/overview/#request_logging","title":"<code>request_logging</code>","text":"<ul> <li>Default: <code>false</code></li> <li>Description: Log all HTTP requests.</li> </ul>"},{"location":"documentation/configuration/overview/#cert_file","title":"<code>cert_file</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: (Optional) Path to the TLS certificate file.</li> </ul>"},{"location":"documentation/configuration/overview/#key_file","title":"<code>key_file</code>","text":"<ul> <li>Default: (empty)</li> <li>Description: (Optional) Path to the TLS certificate key file.</li> </ul>"},{"location":"documentation/getting-started/binaries/","title":"Binaries","text":"<p>Starting from v2, each release includes compiled binaries for supported platforms. These binary versions can be manually downloaded and installed.</p>"},{"location":"documentation/getting-started/binaries/#download","title":"Download","text":"<p>With <code>curl</code>:</p> <pre><code>curl -L -o wg-portal https://github.com/h44z/wg-portal/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64 \n</code></pre> <p>With <code>wget</code>:</p> <pre><code>wget -O wg-portal https://github.com/h44z/wg-portal/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64\n</code></pre> <p>with <code>gh cli</code>:</p> <pre><code>gh release download ${WG_PORTAL_VERSION} --repo h44z/wg-portal --output wg-portal --pattern '*amd64'\n</code></pre>"},{"location":"documentation/getting-started/binaries/#install","title":"Install","text":"<pre><code>sudo mkdir -p /opt/wg-portal\nsudo install wg-portal /opt/wg-portal/\n</code></pre>"},{"location":"documentation/getting-started/binaries/#unreleased","title":"Unreleased","text":"<p>Unreleased versions could be downloaded from GitHub Workflow artifacs also.</p>"},{"location":"documentation/getting-started/docker/","title":"Docker","text":""},{"location":"documentation/getting-started/docker/#image-usage","title":"Image Usage","text":"<p>The preferred way to start WireGuard Portal as Docker container is to use Docker Compose.</p> <p>A sample docker-compose.yml:</p> <pre><code>---\nservices:\n wg-portal:\n image: wgportal/wg-portal:latest\n container_name: wg-portal\n restart: unless-stopped\n logging:\n options:\n max-size: \"10m\"\n max-file: \"3\"\n cap_add:\n - NET_ADMIN\n network_mode: \"host\"\n volumes:\n - /etc/wireguard:/etc/wireguard\n - ./data:/app/data\n - ./config:/app/config\n</code></pre> <p>By default, the webserver is listening on port 8888.</p> <p>Volumes for <code>/app/data</code> and <code>/app/config</code> should be used ensure data persistence across container restarts.</p>"},{"location":"documentation/getting-started/docker/#image-versioning","title":"Image Versioning","text":"<p>All images are hosted on Docker Hub at https://hub.docker.com/r/wgportal/wg-portal. There are three types of tags in the repository:</p>"},{"location":"documentation/getting-started/docker/#semantic-versioned-tags","title":"Semantic versioned tags","text":"<p>For example, <code>1.0.19</code>.</p> <p>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.</p> <p>Once these tags show up in this repository, they will never change.</p> <p>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.</p> <p>If you only want to stay at the same major or major+minor version, use either <code>v[MAJOR]</code> or <code>[MAJOR].[MINOR]</code> tags. For example <code>v1</code> or <code>1.0</code>.</p> <p>Version 1 is currently stable, version 2 is in development.</p>"},{"location":"documentation/getting-started/docker/#latest","title":"latest","text":"<p>This is the most recent build to master! It changes a lot and is very unstable.</p> <p>We recommend that you don't use it except for development purposes.</p>"},{"location":"documentation/getting-started/docker/#branch-tags","title":"Branch tags","text":"<p>For each commit in the master and the stable branch, a corresponding Docker image is build. These images use the <code>master</code> or <code>stable</code> tags.</p>"},{"location":"documentation/getting-started/docker/#configuration","title":"Configuration","text":"<p>You can configure WireGuard Portal using a yaml configuration file. The filepath of the yaml configuration file defaults to <code>/app/config/config.yml</code>. It is possible to override the configuration filepath using the environment variable WG_PORTAL_CONFIG.</p> <p>By default, WireGuard Portal uses a SQLite database. The database is stored in <code>/app/data/sqlite.db</code>.</p> <p>You should mount those directories as a volume:</p> <ul> <li>/app/data</li> <li>/app/config</li> </ul> <p>A detailed description of the configuration options can be found here.</p>"},{"location":"documentation/getting-started/helm/","title":"Helm","text":""},{"location":"documentation/getting-started/helm/#installing-the-chart","title":"Installing the Chart","text":"<p>To install the chart with the release name <code>wg-portal</code>:</p> <pre><code>helm install wg-portal oci://ghcr.io/h44z/charts/wg-portal\n</code></pre> <p>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.</p>"},{"location":"documentation/getting-started/helm/#values","title":"Values","text":"Key Type Default Description nameOverride string <code>\"\"</code> Partially override resource names (adds suffix) fullnameOverride string <code>\"\"</code> Fully override resource names extraDeploy list <code>[]</code> Array of extra objects to deploy with the release config.advanced tpl/object <code>{}</code> Advanced configuration options. config.auth tpl/object <code>{}</code> Auth configuration options. config.core tpl/object <code>{}</code> Core configuration options. If external admins in <code>auth</code> are defined and there are no <code>admin_user</code> and <code>admin_password</code> defined here, the default admin account will be disabled. config.database tpl/object <code>{}</code> Database configuration options config.mail tpl/object <code>{}</code> Mail configuration options config.statistics tpl/object <code>{}</code> Statistics configuration options config.web tpl/object <code>{}</code> Web configuration options. <code>listening_address</code> will be set automatically from <code>service.web.port</code>. <code>external_url</code> is required to enable ingress and certificate resources. revisionHistoryLimit string <code>10</code> The number of old ReplicaSets to retain to allow rollback. workloadType string <code>\"Deployment\"</code> Workload type - <code>Deployment</code> or <code>StatefulSet</code> strategy object <code>{\"type\":\"RollingUpdate\"}</code> Update strategy for the workload Valid values are: <code>RollingUpdate</code> or <code>Recreate</code> for Deployment, <code>RollingUpdate</code> or <code>OnDelete</code> for StatefulSet image.repository string <code>\"ghcr.io/h44z/wg-portal\"</code> Image repository image.pullPolicy string <code>\"IfNotPresent\"</code> Image pull policy image.tag string <code>\"\"</code> Overrides the image tag whose default is the chart appVersion imagePullSecrets list <code>[]</code> Image pull secrets podAnnotations tpl/object <code>{}</code> Extra annotations to add to the pod podLabels object <code>{}</code> Extra labels to add to the pod podSecurityContext object <code>{}</code> Pod Security Context securityContext.capabilities.add list <code>[\"NET_ADMIN\"]</code> Add capabilities to the container initContainers tpl/list <code>[]</code> Pod init containers sidecarContainers tpl/list <code>[]</code> Pod sidecar containers dnsPolicy string <code>\"ClusterFirst\"</code> Set DNS policy for the pod. Valid values are <code>ClusterFirstWithHostNet</code>, <code>ClusterFirst</code>, <code>Default</code> or <code>None</code>. restartPolicy string <code>\"Always\"</code> Restart policy for all containers within the pod. Valid values are <code>Always</code>, <code>OnFailure</code> or <code>Never</code>. hostNetwork string <code>false</code>. Use the host's network namespace. resources object <code>{}</code> Resources requests and limits command list <code>[]</code> Overwrite pod command args list <code>[]</code> Additional pod arguments env tpl/list <code>[]</code> Additional environment variables envFrom tpl/list <code>[]</code> Additional environment variables from a secret or configMap livenessProbe object <code>{}</code> Liveness probe configuration readinessProbe object <code>{}</code> Readiness probe configuration startupProbe object <code>{}</code> Startup probe configuration volumes tpl/list <code>[]</code> Additional volumes volumeMounts tpl/list <code>[]</code> Additional volumeMounts nodeSelector object <code>{\"kubernetes.io/os\":\"linux\"}</code> Node Selector configuration tolerations list <code>[]</code> Tolerations configuration affinity object <code>{}</code> Affinity configuration service.mixed.enabled bool <code>false</code> Whether to create a single service for the web and wireguard interfaces service.mixed.type string <code>\"LoadBalancer\"</code> Service type service.web.annotations object <code>{}</code> Annotations for the web service service.web.type string <code>\"ClusterIP\"</code> Web service type service.web.port int <code>8888</code> Web service port Used for the web interface listener service.web.appProtocol string <code>\"http\"</code> Web service appProtocol. Will be auto set to <code>https</code> if certificate is enabled. service.wireguard.annotations object <code>{}</code> Annotations for the WireGuard service service.wireguard.type string <code>\"LoadBalancer\"</code> Wireguard service type service.wireguard.ports list <code>[51820]</code> 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 <code>8787</code> ingress.enabled bool <code>false</code> Specifies whether an ingress resource should be created ingress.className string <code>\"\"</code> Ingress class name ingress.annotations object <code>{}</code> Ingress annotations ingress.tls bool <code>false</code> Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret certificate.enabled bool <code>false</code> Specifies whether a certificate resource should be created. If enabled, certificate will be used for the web. certificate.issuer.name string <code>\"\"</code> Certificate issuer name certificate.issuer.kind string <code>\"\"</code> Certificate issuer kind (ClusterIssuer or Issuer) certificate.issuer.group string <code>\"cert-manager.io\"</code> Certificate issuer group certificate.duration string <code>\"\"</code> Optional. Documentation certificate.renewBefore string <code>\"\"</code> Optional. Documentation certificate.commonName string <code>\"\"</code> Optional. Documentation certificate.emailAddresses list <code>[]</code> Optional. Documentation certificate.ipAddresses list <code>[]</code> Optional. Documentation certificate.keystores object <code>{}</code> Optional. Documentation certificate.privateKey object <code>{}</code> Optional. Documentation certificate.secretTemplate object <code>{}</code> Optional. Documentation certificate.subject object <code>{}</code> Optional. Documentation certificate.uris list <code>[]</code> Optional. Documentation certificate.usages list <code>[]</code> Optional. Documentation persistence.enabled bool <code>false</code> Specifies whether an persistent volume should be created persistence.annotations object <code>{}</code> Persistent Volume Claim annotations persistence.storageClass string <code>\"\"</code> Persistent Volume storage class. If undefined (the default) cluster's default provisioner will be used. persistence.accessMode string <code>\"ReadWriteOnce\"</code> Persistent Volume Access Mode persistence.size string <code>\"1Gi\"</code> Persistent Volume size serviceAccount.create bool <code>true</code> Specifies whether a service account should be created serviceAccount.annotations object <code>{}</code> Service account annotations serviceAccount.automount bool <code>false</code> Automatically mount a ServiceAccount's API credentials serviceAccount.name string <code>\"\"</code> The name of the service account to use. If not set and create is true, a name is generated using the fullname template monitoring.enabled bool <code>false</code> Enable Prometheus monitoring. monitoring.apiVersion string <code>\"monitoring.coreos.com/v1\"</code> API version of the Prometheus resource. Use <code>azmonitoring.coreos.com/v1</code> for Azure Managed Prometheus. monitoring.kind string <code>\"PodMonitor\"</code> Kind of the Prometheus resource. Could be <code>PodMonitor</code> or <code>ServiceMonitor</code>. monitoring.labels object <code>{}</code> Resource labels. monitoring.annotations object <code>{}</code> Resource annotations. monitoring.interval string <code>1m</code> Interval at which metrics should be scraped. If not specified <code>config.statistics.data_collection_interval</code> interval is used. monitoring.metricRelabelings list <code>[]</code> Relabelings to samples before ingestion. monitoring.relabelings list <code>[]</code> Relabelings to samples before scraping. monitoring.scrapeTimeout string <code>\"\"</code> Timeout after which the scrape is ended If not specified, the Prometheus global scrape interval is used. monitoring.jobLabel string <code>\"\"</code> The label to use to retrieve the job name from. monitoring.podTargetLabels object <code>{}</code> Transfers labels on the Kubernetes Pod onto the target. monitoring.dashboard.enabled bool <code>false</code> Enable Grafana dashboard. monitoring.dashboard.annotations object <code>{}</code> Annotations for the dashboard ConfigMap. monitoring.dashboard.labels object <code>{}</code> Additional labels for the dashboard ConfigMap. monitoring.dashboard.namespace string <code>\"\"</code> Dashboard ConfigMap namespace Overrides the namespace for the dashboard ConfigMap."},{"location":"documentation/getting-started/sources/","title":"Sources","text":"<p>To build the application from source files, use the Makefile provided in the repository.</p>"},{"location":"documentation/getting-started/sources/#requirements","title":"Requirements","text":"<ul> <li>Git</li> <li>Make</li> <li>Go: <code>&gt;=1.23.0</code></li> <li>NodeJS with npm: <code>node&gt;=18, npm&gt;=9</code></li> </ul>"},{"location":"documentation/getting-started/sources/#build","title":"Build","text":"<pre><code># Get source code\ngit clone https://github.com/h44z/wg-portal -b ${WG_PORTAL_VERSION:-master} --depth 1\ncd wg-portal\n# Build the frontend\nmake frontend\n# Build the backend\nmake build\n</code></pre>"},{"location":"documentation/getting-started/sources/#install","title":"Install","text":"<p>Compiled binary will be available in <code>./dist</code> directory.</p>"},{"location":"documentation/monitoring/prometheus/","title":"Monitoring","text":"<p>By default WG-Portal exposes Prometheus metrics on port <code>8787</code> if interface/peer statistic data collection is enabled.</p>"},{"location":"documentation/monitoring/prometheus/#exposed-metrics","title":"Exposed Metrics","text":"Metric Type Description <code>wireguard_interface_received_bytes_total</code> gauge Bytes received through the interface. <code>wireguard_interface_sent_bytes_total</code> gauge Bytes sent through the interface. <code>wireguard_peer_last_handshake_seconds</code> gauge Seconds from the last handshake with the peer. <code>wireguard_peer_received_bytes_total</code> gauge Bytes received from the peer. <code>wireguard_peer_sent_bytes_total</code> gauge Bytes sent to the peer. <code>wireguard_peer_up</code> gauge Peer connection state (boolean: 1/0)."},{"location":"documentation/monitoring/prometheus/#prometheus-config","title":"Prometheus Config","text":"<p>Add following scrape job to your Prometheus config file:</p> <pre><code># prometheus.yaml\nscrape_configs:\n - job_name: wg-portal\n scrape_interval: 60s\n static_configs:\n - targets:\n - localhost:8787 # Change localhost to IP Address or hostname with WG-Portal\n</code></pre>"},{"location":"documentation/monitoring/prometheus/#grafana-dashboard","title":"Grafana Dashboard","text":"<p>You may import <code>dashboard.json</code> into your Grafana instance.</p> <p></p>"},{"location":"documentation/rest-api/api-doc/","title":"REST API","text":""},{"location":"documentation/upgrade/v1/","title":"Upgrade","text":"<p>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.</p>"},{"location":"documentation/upgrade/v1/#upgrade-from-v1-to-v2","title":"Upgrade from v1 to v2","text":"<p> Before upgrading from V1, make sure that you have a backup of your currently working configuration files and database!</p> <p>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.</p> <p>To upgrade from a previous SQLite database, start wg-portal like:</p> <pre><code>./wg-portal-amd64 -migrateFrom=old_wg_portal.db\n</code></pre> <p>You can also specify the database type using the parameter -migrateFromType, supported types: mysql, mssql, postgres or sqlite. For example:</p> <pre><code>./wg-portal-amd64 -migrateFromType=mysql -migrateFrom='user:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4&amp;parseTime=True&amp;loc=Local'\n</code></pre> <p>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!</p> <p>If you are using Docker, you can adapt the docker-compose.yml file to start the upgrade process:</p> <pre><code>services:\n wg-portal:\n image: wgportal/wg-portal:latest\n # ... other settings\n restart: no\n command: [\"-migrateFrom=/app/data/wg_portal.db\"]\n</code></pre>"}]}