For desktop users who see a local listener error when starting v2rayN or switching nodes. Copy the address and port from the log, then identify the process listening on it. If that process needs to keep running, assign v2rayN a different port. Verify the core is listening and that your apps use the new address—these are separate issues.
Find the conflicting port in the core log
Start with the core log from the latest launch. Errors containing listen tcp and bind indicate a local listener failure; check the address and port shown in the error. A browser timeout or failed node test alone doesn’t prove there’s a port conflict. The remote port in a node configuration is for outbound connections—don’t change it to fix a local listener.
Error: bind: address already in use
Cause and fix: The listening address conflicts with a socket that’s already in use. Check which process owns the port shown in the same log entry. Close an instance you no longer need, or assign a different port to the current client.
Error: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Cause and fix: Windows rejected the bind attempt, often because another instance is listening on the same or an overlapping address. Check both the local address and the process ID; don’t terminate a process based on its port number alone.
These numbers are for illustration only; they aren’t guaranteed to be the defaults in your installation or to be available. If the log shows 0.0.0.0:10808, the program is trying to listen on all IPv4 interfaces. A separate entry for 127.0.0.1:10808 may still overlap. Keep an eye out for [::]:10808 too: whether an IPv6 wildcard listener also covers IPv4 depends on the socket settings.
Find the process using netstat or lsof
Windows: Check the listening address and PID
Run the command below in Command Prompt, replacing 10808 with the port from the log. For TCP, look only at entries where the local address has an exact port match and the state is LISTENING. The filter may also match a remote address or a longer port number; those entries don’t prove there’s a local listener. The far-right column is the PID. Look up the process name and path on Task Manager’s Details tab.
netstat -ano | findstr ":10808"
macOS and Linux: Find listeners by port
lsof -nP -iTCP:10808 -sTCP:LISTEN
ss -ltnp 'sport = :10808'
The first command works on systems with lsof installed; the second is an alternative for Linux. The COMMAND and PID columns in lsof show the process name and ID. Whether ss displays process details depends on your permissions. If a regular query doesn’t show process information, rerun it with admin privileges if you’re authorized to do so. If the log explicitly says UDP, check that protocol instead: on Windows, use the UDP local address column in netstat; on macOS or Linux, run lsof -nP -iUDP:10808. UDP doesn’t have a TCP-style LISTENING state.
Change v2rayN’s local listening port
Note the current settings
Open the v2rayN main window and go to Settings → Parameters. Note the old port, proxy protocol, and current system proxy status under the inbound settings so you can restore them if needed. Depending on the build, the interface may show one combined port or separate HTTP and SOCKS ports. Follow the settings and logs in your version.
Check a candidate port
Use the command above to check
20808. No matching entries means no corresponding listener was found at the time of the query; it doesn’t guarantee the system will let you bind to that port. If the interface has multiple inbounds, check each port that will change, especially the listener configuration generated after you save.Save and restart
Change the local inbound port associated with the error, save, then restart the core. If there’s no separate restart option, quit the client from the system tray and reopen it. For local use, keep the listener bound to loopback; don’t enable LAN access to resolve a conflict. Check the new log and confirm the same bind error is gone.
Update apps that use the proxy
If v2rayN manages the system proxy, reapply it after saving, then verify the address and port in system settings. Update browsers, extensions, and terminals that use manual proxy settings individually. Make sure each app’s proxy protocol matches the one supported on the new port.
Verify the new port and browser and terminal settings
Check the new port again and confirm the listener belongs to the core you just started. Then make a request with the proxy specified explicitly to distinguish app configuration issues from problems in the proxy chain. The first command below is for an HTTP proxy; the second is for a SOCKS5 proxy. Run only the one that matches your configuration. In Windows PowerShell, call curl.exe explicitly to use the executable.
curl -I -x http://127.0.0.1:20808 https://example.com/
curl -I -x socks5h://127.0.0.1:20808 https://example.com/
Once you get an HTTP response from the destination, visit the same address in your browser. If the explicit request works but the browser doesn’t, check whether a browser extension is overriding the system proxy and whether an auto-configuration script still points to the old port. If the terminal works only with an explicitly specified proxy, check http_proxy, https_proxy, and ALL_PROXY in that session. Support for these environment variables varies by tool; also check whether NO_PROXY is bypassing the proxy for the destination. After making changes, test in a new terminal rather than assuming an existing session picked them up.
Common issues after changing the port
Why can’t it bind even though no process shows up?
Check the latest log to confirm whether the protocol is TCP or UDP, then verify IPv4, IPv6, and query permissions. If the conflict occurs only briefly during startup, rerun the check immediately when reproducing it, or check whether the configuration creates two overlapping inbounds. If the Windows log reports an access error rather than a port-in-use error, run netsh interface ipv4 show excludedportrange protocol=tcp to check TCP excluded port ranges. Choose a port outside those ranges; don’t remove system reservations.
Why does the old port still appear after changing it?
Check the log timestamp to make sure the error isn’t from the previous launch. Then check whether another instance is running from a different extracted folder. If you use a custom configuration, check whether the loaded configuration has a fixed inbound port; changes in Parameters may not override a custom inbound.
Why won’t the webpage load even though the new port is listening?
A listening port only confirms that the local endpoint has started. First, make an explicit request using the protocol configured for that endpoint. If the local connection is refused, recheck the listening address and port. If the proxy accepts the connection but the log reports an outbound timeout, check node reachability, DNS resolution, and routing rules. Changing the local port again usually won’t fix an outbound connection issue.