v2rayN Port Already in Use: Find the Conflicting Process and Change the Listening Port

Fix v2rayN startup failures caused by ports in use. Find the process using ports 10808 or 10809, then set a different local port.

At a glance

Use these steps if v2rayN fails to start its core because a port is already in use, exits right after you switch nodes, or an app can't connect to the local proxy. Check the log for the failed address and port, find the listening process with Windows commands, then either close a duplicate instance or change the port. Finally, update your system proxy and app settings. This guide focuses on Windows and also includes commands for macOS and Linux.

First, confirm it’s a bind error—not a node timeout

A local listening port is where apps such as browsers and terminals send traffic to the core. It is not the remote server port used by a node. If the log shows bind, listen tcp, or “address already in use” during core startup, troubleshoot the local listener first. Changing your subscription or VMess or VLESS node settings usually won’t resolve a port conflict.

In the v2rayN main window, open the log and keep the full output from core startup through the failure. A wrapper message may say “startup failed,” but look for the innermost error line: it typically identifies the protocol, IP address, port, and system error. The snippets below are examples; the exact log may vary by version.

bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Cause: A common Windows address-in-use error, corresponding to socket error 10048. Another listener may already be bound to that address and port.

Fix: Look up the PID listening on the port shown in the log. Identify the process, then close the duplicate instance or choose an unused port for the current one.

bind: An attempt was made to access a socket in a way forbidden by its access permissions.

Cause: Windows socket error 10013 may involve an excluded port range, an exclusive bind, or a security policy. It may not show up as a regular listening process.

Fix: Check the listening processes, then check the system’s excluded port ranges. Repeatedly running the app as an administrator is not a reliable fix.

bind: address already in use

Cause: A common address-in-use error on macOS and Linux, indicating that the configured address can’t be bound.

Fix: Use lsof or ss to find the listening process, and check whether two v2rayN instances are running.

Read the error logConfirm the listening addressFind the process using the portFree the port or choose anotherTest the app connection

Check the ports and version

Don’t assume there’s a conflict based only on port numbers from a guide. The classic v2rayN 6.x Windows interface commonly uses SOCKS port 10808 and HTTP port 10809. Some newer versions or core configurations use a mixed listener that accepts both HTTP and SOCKS traffic on one port. Upgrades and migrated settings may also retain older ports, so treat these numbers as examples to investigate—not universal defaults.

CheckExample or rangeHow to tell
Separate listenersSOCKS 10808、HTTP 10809Common default in v2rayN 6.x; check your current settings
Mixed listenerOne port accepts both types of proxy trafficCheck the listener type in the interface and the actual core log; don’t infer the protocol from the port number
Loopback address127.0.0.1、::1IPv4 and IPv6 loopback addresses; match the address shown in the error
All interfaces0.0.0.0、::Binds to a wider range of addresses and may conflict with a listener on the same port at a specific address

Turning off “Allow connections from the LAN” doesn’t free the port; it mainly changes which addresses the listener accepts. For local use, prefer a loopback address. Don’t switch to all interfaces to work around a conflict, or enable extra LAN listeners just to experiment.

Windows: Find the PID and executable path by port

Run the following commands in PowerShell. They only read listener information and do not stop any processes. No results may mean the port isn’t listening, or the core exited after startup failed. If access is denied, try again in an administrator terminal; permission to run a query is separate from whether the core itself should run elevated.

# List TCP listeners with their addresses, ports, and process IDs
Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue |
  Where-Object { $_.LocalPort -in 10808,10809 } |
  Select-Object LocalAddress,LocalPort,OwningProcess

# Get the names, executable paths, and command lines of these listeners
$ownerIds = @(Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue |
  Where-Object { $_.LocalPort -in 10808,10809 } |
  Select-Object -ExpandProperty OwningProcess -Unique)

Get-CimInstance Win32_Process |
  Where-Object { $_.ProcessId -in $ownerIds } |
  Select-Object ProcessId,Name,ExecutablePath,CommandLine

You can also use the built-in netstat command in Command Prompt. The expression below matches local ports so you don’t mistake a connection to remote port 10808 for a local listener. Check the state column too: only LISTENING indicates a TCP listener.

netstat -ano -p tcp | findstr /R /C:":10808 " /C:":10809 "

Identify the process before deciding whether to stop it

If both ports are held by a core launched from an old client folder, close that client first. If the listener belongs to a service you still need, changing the port in the current v2rayN instance is a better option. Don’t force-stop a process just because its name contains xray or v2ray.

Free the port or change it in settings

