[GH-ISSUE #5254] [Question]: add user on wireguard #3681

Closed
opened 2026-10-31 20:34:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @usamirali on GitHub (Jun 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5254

What are you trying to do?

hi i want to know
can we add client on wireguard inbound ??

What have you already tried?

No response

3x-ui version

3.3.1

How did you install 3x-ui?

install.sh script

Operating system

ubuntu 26

Screenshots or config snippets

No response

Before submitting

  • I read the Wiki and searched existing issues.
  • This is a usage question, not a bug report.
  • This question is written in English.
Originally created by @usamirali on GitHub (Jun 13, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5254 ### What are you trying to do? hi i want to know can we add client on wireguard inbound ?? ### What have you already tried? _No response_ ### 3x-ui version 3.3.1 ### How did you install 3x-ui? install.sh script ### Operating system ubuntu 26 ### Screenshots or config snippets _No response_ ### Before submitting - [x] I read the [Wiki](https://github.com/MHSanaei/3x-ui/wiki) and searched [existing issues](../issues?q=is%3Aissue). - [x] This is a usage question, not a bug report. - [x] This question is written in English.
bsakaguchi 2026-10-31 20:34:11 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 13, 2026):

WireGuard peers can be added, but the mechanism is different from the "Clients" tab used by VLESS/VMess/Trojan/etc.

How peers are managed today

WireGuard inbounds store peers in a settings.peers[] array, not settings.clients[]. As a result, the standard Clients page does not list or manage WireGuard peers. Instead, peers are configured directly inside the inbound:

  1. Open the Inbounds page and click the edit (pencil) icon on your WireGuard inbound.
  2. In the settings form, scroll to the Peers section.
  3. Click Add Peer — this generates a new keypair and assigns the next sequential allowedIPs (e.g. 10.0.0.2/32, 10.0.0.3/32, …) automatically.
  4. Each peer exposes fields for: private key, public key, pre-shared key (PSK), allowedIPs, keepAlive, and an optional comment.
  5. Save the inbound. Because the Xray gRPC API has no live peer-add operation for WireGuard, saving always triggers an Xray restart to apply the change.

This behavior is confirmed in frontend/src/pages/inbounds/form/protocols/wireguard.tsx (the Form.List over settings.peers) and internal/web/service/inbound.go (which reads settings["clients"] — leaving WireGuard peers outside the standard client pipeline).

What is not supported

  • Per-peer traffic accounting, expiry dates, and enable/disable toggles are not available for WireGuard. These features are tracked under a separate open request (#5002).
  • The Telegram bot also excludes WireGuard from client-management commands (internal/web/service/tgbot/tgbot_inbound.go, excludedProtocols).

Client config to use on the peer side

After saving, use the inbound's public key as Endpoint's peer public key in the client WireGuard config, and set the peer's AllowedIPs to match what was configured. The private key shown in the peer form is the client's private key.

This reply was generated automatically; a maintainer may follow up with additional information.

<!-- gh-comment-id:4697400310 --> @github-actions[bot] commented on GitHub (Jun 13, 2026): WireGuard peers can be added, but the mechanism is different from the \"Clients\" tab used by VLESS/VMess/Trojan/etc. **How peers are managed today** WireGuard inbounds store peers in a `settings.peers[]` array, not `settings.clients[]`. As a result, the standard Clients page does not list or manage WireGuard peers. Instead, peers are configured directly inside the inbound: 1. Open the Inbounds page and click the edit (pencil) icon on your WireGuard inbound. 2. In the settings form, scroll to the **Peers** section. 3. Click **Add Peer** — this generates a new keypair and assigns the next sequential `allowedIPs` (e.g. `10.0.0.2/32`, `10.0.0.3/32`, …) automatically. 4. Each peer exposes fields for: private key, public key, pre-shared key (PSK), `allowedIPs`, `keepAlive`, and an optional comment. 5. Save the inbound. Because the Xray gRPC API has no live peer-add operation for WireGuard, saving always triggers an Xray restart to apply the change. This behavior is confirmed in `frontend/src/pages/inbounds/form/protocols/wireguard.tsx` (the `Form.List` over `settings.peers`) and `internal/web/service/inbound.go` (which reads `settings["clients"]` — leaving WireGuard peers outside the standard client pipeline). **What is not supported** - Per-peer traffic accounting, expiry dates, and enable/disable toggles are not available for WireGuard. These features are tracked under a separate open request (#5002). - The Telegram bot also excludes WireGuard from client-management commands (`internal/web/service/tgbot/tgbot_inbound.go`, `excludedProtocols`). **Client config to use on the peer side** After saving, use the inbound's public key as `Endpoint`'s peer public key in the client WireGuard config, and set the peer's `AllowedIPs` to match what was configured. The private key shown in the peer form is the client's private key. *This reply was generated automatically; a maintainer may follow up with additional information.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3681
No description provided.