How to Fix a Port Conflict: Find the Process and Change V2Ray's Local Listening Ports

How to troubleshoot a client that reports a port conflict: use system commands to find the processes using 10808/10809, decide whether to stop them or change ports, then update the system proxy settings.

When v2rayN starts its core, it first creates inbound listeners on the local machine. The common defaults are SOCKS on port 10808 and HTTP on port 10809, usually bound to 127.0.0.1. If another process already occupies either port, the new Xray or V2Ray core cannot bind to it. Even a correctly configured node will remain unusable.

The right fix is not to reinstall the client immediately, but to work through the sequence: confirm the conflicting port, identify the process, determine whether it should remain, release the port or choose a new one, sync the system proxy, and test again. Changing the client port without updating the system proxy can turn a startup error into “the core is running, but webpages will not open,” so both sides must be checked together.

Quick overview

This guide is for v2rayN and v2rayNG users whose 10808, 10809, or custom local port cannot be opened. After troubleshooting, you will be able to identify the process actually using the port, choose a safe fix, and verify that the browser, system proxy, and client core all point to the same port.

Confirm that it is a port conflict before troubleshooting the node

A port conflict occurs during local inbound setup, before the client connects to a remote VMess or VLESS node. The server address, UUID, transport, and routing rules have not yet taken part in communication; the client has already stopped because it cannot listen on the local port. Repeatedly updating subscriptions, switching nodes, or changing transport protocols usually will not change the result.

Open the v2rayN log panel and look for lines containing listen, bind, address already in use, or the specific port number. If the log only reports a connection timeout, TLS handshake failure, or remote connection refusal, troubleshoot the node path instead of the local port.

10808
Common SOCKS listening port
10809
Common HTTP listening port
127.0.0.1
Local loopback address
1
listener at a time

Error: listen tcp 127.0.0.1:10808: bind: Only one usage of each socket address is normally permitted

Cause and fix: Another Windows process is listening on 10808. Confirm the process identity from its PID, then stop the duplicate instance or assign v2rayN an unused port.

Error: listen tcp 127.0.0.1:10809: bind: address already in use

Cause and fix: Port 10809 is occupied by another local service. Stop the old service, or change the HTTP listening port and the system proxy port together.

Error: failed to start app/proxyman/inbound: failed to listen TCP

Cause and fix: The core could not create an inbound listener. Check the address and port at the end of the same log entry; do not conclude that the node is down based only on this higher-level error.

Find the processes using 10808 and 10809 on Windows

Exit v2rayN completely, then open it again. If the error persists, an old core process may still be running, or another proxy tool, development service, or security program may have taken the port. Do not force-close a process just because you found a PID; first verify its executable name and launch path.

Run the following commands in Terminal or Command Prompt. Query 10808 and 10809 separately, because different processes may be listening on the two ports.

netstat -ano | findstr :10808
netstat -ano | findstr :10809

Find the line whose status is LISTENING; the number at the far right is the PID. For example, if the result ends in 6420, query the process name with the task list command:

tasklist /FI "PID eq 6420"

In PowerShell, you can read listening connections together with their owning processes. Replace 6420 in the second command with the PID you actually found.

Get-NetTCPConnection -LocalPort 10808 -State Listen |
  Select-Object LocalAddress, LocalPort, OwningProcess

Get-Process -Id 6420 |
  Select-Object Id, ProcessName, Path
  1. The result is a v2rayN core process that is still running: exit from the client first, then end the leftover core in Task Manager and start the client again.
  2. The result is another local service that must remain running: keep it and assign v2rayN a different port.
  3. The result shows multiple connections but no LISTENING entry. These are usually client connections using the port, not necessarily the process holding the listening endpoint.
  4. If the query returns nothing but startup still fails, reopen an elevated terminal and check whether the address in the log is IPv4, IPv6, or a different port.
Observed status Meaning Next step
127.0.0.1:10808 LISTENING Listener accessible only from this machine Look up the process name by PID
0.0.0.0:10808 LISTENING Process listening on all IPv4 interfaces Check whether LAN access is required
[::]:10808 LISTENING Process listening on an IPv6 interface Check dual-stack binding
ESTABLISHED Existing connections are transferring data Continue looking for the matching LISTENING entry

Conclusion: the PID determines the fix

A leftover core is a good candidate for termination; an active business process should usually be kept and assigned a different port. “10808 is in use” alone does not tell you which process should be stopped.

Stop the old process or assign the client a new port

If the process is a leftover Xray or V2Ray core from a previous abnormal exit, choose “Exit” from the v2rayN menu, wait about 5 seconds, and check the port again. Closing the client window does not always mean the background core has stopped, especially after waking from sleep, an interrupted core update, or multiple client launches.

Once you confirm that it is a leftover process, locate it by PID on Task Manager’s “Details” tab and end the task. PowerShell can also stop a specific PID, but run the command only after checking the process name and path:

Stop-Process -Id 6420

If the process must keep running, changing v2rayN’s local listening ports is safer. Choose an unused port from the 20000–50000 range, such as 20808 and 20809. Always query the ports first and confirm that no LISTENING entry exists.

netstat -ano | findstr :20808
netstat -ano | findstr :20809
  • Stop the process: Use this for duplicate client instances, old cores whose main window is gone, and temporary services you have confirmed are no longer needed.
  • Change the ports: Use this when a development server, another local proxy, or a long-running background service already reserves 10808 or 10809.
  • Avoid trying random ports repeatedly: Query each port before changing it to reduce the chance of moving the conflict to another port that is already occupied.
  • Keep the address scope explicit: For local-only use, keep 127.0.0.1. Do not switch to 0.0.0.0 just to bypass a conflict; changing the listening address does not resolve a port collision.

