Change Remote Desktop Listening Port: Step-by-Step Guide
In this article
You can change the Remote Desktop listening port by editing the Windows registry to set a new port number, then restarting the Remote Desktop Services service and updating Windows Firewall rules. This is useful when the default port 3389 conflicts with other software or when you want to reduce automated scanning on your network. The steps below are for Windows 10 and Windows 11 Pro or Enterprise (Remote Desktop host is not available on Home editions). You will need administrator rights on the PC you want to connect to. Note that menu labels and registry paths can differ slightly by Windows version, but the core method is the same.
What You'll Need
- Administrator access to the Windows PC that will accept Remote Desktop connections.
- The new port number you want to use (choose a number between 1024 and 65535 that is not already in use by another service).
- A way to test the connection from another device on the same network, such as another PC or a phone with an RDP client.
- Basic familiarity with the Registry Editor and Windows Firewall.
Step-by-Step
- Back up the registry. Before making changes, open Registry Editor (press Win+R, type
regedit, press Enter). Go to File > Export, choose a location, and save a backup of the entire registry or at least the relevant key. This lets you restore if something goes wrong. - Locate the Remote Desktop port setting. In Registry Editor, navigate to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. In the right pane, find the value namedPortNumber. It is usually a REG_DWORD with a decimal value of 3389. - Change the port number. Double-click
PortNumber. In the dialog, select Decimal, enter your new port number (for example, 3390), and click OK. Do not change other values in this key. - Restart the Remote Desktop Services service. Open Services (press Win+R, type
services.msc, press Enter). FindRemote Desktop Services, right-click it, and choose Restart. If it is not running, start it. Alternatively, restart the computer, which also applies the change. - Update Windows Firewall rules. Open Windows Security > Firewall & network protection > Advanced settings (or run
wf.msc). In Inbound Rules, find the rules namedRemote Desktop - User Mode (TCP-In)andRemote Desktop - User Mode (UDP-In)(names may vary slightly). For each, right-click and choose Properties, then change the local port from 3389 to your new port. If you prefer, you can create a new inbound rule allowing TCP on your chosen port and disable the old rules. Apply the changes. - Test the new port locally. From another PC on the same network, open Remote Desktop Connection (press Win+R, type
mstsc, press Enter). In the Computer field, enter the host PC's IP address followed by a colon and the new port, for example192.168.1.10:3390. Click Connect and sign in. If it works, the port change is successful. - Update any port forwarding or firewall rules on your router (if applicable). If you connect from outside your local network, you must also forward the new port on your router to the host PC's IP address. Remove the old 3389 forwarding rule to avoid leaving an unused open port.
Common Mistakes
- Forgetting to restart the service or PC. The registry change does not take effect until the Remote Desktop Services service restarts.
- Not updating the firewall. Windows Firewall still blocks the new port if you only edit the registry. Always update or create the inbound rule.
- Choosing a port already in use. Pick a port that no other application is using. You can check with
netstat -anoin Command Prompt and look for the port number in the Local Address column. - Using a port below 1024. Ports below 1024 are reserved for well-known services and may require additional configuration; stick to 1024–65535.
- Forgetting to update client connection strings. After the change, you must specify the new port in the RDP client (e.g.,
address:port). The old port will no longer work. - Leaving the old port open in the router. If you forwarded 3389 previously, remove that rule to reduce exposure.
Tips
- Write down the new port number and keep it in a safe place; you will need it every time you connect.
- Use a port number that is easy to remember but not commonly used, such as 3390 or 13389.
- If you manage multiple PCs, consider using a consistent port scheme to simplify firewall rules.
- Test the change during a maintenance window when you can afford downtime.
- For added security, combine the port change with strong passwords and network-level authentication (NLA).
Troubleshooting
If you cannot connect after changing the port, work through these checks in order:
- Verify the registry value. Re-open Registry Editor and confirm
PortNumberis set to the new value in Decimal. - Confirm the service restarted. In Services, check that Remote Desktop Services is running and that its start time is recent.
- Check firewall rules. In Windows Firewall with Advanced Security, ensure the inbound rule for Remote Desktop is enabled and its local port matches the new port. Also check that no other rule is blocking the port.
- Test locally first. Try connecting from another PC on the same network using
IP:port. If that works, the issue is likely router port forwarding or an external firewall. - Use
netstatto confirm listening. Open Command Prompt as administrator and runnetstat -ano | findstr :yourport(replaceyourportwith your number). You should see a line with LISTENING. If not, the service is not listening on that port. - Check for port conflicts. If another application is using the port, choose a different one.
- Restore from backup if needed. If you suspect the registry change caused issues, double-click your exported .reg file to restore the previous settings, then restart.
If Remote Desktop still does not work, temporarily disable Windows Firewall (for testing only) to see if the firewall is the cause. Re-enable it immediately after testing. Also ensure the client is using the correct syntax: hostname:port or IP:port.
Frequently Asked Questions
Can I change the Remote Desktop port on Windows Home?
No, Windows Home editions do not include the Remote Desktop host feature. You can only act as a client.
Do I need to change the port on the client too?
Yes, when connecting you must specify the new port in the RDP client, for example 192.168.1.10:3390.
Will changing the port break existing shortcuts or saved connections?
Yes, any saved .rdp files or shortcuts that use the old port will fail until you update them to include the new port.
Is changing the port enough to secure Remote Desktop?
No, it only reduces automated scanning. You should also use strong passwords, enable Network Level Authentication, and keep Windows updated.
Can I use the same new port on multiple PCs?
Yes, as long as each PC has a unique IP address or you use different port forwarding rules on your router.
What if I forget the new port?
You can check the registry value PortNumber under the RDP-Tcp key, or look at the firewall rule you modified.