Files
wg-portal/master/documentation/configuration/overview/index.html

94 lines
118 KiB
HTML
Raw Normal View History

<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><link href=https://wgportal.org/master/documentation/configuration/overview/ rel=canonical><link href=../../getting-started/reverse-proxy/ rel=prev><link href=../examples/ rel=next><link rel=icon href=../../../assets/images/favicon-large.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.7.0"><title>Overview - WireGuard Portal</title><link rel=stylesheet href=../../../assets/stylesheets/main.618322db.min.css><link rel=stylesheet href=../../../assets/stylesheets/palette.ab4e12ef.min.css><link rel=stylesheet href=../../../stylesheets/extra.css><link rel=stylesheet href=../../../stylesheets/img-comparison-slider.css><script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script><meta property=og:type content=website><meta property=og:title content="Overview - WireGuard Portal"><meta property=og:description content="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><meta property=og:image content=https://wgportal.org/master/assets/images/social/documentation/configuration/overview.png><meta property=og:image:type content=image/png><meta property=og:image:width content=1200><meta property=og:image:height content=630><meta content=https://wgportal.org/master/documentation/configuration/overview/ property=og:url><meta property=twitter:card content=summary_large_image><meta property=twitter:title content="Overview - WireGuard Portal"><meta property=twitter:description content="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><meta property=twitter:image content=https://wgportal.org/master/assets/images/social/documentation/configuration/overview.png></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=white data-md-color-accent=indigo> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#core class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <div data-md-color-scheme=default data-md-component=outdated hidden> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../../.. title="WireGuard Portal" class="md-header__button md-logo" aria-label="WireGuard Portal" data-md-component=logo> <img src=../../../assets/images/logo.svg alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> WireGuard Portal </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Overview </span> </div> </div> </div> <label class="md-header__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> </label> <div class=md-search data-md-component=search role=dialog> <label class=md-search__overlay for=__search></label> <div class=md-search__inner role=search> <form class=md-search__form name=search> <input type=text class=md-search__input name=query aria-label=Search placeholder=Search autocapitalize=off autocorrect=off
<span class=w> </span><span class=nt>admin_user</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">admin@wgportal.local</span>
<span class=w> </span><span class=nt>admin_password</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">wgportal-default</span>
<span class=w> </span><span class=nt>admin_api_token</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>disable_admin_user</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>editable_keys</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>create_default_peer</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>create_default_peer_on_creation</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>re_enable_peer_after_user_enable</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>delete_peer_after_user_deleted</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>self_provisioning_allowed</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>import_existing</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>restore_state</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=nt>backend</span><span class=p>:</span>
<span class=w> </span><span class=nt>default</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">local</span>
<span class=w> </span><span class=nt>local_resolvconf_prefix</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">tun.</span>
<span class=nt>advanced</span><span class=p>:</span>
<span class=w> </span><span class=nt>log_level</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">info</span>
<span class=w> </span><span class=nt>log_pretty</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>log_json</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>start_listen_port</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">51820</span>
<span class=w> </span><span class=nt>start_cidr_v4</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">10.11.12.0/24</span>
<span class=w> </span><span class=nt>start_cidr_v6</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">fdfd:d3ad:c0de:1234::0/64</span>
<span class=w> </span><span class=nt>use_ip_v6</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>config_storage_path</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>expiry_check_interval</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">15m</span>
<span class=w> </span><span class=nt>rule_prio_offset</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">20000</span>
<span class=w> </span><span class=nt>route_table_offset</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">20000</span>
<span class=w> </span><span class=nt>api_admin_only</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>limit_additional_user_peers</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">0</span>
<span class=nt>database</span><span class=p>:</span>
<span class=w> </span><span class=nt>debug</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>slow_query_threshold</span><span class=p>:</span><span class=w> </span><span class=s>&quot;0&quot;</span>
<span class=w> </span><span class=nt>type</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">sqlite</span>
<span class=w> </span><span class=nt>dsn</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">data/sqlite.db</span>
<span class=w> </span><span class=nt>encryption_passphrase</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=nt>statistics</span><span class=p>:</span>
<span class=w> </span><span class=nt>use_ping_checks</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>ping_check_workers</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">10</span>
<span class=w> </span><span class=nt>ping_unprivileged</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>ping_check_interval</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">1m</span>
<span class=w> </span><span class=nt>data_collection_interval</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">1m</span>
<span class=w> </span><span class=nt>collect_interface_data</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>collect_peer_data</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>collect_audit_data</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>listening_address</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">:8787</span>
<span class=nt>mail</span><span class=p>:</span>
<span class=w> </span><span class=nt>host</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">127.0.0.1</span>
<span class=w> </span><span class=nt>port</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">25</span>
<span class=w> </span><span class=nt>encryption</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">none</span>
<span class=w> </span><span class=nt>cert_validation</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>username</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>password</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>auth_type</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">plain</span>
<span class=w> </span><span class=nt>from</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">Wireguard Portal &lt;noreply@wireguard.local&gt;</span>
<span class=w> </span><span class=nt>link_only</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>allow_peer_email</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=nt>auth</span><span class=p>:</span>
<span class=w> </span><span class=nt>oidc</span><span class=p>:</span><span class=w> </span><span class="p p-Indicator">[]</span>
<span class=w> </span><span class=nt>oauth</span><span class=p>:</span><span class=w> </span><span class="p p-Indicator">[]</span>
<span class=w> </span><span class=nt>ldap</span><span class=p>:</span><span class=w> </span><span class="p p-Indicator">[]</span>
<span class=w> </span><span class=nt>webauthn</span><span class=p>:</span>
<span class=w> </span><span class=nt>enabled</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
<span class=w> </span><span class=nt>min_password_length</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">16</span>
<span class=w> </span><span class=nt>hide_login_form</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=nt>web</span><span class=p>:</span>
<span class=w> </span><span class=nt>listening_address</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">:8888</span>
<span class=w> </span><span class=nt>external_url</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:8888</span>
<span class=w> </span><span class=nt>site_company_name</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">WireGuard Portal</span>
<span class=w> </span><span class=nt>site_title</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">WireGuard Portal</span>
<span class=w> </span><span class=nt>session_identifier</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">wgPortalSession</span>
<span class=w> </span><span class=nt>session_secret</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">very_secret</span>
<span class=w> </span><span class=nt>csrf_secret</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">extremely_secret</span>
<span class=w> </span><span class=nt>request_logging</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>expose_host_info</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">false</span>
<span class=w> </span><span class=nt>cert_file</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>key_File</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=nt>webhook</span><span class=p>:</span>
<span class=w> </span><span class=nt>url</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>authentication</span><span class=p>:</span><span class=w> </span><span class=s>&quot;&quot;</span>
<span class=w> </span><span class=nt>timeout</span><span class=p>:</span><span class=w> </span><span class="l l-Scalar l-Scalar-Plain">10s</span>
</code></pre></div> </details> <p>Below you will find sections like <a href=#core><code>core</code></a>, <a href=#backend><code>backend</code></a>, <a href=#advanced><code>advanced</code></a>, <a href=#database><code>database</code></a>, <a href=#statistics><code>statistics</code></a>, <a href=#mail><code>mail</code></a>, <a href=#auth><code>auth</code></a>, <a href=#web><code>web</code></a> and <a href=#webhook><code>webhook</code></a>.<br> Each section describes the individual configuration keys, their default values, and a brief explanation of their purpose.</p> <hr> <h2 id=core>Core</h2> <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> <h3 id=admin_user><code>admin_user</code></h3> <ul> <li><strong>Default:</strong> <code>admin@wgportal.local</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_ADMIN_USER</code></li> <li><strong>Description:</strong> The administrator user. This user will be created as a default admin if it does not yet exist.</li> </ul> <h3 id=admin_password><code>admin_password</code></h3> <ul> <li><strong>Default:</strong> <code>wgportal-default</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_ADMIN_PASSWORD</code></li> <li><strong>Description:</strong> The administrator password. The default password should be changed immediately!</li> <li><strong>Important:</strong> The password should be strong and secure. The minimum password length is specified in <a href=#min_password_length>auth.min_password_length</a>. By default, it is 16 characters.</li> </ul> <h3 id=disable_admin_user><code>disable_admin_user</code></h3> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_DISABLE_ADMIN_USER</code></li> <li><strong>Description:</strong> If <code>true</code>, no admin user is created. This is useful if you plan to manage users exclusively through external authentication providers such as LDAP or OAuth.</li> </ul> <h3 id=admin_api_token><code>admin_api_token</code></h3> <ul> <li><strong>Default:</strong> <em>(empty)</em></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_ADMIN_API_TOKEN</code></li> <li><strong>Description:</strong> 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> <h3 id=editable_keys><code>editable_keys</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_EDITABLE_KEYS</code></li> <li><strong>Description:</strong> Allow editing of WireGuard key-pairs directly in the UI.</li> </ul> <h3 id=create_default_peer><code>create_default_peer</code></h3> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_CREATE_DEFAULT_PEER</code></li> <li><strong>Description:</strong> If a user logs in for the first time with no existing peers, automatically create a new WireGuard peer for <strong>all</strong> server interfaces.</li> </ul> <h3 id=create_default_peer_on_creation><code>create_default_peer_on_creation</code></h3> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_CREATE_DEFAULT_PEER_ON_CREATION</code></li> <li><strong>Description:</strong> If an LDAP user is created (e.g., through LDAP sync) and has no peers, automatically create a new WireGuard peer for <strong>all</strong> server interfaces.</li> </ul> <h3 id=re_enable_peer_after_user_enable><code>re_enable_peer_after_user_enable</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_CORE_RE_ENABLE_PEER_AFTER_USER_ENABLE</code></li> <li><strong>Description:</strong> Re-enable all peers that were previously disabled if the associated user is re-enabled.</li> </ul>
</code></pre></div></li> </ul> <h3 id=encryption_passphrase><code>encryption_passphrase</code></h3> <ul> <li><strong>Default:</strong> <em>(empty)</em></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_DATABASE_ENCRYPTION_PASSPHRASE</code></li> <li><strong>Description:</strong> Passphrase for encrypting sensitive values such as private keys in the database. Encryption is only applied if this passphrase is set. <strong>Important:</strong> 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 its next modified.</li> </ul> <hr> <h2 id=statistics>Statistics</h2> <p>Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.</p> <h3 id=use_ping_checks><code>use_ping_checks</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_USE_PING_CHECKS</code></li> <li><strong>Description:</strong> Enable periodic ping checks to verify that peers remain responsive.</li> </ul> <h3 id=ping_check_workers><code>ping_check_workers</code></h3> <ul> <li><strong>Default:</strong> <code>10</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_PING_CHECK_WORKERS</code></li> <li><strong>Description:</strong> Number of parallel worker processes for ping checks.</li> </ul> <h3 id=ping_unprivileged><code>ping_unprivileged</code></h3> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_PING_UNPRIVILEGED</code></li> <li><strong>Description:</strong> If <code>false</code>, ping checks run without root privileges. This is currently considered BETA.</li> </ul> <h3 id=ping_check_interval><code>ping_check_interval</code></h3> <ul> <li><strong>Default:</strong> <code>1m</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_PING_CHECK_INTERVAL</code></li> <li><strong>Description:</strong> 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 <a href=https://golang.org/pkg/time/#ParseDuration>time.ParseDuration</a>.</li> </ul> <h3 id=data_collection_interval><code>data_collection_interval</code></h3> <ul> <li><strong>Default:</strong> <code>1m</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_DATA_COLLECTION_INTERVAL</code></li> <li><strong>Description:</strong> 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 <a href=https://golang.org/pkg/time/#ParseDuration>time.ParseDuration</a>.</li> </ul> <h3 id=collect_interface_data><code>collect_interface_data</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_COLLECT_INTERFACE_DATA</code></li> <li><strong>Description:</strong> If <code>true</code>, collects interface-level data (bytes in/out) for monitoring and statistics.</li> </ul> <h3 id=collect_peer_data><code>collect_peer_data</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_COLLECT_PEER_DATA</code></li> <li><strong>Description:</strong> If <code>true</code>, collects peer-level data (bytes, last handshake, endpoint, etc.).</li> </ul> <h3 id=collect_audit_data><code>collect_audit_data</code></h3> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_STATISTICS_COLLECT_AUDIT_DATA</code></li> <li><strong>Description:</strong> If <code>true</code>, logs certain portal events (such as user logins) to the database.</li> </ul> <h3 id=listening_address><code>listening_address</code></h3> <ul> <li><strong>Default:</strong> <c
</code></pre></div></li> <li><strong>Important</strong>: The <code>login_filter</code> 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.</li> </ul> <h4 id=admin_group><code>admin_group</code></h4> <ul> <li><strong>Default:</strong> <em>(empty)</em></li> <li><strong>Description:</strong> A specific LDAP group whose members are considered administrators in WireGuard Portal. For example: <div class=highlight><pre><span></span><code>CN=WireGuardAdmins,OU=Some-OU,DC=YOURDOMAIN,DC=LOCAL
</code></pre></div></li> </ul> <h4 id=sync_interval><code>sync_interval</code></h4> <ul> <li><strong>Default:</strong> <em>(empty)</em></li> <li><strong>Description:</strong> 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 <a href=https://golang.org/pkg/time/#ParseDuration>time.ParseDuration</a>. 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> <h4 id=sync_filter><code>sync_filter</code></h4> <ul> <li><strong>Default:</strong> <em>(empty)</em></li> <li><strong>Description:</strong> An LDAP filter to select which users get synchronized into WireGuard Portal. For example: <div class=highlight><pre><span></span><code>(&amp;(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))
</code></pre></div></li> </ul> <h4 id=sync_log_user_info><code>sync_log_user_info</code></h4> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Description:</strong> If <code>true</code>, logs LDAP user data at the trace level during synchronization.</li> </ul> <h4 id=disable_missing><code>disable_missing</code></h4> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Description:</strong> If <code>true</code>, any user <strong>not</strong> found in LDAP (during sync) is disabled in WireGuard Portal.</li> </ul> <h4 id=auto_re_enable><code>auto_re_enable</code></h4> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Description:</strong> 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> <h4 id=registration_enabled_2><code>registration_enabled</code></h4> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Description:</strong> If <code>true</code>, new user accounts are created in WireGuard Portal upon first login.</li> </ul> <h4 id=log_user_info_2><code>log_user_info</code></h4> <ul> <li><strong>Default:</strong> <code>false</code></li> <li><strong>Description:</strong> If <code>true</code>, logs LDAP user data at the trace level upon login.</li> </ul> <hr> <h3 id=webauthn-passkeys>WebAuthn (Passkeys)</h3> <p>The <code>webauthn</code> section contains configuration options for WebAuthn authentication (passkeys).</p> <h4 id=enabled><code>enabled</code></h4> <ul> <li><strong>Default:</strong> <code>true</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_AUTH_WEBAUTHN_ENABLED</code></li> <li><strong>Description:</strong> If <code>true</code>, Passkey authentication is enabled. If <code>false</code>, 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.</li> </ul> <h2 id=web>Web</h2> <p>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 <code>external_url</code> for the web server, especially if you are using a reverse proxy. Without a valid <code>external_url</code>, the login process may fail due to CSRF protection.</p> <h3 id=listening_address_1><code>listening_address</code></h3> <ul> <li><strong>Default:</strong> <code>:8888</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_WEB_LISTENING_ADDRESS</code></li> <li><strong>Description:</strong> The listening address and port for the web server (e.g., <code>:8888</code> to bind on all interfaces or <code>127.0.0.1:8888</code> to bind only on the loopback interface). Ensure that access to WireGuard Portal is protected against unauthorized access, especially if binding to all interfaces.</li> </ul> <h3 id=external_url><code>external_url</code></h3> <ul> <li><strong>Default:</strong> <code>http://localhost:8888</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_WEB_EXTERNAL_URL</code></li> <li><strong>Description:</strong> The URL where a client can access WireGuard Portal. This URL is used for generating links in emails and for performing OAUTH redirects.<br> <strong>Important:</strong> 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.</li> </ul> <h3 id=site_company_name><code>site_company_name</code></h3> <ul> <li><strong>Default:</strong> <code>WireGuard Portal</code></li> <li><strong>Environment Variable:</strong> <code>WG_PORTAL_WEB_SITE_COMPANY_NAME</code></li> <li><strong>Description:</strong> The company name that is shown at the bottom of the web frontend.</li> </ul> <h3 id=site_title><code>site_title</code></h3> <ul> <li><strong>Default:</strong> <code>WireGuard Portal</cod