Change the ports in v2rayN and sync the system proxy

The wording in v2rayN 7.x may vary between minor releases, but the controls are located under “Settings.” Open “Settings” → “Parameter Settings,” then find Core basic settings or the local listening options and review the SOCKS port, HTTP port, and local listening address. Change 10808 to 20808 and 10809 to 20809, save, and restart the core.

If your version derives subsequent ports from one base port, change the base value as described in the interface. Do not create two conflicting sets of values in the configuration file and graphical interface. After saving, return to the log and confirm a successful listening message with no further bind errors.

  1. Open “Settings” → “Parameter Settings” and note the listening address and ports before changing them.
  2. Set the SOCKS port to 20808 and the HTTP port to 20809. If the interface provides only a base port, follow that version’s port instructions.
  3. Save the configuration, choose “Restart service,” or exit and reopen v2rayN.
  4. From the main interface, open the “System Proxy” menu and choose “Auto-configure system proxy” so v2rayN writes the current HTTP listening port to the system settings again.
  5. Open Windows “Settings” → “Network & Internet” → “Proxy” and verify that the manual proxy address is 127.0.0.1 and the port has been changed to 20809.

Symptom: the core appears to be running, but the browser immediately says it cannot connect to the proxy server

Cause and fix: The client now uses port 20809, but the system proxy still points to 10809. Run “System Proxy” → “Auto-configure system proxy” again, or update the Windows proxy port manually.

Symptom: the SOCKS test succeeds, but programs using the HTTP proxy still fail

Cause and fix: The program may still be connecting to the old HTTP port. Change its proxy address to 127.0.0.1:20809 and confirm that 20809 is listening.

Symptom: the client still listens on 10808 after saving the settings and starting again

Cause and fix: You may have changed a setting that is not currently active, or an old instance may still be running in the background. Exit the client completely, confirm that the relevant processes have ended, then reopen the parameter settings and verify the actual values.

Browsers generally use the Windows system proxy, while some programs have independent proxy settings. If a program was manually set to 127.0.0.1:10808, update that program after changing v2rayN. The subscription URL and the remote ports of VMess or VLESS nodes do not need to change with the local port.

How Android differs from other desktop platforms

When v2rayNG uses Android’s VPN service to handle traffic, other apps usually do not need to enter its local SOCKS listener directly. However, 10808 can still be occupied by a custom inbound, LAN sharing, or duplicate service. Stop v2rayNG’s connection first, close any old instance from the app switcher, then reopen it and start the current configuration.

The same port-conflict principles apply to v2rayNG with the Xray core and v2flyNG with the v2fly core: first find the exact listening address and port in the log, then check whether LAN access, a custom SOCKS inbound, or an additional HTTP inbound is enabled. Do not mistakenly replace a node’s remote port with a local port.

Do I need to re-import the subscription after changing the port to 20808?

No. The local listening port belongs to the client’s inbound configuration. The subscription stores the node address, authentication details, transport, and remote port; the two are independent.

What if 10808 is reported as occupied every time I restart the computer?

In Task Manager’s “Startup apps,” check whether two client instances launch with Windows, and check whether v2rayN is configured to run at startup. Keep only one startup entry, then use netstat -ano to verify the listener.

Can changing the listening address to 0.0.0.0 solve the problem?

No. Expanding the address scope for the same process will not free the port and may allow devices on the LAN to connect. For local-only use, keep 127.0.0.1 and resolve the conflict by releasing the port or choosing a different one.

Should I change 10808 first if v2rayNG stops immediately after starting?

Check the app log first. Change the port only if the log explicitly mentions 10808 and a listening failure. For VPN permission, node timeout, or DNS errors, follow the relevant log details instead.

How do I find the listener on macOS or Linux?

On macOS, run lsof -nP -iTCP:10808 -sTCP:LISTEN. On Linux, run ss -lntp 'sport = :10808'. After identifying the process, determine its purpose before deciding whether to stop it or change the client port.

Complete verification sequence after changing the ports

A successful port fix means more than making the error window disappear: the core listener, system proxy, and actual requests must all agree. First verify that the current core is listening on the new ports, then verify the system proxy, and finally browse the network while watching for a new inbound connection in the log.

  1. Check the listeners: Run netstat -ano | findstr :20808 and netstat -ano | findstr :20809, and confirm the status is LISTENING.
  2. Verify the PID: Look up the listening PID and confirm that it belongs to the current v2rayN core, not another background service.
  3. Verify the system proxy: The address should be 127.0.0.1, and the HTTP port should match the client’s current configuration, such as 20809.
  4. Check the client log: After opening a webpage, a new connection record should appear. There should be no further listening failure or connection refusal on the old port.
  5. Test routing: Visit destinations that should connect directly and others that should use the proxy, confirming that changing the ports did not alter the existing routing rules.
  6. Test after a restart: Exit the client completely and start it again to confirm that an old instance does not claim the ports again.
netstat -ano | findstr :20808
netstat -ano | findstr :20809
tasklist /FI "PID eq actual PID"

If the listener is working but the network is still unreachable, investigate node availability, routing, and DNS. Do not keep changing local ports; the port layer has already been verified. Narrowing the issue by layer prevents node, DNS, and local inbound failures from being treated as the same problem.

Download client