# Ports in Use: Find and Fix Port Conflicts on Your Box

> For AI tools: this is the Markdown copy of https://xproxy.io/document/ports-in-use. Every XProxy guide has one at its URL + `.md`; the index of all guides is https://xproxy.io/llms.txt.

See who owns every port of your XProxy box, find a port clash, check if a port is free and read the warning the box gives when you save a taken port.

Every proxy, VPN, dashboard and tool on your box needs its own port. The Ports in use tab shows who owns each port, warns you when two want the same one, and checks a port before you use it.

**You need:** XProxy 21.3.49 or later. The tab is in every plan. The conflict warning on save came with 21.3.47 for proxy groups and selling ports. Update with [Update XProxy](https://xproxy.io/document/update-xproxy).

In short

**Find a clash**

A banner on every page and a card for each port that two users want. A program outside XProxy on one of your ports is shown too.

**Check before you pick**

Type a port, and the checker says free or taken, and gives the nearest free port.

**Safe by default**

The box refuses a port that is taken when you save, and tells you which one is free.

## Find and fix a port clash

**Step 1: Open Ports in use**

In the left menu click **General Settings**, then **Forwarding Ports**. Click the tab **Ports in use**.

When the box is healthy, **Conflicts** says **No conflicts: every port of this box has one user**. Click **Re-scan** to look again now.

![General Settings menu with Forwarding Ports, the three tabs Through a VPS, Through your router and Ports in use, the Re-scan button, and Conflicts reading No conflicts (demo)](https://media1.xproxy.io/docs/nov-sync/ports-in-use/1-open-tab.webp)

> The box also checks by itself when it starts and then every 5 minutes. You do not have to open this page to be warned: a banner shows on every page when there is a conflict.

**Step 2: Read a conflict**

A conflict is a port that two users of the box want at the same time. When there is one, a banner shows on top of every page: **Port conflict: 30001/TCP is used by selling port id 228 + proxy group port group #1**. **Fix** takes you to the page of the first owner. **Details** opens this tab.

Here each conflict has its own card:

- The big number is the port, with TCP or UDP under it.
- **Used by** lists the owners. The names are links to the page that manages them. The words after the name tell which one: `id 228`, `group #1`, `slot 1`.
- **Program** appears when another program on the box, outside XProxy, listens on the port. It gives the program name and its process number (pid).
- The hint tells what to do: **Move one of them to a free port**, or **Move it to a free port, or stop the program that uses it**.

![The conflict banner and two conflict cards: port 30001 used by a selling port and a proxy group port, and port 80 used by the dashboard port and the program nginx, with a hint under each (demo data)](https://media1.xproxy.io/docs/nov-sync/ports-in-use/2-conflicts.webp)

> **Why it matters.** When two users listen on one port, both start and the system splits the connections between them. Customers of one then reach the login of the other and get **407** errors. On a real box with a proxy group and a selling port on the same port, 13 of 14 requests were refused.

**Step 3: Check a port before you use it**

Use **Port checker** before you pick a port for a proxy group, a selling port or a service.

1. Type the port, for example `30001`.
2. Choose **TCP**, **UDP** or **TCP and UDP**.
3. Click **Check**.

If the port is taken, the answer names who uses it and gives the nearest free port: **Port 30001 is already used by the proxy group port group #1, choose another port! Port 30004 is free.** Click the free port to check it. A free port says **Port 30004 is free**. A number outside 1 to 65535 says it is not a valid port.

![Port checker with the port 30001, the protocol TCP and the Check button, and the answer: already used by the proxy group port group #1, with the free port 30004](https://media1.xproxy.io/docs/nov-sync/ports-in-use/3-port-checker.webp)

> The checker also sees programs outside XProxy. A port used by another program on the box counts as taken, even if no XProxy feature uses it.

**Step 4: See who owns every port**

**Ports of this box** lists every port the box opens. Type in the filter a name, a key or a port number, for example `30001`. The list keeps the rows that match, and the rows in conflict have an orange mark on the left.

The columns:

- **Used by**: the owner, as a link to its page. **Key**: which one of its kind, for example `id 1` or `group #1`.
- **What it is for**, the **Ports** (one number or a range), and **Protocols**.
- **Router**: **Forward on router** (customers reach it from outside, so open it in your router), **Only if used from outside**, or **Local only**. See [NAT port forwarding](https://xproxy.io/document/how-public-access-xproxy).
- **Listening**: how many of its ports have a program listening now. **Other programs**: a program outside XProxy on one of its ports, in orange.

At the right, **Adb server port** is the port of the Android adb server that the box uses. The box moves it off the usual 5037 to a free port below 1000, so it does not clash with your own tools.

![Ports of this box filtered by 30001: the proxy group port and the selling port, both marked orange, with their key, purpose, port, protocol and router column](https://media1.xproxy.io/docs/nov-sync/ports-in-use/4-owners.webp)

> The owners the box knows: the proxy ports of every modem (HTTP, SOCKS5, IPv6, dual stack, VLESS, Shadowsocks), Proxy through WAN, WireGuard and OpenVPN, the dashboard, SSH, selling ports, proxy groups, Multi-IPv6, Android NextGen forwards, upstream bridges, ProxyMarket, Remote VPS, the modem DNS, the VPS forwarding and router UDP blocks, the adb server and X-Hub. TCP and UDP are separate: a TCP user and a UDP user of one number do not clash.

**Step 5: See other programs on the box**

The last block, **Other programs on this box**, lists programs outside XProxy that listen on a port of their own: the system DNS, a Tailscale agent, a web server. Each row has the **Port**, the **Protocol**, the **Address**, the **Program** and its **PID**.

A row in orange with **On a port of ours** is a clash: that program sits on a port that XProxy wants. Stop the program, or move the XProxy feature to a free port.

![Other programs on this box: systemd-resolve, avahi-daemon, tailscaled and nginx, with nginx marked On a port of ours (demo data)](https://media1.xproxy.io/docs/nov-sync/ports-in-use/5-programs.webp)

> A program on a port that no XProxy feature uses is listed but not a clash. The box only avoids that port when it picks a new one for you.

**Step 6: The warning when you save**

You do not have to look at this tab to avoid a clash. Before the box accepts a port, it checks the list. Type a port that is taken in **Parent Port** of a new proxy group, and when you leave the field the panel says so and offers a free port: click **Use 30004**. The box checks again when you click **Save Group**, and refuses a port that is taken.

The refusal always has the same form: **Port 30001 is already used by the proxy group port group #1, choose another port!**, and the nearest free port when there is one. Nothing is saved.

![New proxy group: the Parent Port 30001 with the red message that the port is already used by the proxy group port group #1, the Use 30004 link and the Save Group button](https://media1.xproxy.io/docs/nov-sync/ports-in-use/6-save-warning.webp)

> Taken ports are refused for proxy groups and for selling ports (the import and the generator) from XProxy 21.3.47. From 21.3.49 the same check covers the other places that take a port, listed below.

**What's next?**

Customers outside your network reach these ports through your router or a VPS: [NAT port forwarding](https://xproxy.io/document/how-public-access-xproxy) and [VPS forwarding](https://xproxy.io/document/vps-forwarding-to-use-difference-place).

## Where the box refuses a taken port

The same check runs in every place that takes a port. If the port is already in use, you get a message and the change is not saved.

| Where | What is checked |
| --- | --- |
| Proxy group | The Parent Port of a new group. |
| Selling ports | Each row of an import. A taken port shows as a note on the row, and the generator picks free ports. |
| Proxy Settings | A new **Starting Port** moves every modem port. It is refused when the new modem ports would land on ports in use. Shadowsocks ports are checked the same way, and so is the Proxy through WAN port. |
| VPN | The start ports of WireGuard and OpenVPN: **WireGuard ports 8001-8064 are already in use (...), choose another start port!** |
| Dashboard | A new dashboard port. |
| X-Hub, NextGen, Remote VPS | The X-Hub port, the ports of Android NextGen forwards when you switch them on, and the WireGuard port of Remote VPS. |

## Something not working?

| You see | What to do |
| --- | --- |
| Customers get **407** on some requests but not on others | Two users share a port. Open **Ports in use** and look at **Conflicts**. Move one of them to a free port. |
| The banner **Port conflict** does not go away after you fixed it | Click **Re-scan** on the **Ports in use** tab. The banner updates when you open a page and once a minute. |
| A conflict with a program such as **nginx** | The program started after XProxy, or the port moved. Stop the program, or move the XProxy feature to a port from the checker. |
| **Port N is not a valid port (1-65535)** | Type a whole number from 1 to 65535. |
| Save is refused with **already in use** | Nothing was changed. Use the free port the message gives, or pick another with the port checker. |
| A port you use is not in the table | The table lists only what your box uses now. A feature that is switched off has no ports. Switch it on and click **Re-scan**. |

---

Source: https://xproxy.io/document/ports-in-use
