<p>You can use the API to interact with the application programmatically. The API is available at <code>/api</code> and supports both GET and POST requests. The API is designed to be simple and easy to use, with a focus on providing a consistent interface for all endpoints.</p>
<p>There is no documentation for the API yet, but this will be added as the underlying library supports it.</p>
<p>To use the API, you need to authenticate using Basic Authentication. The username and password are the same as the ones you use to log in to the web application.
If you use 2FA, the API will not work. You need to disable 2FA in the web application to use the API.</p>
<p>The Endpoints are not yet documented. But as file-based routing is used, you can find the endpoints in the <code>src/server/api</code> folder. The method is defined in the file name.</p>
<p>The initial username and password is not checked for complexity. Make sure to set a long enough username and a secure password. Otherwise, the user won't be able to log in.</p>
<p>Its recommended to remove the variables after the setup is done to prevent the password from being exposed.</p>
<p>The initial username and password is not checked for complexity. Make sure to set a long enough username and password. Otherwise, the user won't be able to log in.</p>
<p>It's recommended to remove the variables after the setup is done to prevent the password from being exposed.</p>
<!-- TOOD: add to docs: Grafana dashboard [21733](https://grafana.com/grafana/dashboards/21733-wireguard/) -->
<p>To monitor the WireGuard server, you can use <ahref="https://prometheus.io/">Prometheus</a> and <ahref="https://grafana.com/">Grafana</a>. The container exposes a <code>/metrics/prometheus</code> endpoint that can be scraped by Prometheus.</p>
<p>The Grafana dashboard is not official and is not maintained by the <code>wg-easy</code> team. If you have any issues with the dashboard, please contact the author of the dashboard.
See <ahref="https://github.com/wg-easy/wg-easy/pull/1299">#1299</a> for more information.</p>
<p>By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution.</p>
<p>Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and <strong>comply with the rules</strong>.</p>
<h3id="filing-a-bug-report"><aclass="toclink"href="#filing-a-bug-report">Filing a Bug Report</a></h3>
<p>Thank you for participating in this project and reporting a bug. wg-easy is a community-driven project, and each contribution counts!</p>
<p>Maintainers and moderators are volunteers. We greatly appreciate reports that take the time to provide detailed information via the template, enabling us to help you in the best and quickest way. Ignoring the template provided may seem easier, but discourages receiving any support (<em>via assignment of the label <code>meta/no template - no support</code></em>).</p>
<p>Thank you for participating in this project and reporting a bug. <code>wg-easy</code> is a community-driven project, and each contribution counts!</p>
<p>Maintainers and moderators are volunteers. We greatly appreciate reports that take the time to provide detailed information via the template, enabling us to help you in the best and quickest way. Ignoring the template provided may seem easier, but discourages receiving any support.</p>
<p>Markdown formatting can be used in almost all text fields (<em>unless stated otherwise in the description</em>).</p>
<p>Be as precise as possible, and if in doubt, it's best to add more information that too few.</p>
<p>When an option is marked with "not officially supported" / "unsupported", then support is dependent on availability from specific maintainers.</p>
<p>If you want the updates to be fully automatic you can install Watchtower. This will check for updates every day at 4:00 AM and update the container if a new version is available.</p>
<p>You can no access the Traefik dashboard at <code>https://traefik.$example.com$</code> with the credentials you set in <code>traefik_dynamic.yml</code>.</p>
<h2id="add-labels-to-wg-easy"><aclass="toclink"href="#add-labels-to-wg-easy">Add Labels to <code>wg-easy</code></a></h2>
<p>To add labels to your <code>wg-easy</code> service, you can add the following to your <code>docker-compose.yml</code> file:</p>
<p>This page explains how to get started with wg-easy. The guide uses Docker Compose as a reference. In our examples, we mount the named volume <code>etc_wireguard</code> to <code>/etc/wireguard</code> inside the container.</p>
<p>This page explains how to get started with <code>wg-easy</code>. The guide uses Docker Compose as a reference. In our examples, we mount the named volume <code>etc_wireguard</code> to <code>/etc/wireguard</code> inside the container.</p>
<p>Before you can get started with deploying your own VPN, there are some requirements to be met:</p>
<ol>
@ -1446,7 +1675,7 @@
<divclass="admonition note">
<pclass="admonition-title">About the Container Runtime</p>
<p>On the host, you need to have a suitable container runtime (like <em>Docker</em> or <em>Podman</em>) installed. We assume <ahref="https://docs.docker.com/compose/"><em>Docker Compose</em></a> is <ahref="https://docs.docker.com/compose/install/">installed</a>. We have aligned file names and configuration conventions with the latest <ahref="https://docs.docker.com/compose/compose-file/">Docker Compose specification</a>.
If you're using podman, make sure to read the related <ahref="../examples/tutorials/podman/">documentation</a>.</p>
If you're using podman, make sure to read the related <ahref="../examples/tutorials/podman-nft/">documentation</a>.</p>
</div>
<h2id="deploying-the-actual-image"><aclass="toclink"href="#deploying-the-actual-image">Deploying the Actual Image</a></h2>
<td>used for development, testing code from PRs before landing into <ahref="https://github.com/wg-easy/wg-easy/tree/master"><code>master</code></a>.</td>
</tr>
</tbody>
</table>
@ -1489,7 +1748,7 @@ If you're using podman, make sure to read the related <a href="../examples/tutor
<pclass="admonition-title">Using the Correct Commands For Stopping and Starting wg-easy</p>
<pclass="admonition-title">Using the Correct Commands For Stopping and Starting <code>wg-easy</code></p>
<p><strong>Use <code>sudo docker compose up / down</code>, not <code>sudo docker compose start / stop</code></strong>. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state.</p>
</div>
<p><strong>That's it! It really is that easy</strong>.</p>
<ahref="https://github.com/wg-easy/wg-easy/edit/master/docs/content/examples/tutorials/nginx.md"title="Edit this page"class="md-content__button md-icon">
<ahref="https://github.com/wg-easy/wg-easy/edit/master/docs/content/guides/setup.md"title="Edit this page"class="md-content__button md-icon">
<ahref="https://github.com/wg-easy/wg-easy/raw/master/docs/content/examples/tutorials/nginx.md"title="View source of this page"class="md-content__button md-icon">
<ahref="https://github.com/wg-easy/wg-easy/raw/master/docs/content/guides/setup.md"title="View source of this page"class="md-content__button md-icon">
<scriptid="__config"type="application/json">{"base":"../../..","features":["navigation.tabs","navigation.top","navigation.expand","navigation.instant","content.action.edit","content.action.view","content.code.annotate"],"search":"../../../assets/javascripts/workers/search.f8cc74c7.min.js","tags":null,"translations":{"clipboard.copied":"Copied to clipboard","clipboard.copy":"Copy to clipboard","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.placeholder":"Type to start searching","search.result.term.missing":"Missing","select.version":"Select version"},"version":{"provider":"mike"}}</script>
<scriptid="__config"type="application/json">{"base":"../..","features":["navigation.tabs","navigation.top","navigation.expand","navigation.instant","content.action.edit","content.action.view","content.code.annotate"],"search":"../../assets/javascripts/workers/search.f8cc74c7.min.js","tags":null,"translations":{"clipboard.copied":"Copied to clipboard","clipboard.copy":"Copy to clipboard","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.placeholder":"Type to start searching","search.result.term.missing":"Missing","select.version":"Select version"},"version":{"provider":"mike"}}</script>
<pclass="admonition-title"> This Documentation is Versioned</p>
<p><strong>Make sure</strong> to select the correct version of this documentation! It should match the version of the image you are using. The default version corresponds to the <code>:latest</code> image tag - <ahref="getting-started/#tagging-convention">the most recent stable release</a>.</p>
</div>
<p>This documentation provides you not only with the basic setup and configuration of wg-easy but also with advanced configuration, elaborate usage scenarios, detailed examples, hints and more.</p>
<p>This documentation provides you not only with the basic setup and configuration of <code>wg-easy</code> but also with advanced configuration, elaborate usage scenarios, detailed examples, hints and more.</p>