To access Ubuntu 20.04 through Windows Remote Desktop, install a desktop environment and XRDP, start the XRDP service, configure firewall access, and connect using the server's IP address and a valid Ubuntu user account. This setup lets you manage a graphical Linux desktop remotely on a VPS or dedicated server. For businesses using Linux server hosting or a USA hosting provider, XRDP provides a convenient alternative to command-line administration when graphical access is required.
Prerequisites
Before installing XRDP, make sure you have:
- An Ubuntu 20.04 server with SSH access.
- A user account with
sudoprivileges. - Sufficient RAM and CPU resources to run a desktop environment.
- Network access to the server and permission to configure its firewall.
Ubuntu Server does not normally include a graphical desktop by default. Installing one increases resource consumption, so consider your workload when choosing a VPS hosting plan.
Step 1: Log In to Your Ubuntu Server
Connect to your Ubuntu server through SSH. For instructions, see How to SSH to a Linux Server.
Update the package lists:
sudo apt updateInstalling available security updates is also recommended before configuring remote desktop access.
Step 2: Install the Ubuntu Desktop Environment
If your server does not already have a desktop environment, install Ubuntu Desktop:
sudo apt install ubuntu-desktopThis installs the graphical components needed to provide a desktop session. The package may require substantial disk space and memory, so make sure your server hosting resources are sufficient.
If a desktop environment is already installed, you can skip this step.
Step 3: Install and Start XRDP
Install XRDP:
sudo apt install xrdpXRDP is an open-source implementation of Microsoft's Remote Desktop Protocol (RDP). It allows compatible clients, including Windows Remote Desktop Connection, to access a graphical Linux session.
Add the XRDP service account to the ssl-cert group so it can access the system's default TLS certificate when required:
sudo adduser xrdp ssl-certEnable and start the service:
sudo systemctl enable --now xrdpCheck its status:
sudo systemctl status xrdpIf the service is running, XRDP is ready to accept connections, provided the network and firewall settings allow them.
For more information about RDP services, see RDP options from Database Mart.
Step 4: Configure the Firewall
If UFW is enabled, allow incoming connections on the default XRDP port, TCP 3389:
sudo ufw allow 3389/tcpCheck the firewall status:
sudo ufw statusSecurity recommendation: Avoid exposing port 3389 to the entire internet if possible. Restrict access to your trusted IP address or use a VPN. If your VPS or dedicated server hosting provider has a separate network firewall, make sure its rules also allow the required traffic.
Step 5: Connect Using Windows Remote Desktop
On your Windows computer:
- Press
Win + R. - Enter
mstscand press Enter. - Enter your Ubuntu server's public IP address or hostname.
- Click Connect.
- Enter the username and password of a valid Ubuntu Linux account when prompted.
Use the Linux account you created or configured on Ubuntu. The username administrator is not automatically available on Ubuntu, so use your actual account credentials.
After authentication, XRDP should open a graphical desktop session.
Step 6: Troubleshoot Connection Problems
If you cannot connect, check the following:
- XRDP service: Run
sudo systemctl status xrdpto verify that the service is running. - Listening port: Run
sudo ss -ltnp | grep 3389to check whether XRDP is listening on port 3389. - Firewall rules: Confirm that UFW and any external hosting firewall allow the connection.
- Credentials: Use a valid Ubuntu username and password.
- Desktop session: If you see a black screen or the session disconnects, review the desktop environment and XRDP logs.
To inspect the XRDP service logs, run:
sudo journalctl -u xrdp -b --no-pagerYou can also inspect the session manager logs:
sudo journalctl -u xrdp-sesman -b --no-pagerThese logs can help identify authentication failures, session startup problems, and service errors.
Conclusion
You have installed XRDP and configured Ubuntu 20.04 for remote desktop access from Windows. Make sure the service is running, firewall rules permit the connection, and you are using a valid Ubuntu account.
For ongoing use, secure remote access by restricting port 3389, maintaining system updates, and using strong credentials. Whether you operate your own Ubuntu VPS or choose a USA hosting provider, sufficient server resources and proper security configuration help keep your remote desktop environment reliable.