Running two copies of v2rayN, leaving one in the system tray after closing its window, or leaving an old core running after the main app exits can all look like a port conflict on startup. Save your current settings first, then choose one fix. Don’t change node addresses, DNS, routing, and listening ports all at once, or you won’t know which change worked.

  1. Close duplicate instances

    Check the system tray and choose “Exit” on any v2rayN instance you don’t need. Closing the main window may only minimize it to the tray. Check the port again afterward to confirm the listener is gone.

  2. Check for leftover processes

    If the main app has exited but the port is still in use, verify the PID, executable path, and command line under “Details” in Task Manager. Use “End task” only for a leftover core you’ve confirmed is no longer needed. Don’t stop system processes or unfamiliar services.

  3. Open the settings

    In versions of v2rayN with the classic menu, go to “Settings” → “Parameter settings” and find the local listener options. In the classic 6.x interface, check “Local listening port” on the “Core: Basic settings” page. In other interfaces, use the SOCKS, HTTP, or mixed-listener fields that are actually shown.

  4. Choose an unused port

    To check candidates, replace the numbers in the query with 11808,11809. For separate listeners, verify that each enabled endpoint is free. If the HTTP port is generated as the base port plus 1, check the adjacent port too; don’t assume both fields can be edited independently.

  5. Save and restart

    Save the settings so the core reloads them. If it doesn’t restart automatically, exit v2rayN normally and reopen it. Check the log and TCP listener list again to confirm the core in the expected folder now owns the new port.

No process found, but the bind still fails?

Check the address and port in the log, then run the query again. If the error names a different port, searching only for 10808 or 10809 won’t find it. A query run after the failure may also return nothing if the other process has already exited. Once you’ve confirmed the port number, check Windows excluded port ranges if the error is 10013.

netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv6 show excludedportrange protocol=tcp

The output shows a start port and an end port for each range. A range matters only if it includes the port that failed to bind; a long list doesn’t by itself indicate a system problem. System networking components or virtualization features may reserve these ranges. Deleting ranges or disabling system services can affect other network features, so first try an unused port outside those ranges.

Equivalent commands for macOS and Linux

When using the v2rayN desktop app, check the ports in your current settings and replace the numbers in the commands below. Use lsof on macOS and ss on Linux. Administrator privileges may be needed to see process paths or details. As on Windows, try closing the app that owns the port normally before stopping its process.

# macOS: Check each example port separately
lsof -nP -iTCP:10808 -sTCP:LISTEN
lsof -nP -iTCP:10809 -sTCP:LISTEN

# Linux: Show listening sockets and processes
sudo ss -ltnp '( sport = :10808 or sport = :10809 )'

Update system proxy and app settings

Changing the port fixes the listener, but apps may still be pointed at the old one. This can make it seem like the core is running while apps still can’t connect. In v2rayN, reapply “System proxy” → “Set system proxy”. If that menu isn’t available in your version, use the equivalent automatic system proxy option and verify the address recorded by the system.

How you connectSettings to updateHow to check
Windows system proxyManual proxy under “Settings” → “Network & internet” → “Proxy”Check that the address and port point to the new HTTP or mixed endpoint
Manually configured app proxyThe app’s own network or proxy settingsDon’t enter SOCKS5 settings in an old endpoint that supports HTTP only
Terminal environment variablesHTTP_PROXY、HTTPS_PROXY、ALL_PROXYCheck the current terminal session and startup settings for the old port
Background tools or servicesTool configuration files and service startup argumentsReload or restart the tool as required after changing settings

You can test the new TCP endpoint in PowerShell. This example assumes you enabled 11808. TcpTestSucceeded : True only means the TCP connection was established; it doesn’t confirm the listener’s identity, that the proxy protocol works, or that the remote node is reachable. Check the PID and make an actual request as well.

Test-NetConnection -ComputerName 127.0.0.1 -Port 11808

Verify the listener and node connectivity separately

First confirm the log has no bind errors, the port belongs to the expected process, and the app is using the new endpoint. Then test a proxy request to a known working destination. If it times out remotely, troubleshoot the node address, transport settings, and server status instead of repeatedly changing the local port.

Port-in-use FAQs

Why does it work after reboot, then conflict again later?

Check whether another v2rayN instance is set to start with Windows, or whether another proxy service starts later. Record the PID and executable path before and after the conflict. Then disable startup for the duplicate instance, or assign different ports to instances that need to run side by side. Rebooting only clears processes temporarily; it doesn’t fix a configuration conflict.

I changed 10808. Why does the log still say 10809 is in use?

Your settings may still have a separate HTTP endpoint, or the adjacent port may be derived from the base port. Go back to “Settings” → “Parameter settings” and check every enabled listener, using the full address in the latest log as your reference. If you edited a file without saving through the client, it may have been regenerated.

Can I change the local port to the node’s port 443?

The local endpoint and remote node port don’t need to match. There’s no need to change the local listener to 443 to avoid a conflict; another service may already use it, or permissions may prevent binding. Keep the node’s server port unchanged, edit the local endpoint in settings, and update your apps.

The browser works again, but the terminal still uses the old port. Why?

Your browser may use the system proxy, while terminal tools read environment variables. Run Get-ChildItem Env:*PROXY* in PowerShell to check the current session, then check your terminal startup script and the tool’s own proxy settings. After changing a persistent environment variable, reopen existing terminals so they pick up the new value.

Download v2rayN