Guide on Installing XRDP on Ubuntu, CentOS
XRDP is a service that allows users to access the graphical user interface of a Linux server via Remote Desktop Protocol. With XRDP, you can connect from Windows using the built-in Remote...
XRDP is a service that allows users to access the graphical user interface of a Linux server via Remote Desktop Protocol. With XRDP, you can connect from Windows using the built-in Remote Desktop tool without installing complex third-party software.
In this article,VPTSwill provide detailed instructions on installing XRDP on CentOS and Ubuntu, while sharing essential configuration steps for stable Remote Desktop operation on Linux VPS.
1. What Is XRDP?
XRDP is an open-source RDP server for Linux. Once installed, users can remotely connect to a Linux VPS or server featuring a graphical user interface, similar to controlling a remote Windows machine.
XRDP is commonly used in cases such as:
- Manage Linux VPS with a graphical user interface.
- Install software that requires a visual interface.
- Remote customer support.
- Easier server management for users unfamiliar with the command line.
2. Install XRDP on Ubuntu
Step 1: First, update the system:
Copy
sudo apt update
sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils- Install XRDP:
Copy
sudo apt install xrdp- Check statusXrdpis running using the command:
Copy
sudo systemctl status xrdpIf you see the status active (running), it means XRDP is operating normally.

Step 2: Add the XRDP user to the ssl-cert group
By default, XRDP requires permission to read SSL certificates. On Ubuntu, you should add the user
xrdp
into group
ssl-cert
:
Copy
sudo adduser xrdp ssl-certReturned result ->
has been successfully installed on the system.

Step 3: Xrdp Configuration File
- XRDP configuration files are typically located in the directory:/etc/xrdp
- The main configuration file is:/etc/xrdp/xrdp.ini
Typically, for a basic XRDP connection, you do not need to edit this configuration file. XRDP will use the XFCE desktop configured in the previous step.
If there are changes to the XRDP configuration, you need to restart the service:
Copy
sudo systemctl restart xrdpStep 4: Configure firewall
If using firewalld:
Copy
sudo firewall-cmd --permanent --add-port=3389/tcp
sudo firewall-cmd --reloadIf using iptables:
Copy
sudo iptables -I INPUT -p tcp --dport 3389 -j ACCEPTStep 5: Connect Remote Desktop from Windows
On a Windows machine, open the toolRemote Desktop Connection
- Enter VPS IP address
- Then clickConnect.
On the XRDP login screen, enter:
- Username: Linux account
- Password: Linux account password

After logging in successfully, you will see the Linux Desktop interface.

2. Install XRDP on CentOS
**IMPORTANT NOTE:
For CentOS 7 VPS instances that have not updated the Vault repo, run the command below before installation to avoid package download errors. VPTS's Vietnam VPS instances come with pre-configured repos, so you can skip this step.
Copy
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*.repo
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repoStep 1: Update server
Before installing XRDP, you should refresh package lists and update the system to prevent dependency errors during installation.
Copy
yum clean all
yum update -yAfter updating is complete, you should restart the server so all changes take full effect.
Copy
rebootStep 2: Enable the EPEL software repository
Certain packages required for XRDP are not available in CentOS default repositories, so enabling the EPEL Repository is required.
Copy
rpm -Uvh --nosignature https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
rpm -Uvh --replacepkgs http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpmCertain packages required for XRDP are not available in CentOS default repositories, so enabling the EPEL Repository is required.

Step 3: Install a graphical user interface (GUI) for the server
By default, many CentOS VPSs only come with a command-line interface. For Remote Desktop to work, the server needs a desktop environment.
- You can install the full GUI using the command:
Copy
yum groupinstall -y "Server with GUI"- Then set the default boot target to the graphical interface:
Copy
systemctl set-default graphical.targetStep 4: Install XRDP and supporting packages
After fully configuring the supporting repo information, finally you just need to install Xrdp and you're done:
Copy
yum -y install xrdp tigervnc-serverStep 5: Start and enable XRDP on boot
After finishing XRDP installation, start the service with the command:
Copy
systemctl start xrdp.serviceEnable XRDP to start automatically on server reboot:
Copy
systemctl enable xrdp.serviceCheck service status:
Copy
systemctl status xrdp.serviceIf you see the status active (running), it means XRDP is operating normally.

Step 6: Check port 3389
Copy
netstat -lntp | grep 3389You need to open port 3389/tcp so external computers can establish a Remote Desktop connection to the server.
Copy
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reloadIf you use iptables, create rules as follows:
Copy
iptables -I INPUT -p tcp --dport 3389 -j ACCEPTStep 7: Check Remote Desktop connection
On a Windows computer, open
Remote Desktop Connection
and log in
When the XRDP login screen appears, enter your Linux account credentials
- Username: Linux account
- Password: Linux password

If the result displays the interface below, you have connected successfully.
See more:
Guide to Installing and Using OpenSSH Server for Remote Connection to Windows
VPTS team contact information:
- Website: https://vpts.shop
- Hotline: 0328 812 674
- Facebook: https://facebook.com/VPSTTT
- Zalo OA: https://zalo.me/vpstttgroup
CONCLUSION
Thus, with just a few basic configuration steps, you can install and use XRDP on CentOS or Ubuntu to easily connect Remote Desktop from Windows to a Linux VPS. Using XRDP makes server administration more convenient, especially for users who prefer graphical interfaces over command-line SSH.
During the installation process, make sure to thoroughly check all components such as GUI interface, XRDP service, firewall, and login session configuration to keep the system running stably. If you encounter login errors or cannot connect, check the XRDP service, port 3389, and system logs to identify the cause.
recommends using a dedicated user account for remote access, regularly updating the system, and restricting access permissions to ensure security for your VPS or Server during operation.
VPTS – Comprehensive Digital Infrastructure Solutions Provider
VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.
Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.
VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.
VPTS Team Contact Information
Website: https://vpts.shop
Facebook: https://www.facebook.com/trang.vpsttt/
Zalo OA: https://zalo.me/vpstttgroup
Hotline: 0328 812 674