# Add WireGuard Configuration Peers

To add a peer, click the "+ Peer" button in your configuration.

![](/files/376da5bab573c270314fce6a97ad48edfd6a3eb0)

Once you click the button, a form similar to adding a configuration appears. Fill in the following fields:

* **Name**
  * This is not required. You can leave it empty or provide any name you like.
* **Private Key & Public Key**
  * Required. Both Private and Public Key will be auto-generated.
  * If you want to use your own key pair, toggle the switch "Use your own Private and Public Key".
* **Allowed IPs**
  * The IP addresses assigned to this peer. An address will be auto-generated with the first available IP.
  * You can add more IP addresses by clicking the "Pick Available IP" button, or type custom IP addresses directly into the input.
* **Endpoint Allowed IPs**
  * The IP address range whose traffic you want to forward. For example, to forward only the subnet traffic, set this to match the configuration's Allowed IPs.
  * To forward all traffic through WireGuard, set it to:

    ```
    0.0.0.0/0, ::/0
    ```
* **DNS**
  * The DNS servers this peer will use.
* **Pre-Shared Key**
  * Toggle this for an extra layer of security. WireGuard can use an additional symmetric pre-shared key between the server and peer.
  * More information: [WireGuard: Next Generation Kernel Network Tunnel, 5.2 - Optional Pre-shared Symmetric Key Mode](https://www.wireguard.com/papers/wireguard.pdf)
* **MTU**
  * The MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sensible choice.
* **Persistent Keepalive**
  * If a peer is behind NAT and connects to a public peer, the NAT-ed node must regularly send outgoing pings to keep the connection alive in the NAT router's connection table.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qubitvpn.gitbook.io/qubitvpn-docs/how-to-use/how-to-use-the-premium-plan/add-wireguard-configuration-peers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
