mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5701] [Question]: i cant use wireguard on 3.4.2 #3964
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3964
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @usamirali on GitHub (Jun 30, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5701
What are you trying to do?
i create wireguard inbound and open port on udp and attach on client
but i cant connect to it
i test it on 4 server
i just created and attach to client
im wrong or i forgot somthing to do
What have you already tried?
No response
3x-ui version
3.4.2
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 26
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Jun 30, 2026):
A few separate things must all be in place for a WireGuard inbound to work; please check each one.
1. Confirm Xray started the inbound successfully
Open the panel → Logs tab (or run
journalctl -u x-ui -fon the server) immediately after toggling the inbound on. If Xray failed to start the WireGuard listener you will see an error there. Common causes are a port conflict or, on some VPS providers, the kernel TUN device being unavailable (see point 4).2. Verify the UDP port is actually listening
The port must appear in the output. If it does not, Xray either did not start cleanly or something else is holding the port.
3. Check how the client device was configured
3x-ui generates a
wireguard://share link for each client (confirmed ininternal/sub/service.go). That link encodes the client's private key, the server's public key, the allocated tunnel address, MTU, and optional DNS. The recommended way to configure the connecting device is:wg-quickon Linux).The share link is only generated when the client entry has a private key stored. If you added the client manually and left the key fields blank, the panel will not have a private key on file and the link will be empty. In that case, delete and re-add the client so the panel generates a fresh keypair automatically.
4. Enable "No-kernel TUN" if your VPS restricts TUN devices
3x-ui's WireGuard inbound runs through Xray-core's WireGuard proxy implementation, which by default tries to open a kernel TUN device (confirmed in
frontend/src/schemas/protocols/inbound/wireguard.tsandinternal/web/service/xray.go). Many cloud VPS providers (OpenVZ, some LXC containers, certain KVM images) do not expose/dev/net/tun.To check:
If that file is missing or returns "No such file or directory", open the inbound settings in the panel, enable No-kernel TUN (
noKernelTun: true), save, and restart Xray. Without this the inbound silently fails to bind on affected hosts.5. Firewall
Confirm the firewall (ufw, iptables, or your cloud provider's security group) allows inbound UDP on the WireGuard port.
To narrow down the issue further, please share:
wireguardorfailed to listen).sudo ss -ulnp | grep <port>./dev/net/tunexists on your servers.This reply was generated automatically; a maintainer may follow up.
@dignatenkov commented on GitHub (Jul 1, 2026):
same problem
@beevar-u commented on GitHub (Jul 1, 2026):
I can use wireguard (3x-ui in docker) with mobile client, but can't make mikrotik router working with it..