Using your VPS as a remote desktop gives you a full graphical interface accessible from anywhere. This guide covers RDP setup for both Windows Server and Linux VPS.
Windows Server RDP Setup
Windows Server comes with Remote Desktop pre-installed. You just need to enable it.
Enable Remote Desktop
- Open Server Manager > Local Server
- Click Remote Desktop: Disabled
- Select Allow remote connections to this computer
- Check Allow connections only from computers running Remote Desktop with Network Level Authentication
- Click OK
Configure the Firewall
Ensure port 3389 is open:
New-NetFirewallRule -DisplayName "RDP" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Allow
Connect from Your Computer
Windows: Press Win + R, type mstsc, enter your VPS IP, and click Connect.
Mac: Download Microsoft Remote Desktop from the App Store. Add a new PC with your VPS IP.
Linux: Install Remmina or use xfreerdp:
xfreerdp /v:YOUR_SERVER_IP /u:Administrator /size:1920x1080
Linux RDP with xRDP and XFCE
For a Linux VPS, install xRDP (an open-source RDP server) with the lightweight XFCE desktop.
Install XFCE and xRDP
sudo apt update && sudo apt upgrade -y
sudo apt install xfce4 xfce4-goodies xrdp -y
Configure xRDP to Use XFCE
echo "xfce4-session" | sudo tee /home/${USER}/.xsession
sudo systemctl restart xrdp
sudo systemctl enable xrdp
Open the Firewall
sudo ufw allow 3389/tcp
sudo ufw reload
Connect
Use the same RDP clients as above. Log in with your Linux username and password (not root — create a regular user if needed).
Recommended VPS Specifications
| Use Case | RAM | CPU Cores | Storage | |---|---|---|---| | Basic desktop browsing | 2 GB | 2 | 40 GB SSD | | Office work and light apps | 4 GB | 2 | 60 GB SSD | | Development and IDEs | 8 GB | 4 | 80 GB SSD | | Heavy multitasking | 16 GB | 6+ | 120 GB SSD |
Security Hardening
Change the Default RDP Port
Linux (xRDP):
sudo nano /etc/xrdp/xrdp.ini
# Change port=3389 to port=13389
sudo systemctl restart xrdp
sudo ufw allow 13389/tcp
sudo ufw deny 3389/tcp
Windows Server:
Set-ItemProperty -Path "HKLM:SystemCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" -Name "PortNumber" -Value 13389
Restart-Service -Name TermService -Force
Enable Network Level Authentication (NLA)
NLA requires authentication before establishing a session, blocking many attacks.
Install fail2ban (Linux)
sudo apt install fail2ban -y
sudo nano /etc/fail2ban/jail.local
Add:
[xrdp]
enabled = true
port = 3389
filter = xrdp
logpath = /var/log/xrdp.log
maxretry = 3
bantime = 3600
Restrict Access by IP
For maximum security, only allow your IP to connect:
sudo ufw allow from YOUR_HOME_IP to any port 3389 proto tcp
sudo ufw deny 3389/tcp
Troubleshooting
- Black screen after login: Edit
/etc/xrdp/startwm.shand addunset DBUS_SESSION_BUS_ADDRESSandunset XDG_RUNTIME_DIRbefore the session line. - Slow performance: Reduce colour depth to 16-bit in your RDP client settings. Disable desktop effects in XFCE.
- Cannot connect: Verify xrdp is running with
sudo systemctl status xrdpand check firewall rules.