For Windows and macOS users who encounter a bind failure when starting the v2rayN core. First, note the listening address, protocol, and port from the log, then find the process ID. An extra instance can be exited normally; leave processes you need running and assign v2rayN a different port. Finally, confirm that the core started this time is listening on the new port, and update any apps still pointing to the old one.
Find the Conflicting Port in the Startup Log
Start with the latest startup entry in the v2rayN main window log. If it says listen tcp 127.0.0.1:10808, the failed bind is for a local TCP inbound. This port is where apps connect to the local proxy; it is unrelated to the remote port in a node address. Changing the node port, updating the subscription, or switching routing rules will not free the local listening port.
Error: bind: address already in use
Cause and fix: The requested local address and port conflict with an existing socket. Check for listening processes on the port shown before the error, then determine whether the process is an old instance that should be exited or a program you need to keep running.
Error: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Cause and fix: Windows rejected a bind request because the socket address is already in use. Check the protocol and port shown in the log; don't check only the default SOCKS port, since another inbound in the same configuration may be the one that failed.
In the log, 127.0.0.1 and ::1 are the IPv4 and IPv6 loopback addresses. When checking for listeners, don't filter by address at first: a listener bound to 0.0.0.0 also covers the IPv4 loopback address. If you see ::, check whether the listener uses dual-stack networking. Matching port numbers alone don't mean there's a conflict; check TCP and UDP separately.
Find the Process Using a Port on Windows or macOS
The examples below use TCP port 10808. Replace it with the port from your log. Check local listeners only; a remote port of 10808 on an established connection does not mean that process is using the local port.
Windows: Find Listeners with PowerShell
Get-NetTCPConnection -LocalPort 10808 -State Listen -ErrorAction SilentlyContinue |
Select-Object LocalAddress, LocalPort, OwningProcess
Get-Process -Id 7420 | Select-Object Id, ProcessName, Path
In the second command, replace the example process ID 7420 with the OwningProcess value returned by the first command. If the startup log says listen udp, use Get-NetUDPEndpoint -LocalPort 10808 to find the endpoint, then look up its process using OwningProcess. If the process path isn't visible, check again from a session with sufficient permissions.
macOS: Find Listeners with lsof
lsof -nP -iTCP:10808 -sTCP:LISTEN
ps -p 7420 -o pid=,command=
Take the actual process ID from the PID column in lsof, then use ps to view the startup command. For UDP, run lsof -nP -iUDP:10808; don't filter for TCP listening states. If your regular account can't see another user's process, run sudo lsof with administrator privileges to check again.
| Result | Next step |
|---|---|
| The listener belongs to an old core started from another directory | Exit it using the old client's normal quit option, then check whether the port has been released. Closing the window alone may leave the app running in the system tray. |
| The listener belongs to an app or service you still use | Keep that process running and assign v2rayN a different local port. Don't force-quit a service based only on its process name. |
| No listener found after startup failed | Review the full log from the same startup attempt and check whether two inbounds in the custom configuration are requesting the failed port. When the core exits, any listeners it had already bound are also closed. |
How to Identify a Process: Its Path Matters More Than Its Name
Two core processes can have the same name. If the results show a familiar core name, check its path or startup command to identify which configuration it belongs to before deciding whether to exit the old instance or move to another port.
Change the Port in v2rayN Settings
These steps use a standard node in v2rayN 7.x as an example. Treat 10818 as a candidate, not a reserved port. Some configurations use one mixed inbound for both SOCKS and HTTP; others use separate inbounds. Don't pick the next port by assuming a sequence after 10808 or 10809. Use the configuration actually loaded and verify the resulting listeners.
Note Your Current Settings
Record the port shown in the error, the current node, and the system proxy status. If v2rayN manages your system proxy, you can first select “System Proxy” → “Clear System Proxy” to stop traffic from being forwarded to the old address during the change.
Check a Candidate Port
Change the port in the commands above to
10818. If you use additional inbounds, check their ports too; if UDP is enabled, check the corresponding UDP endpoints as well. Finding no listener only confirms the port's status at the time you checked.Change the Local Port
Open “Settings” → “Parameter Settings” and find the local listening port field under Basic Settings. If the field is labeled “Local Mixed Listening Port,” it controls the mixed inbound port. Enter
10818and save. If the proxy is for this computer only, leave LAN connections disabled; there's no need to listen on a wider network interface just to change the port.Restart and Check the Listener
Exit v2rayN from the system tray, reopen it, and start the same node. Check the latest log, then run the same command to confirm that the new port is listening and belongs to the expected process. If the new error names a different port, investigate that inbound instead of repeatedly changing a port that has already bound successfully.
Update Your Proxy Settings
If you previously used the system proxy, select “System Proxy” → “Automatically Configure System Proxy” in v2rayN again. If you manually configured a browser extension, terminal environment variables, or a development tool, update the port in each one's settings and keep the proxy protocol consistent with the inbound.
If you're running a custom configuration and the core still tries to bind to the old port after changing the settings, check which configuration is actually loaded. In Xray/V2Ray-style JSON, look at listen and port for the relevant inbound under inbounds. Back up your custom file before editing its inbound settings; don't use a temporary configuration generated by the client as the place for persistent changes.
Test HTTP, SOCKS, and App Settings Separately
A listener shown by system tools confirms only that the local socket is open. Next, specify the proxy address explicitly to rule out interference from browser extensions and system proxy settings. The example below assumes 10818 is a mixed inbound. If HTTP and SOCKS use separate listeners, substitute each one's port. In Windows PowerShell, run the same arguments with curl.exe.
curl --noproxy "" --max-time 15 -I --proxy http://127.0.0.1:10818 https://v2rayapi.com/
curl --noproxy "" --max-time 15 -I --proxy socks5h://127.0.0.1:10818 https://v2rayapi.com/
- Local connection refused: First confirm that the new port is still listening, then check the listening address. If the core is bound only to
::1, a test using127.0.0.1won't connect to that listener. - Local connection succeeds, but the handshake fails: Check that the test protocol matches the inbound type. Sending an HTTP request to a SOCKS-only port won't work, even if the port is open.
- You receive an HTTP response from the destination: This confirms that the request received a response through the specified local inbound. For an HTTP proxy,
200 Connection establishedonly indicates that the tunnel was set up; check the destination's response that follows. To determine whether the core used a direct or proxied outbound, check the routing configuration and logs.
If the explicit test succeeds but your browser or terminal still fails, check for an old address saved in that app. Check whether a browser extension overrides the system proxy, and inspect HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY in the current terminal. If the variables are set in your terminal startup configuration, open a new session after changing them; existing sessions won't pick up the new values automatically.
Common Issues After Changing the Port
Does the original port, 10808, have to be free?
No. If another program you use is listening on it, leave it alone. The services can use separate endpoints as long as v2rayN is listening on the new port and clients are configured to use the new address.
Why does the error still mention the old port, 10809?
First confirm that the log entry was generated after you saved the changes, then check for a separate HTTP inbound, an additional inbound, or a custom configuration. Check which process is using 10809; don't assume changing one field updates every inbound.
Can't find a process using the port on Windows, but getting an access permissions error?
If the error includes forbidden by its access permissions, it doesn't necessarily mean another process is listening. Run netsh interface ipv4 show excludedportrange protocol=tcp and check whether the candidate port falls within an excluded IPv4 TCP port range. If it does, choose an unexcluded port that isn't already in use; there's no need to delete system reservations.
Why does the conflict happen at startup but disappear after a manual restart?
Check which process owns the port as soon as the problem occurs, then check again after restarting. If the paths show that two copies of v2rayN started at the same time, keep the one you need and check for duplicate client startup settings or system startup entries. If another background service owns the port, set v2rayN to use a port that doesn't conflict.