January 29, 2026
Tutorials

How to Install XRDP on CentOS 10

how to install xrdp on centos 10

Installing XRDP in CentOS 10 allows you to manage your server via a graphical interface easily. XRDP can be made reliable and secure with the right desktop setup, firewall configuration, and SELinux settings. Whether you are a novice or experienced system administrator, XRDP simplifies CentOS 10 Server management without sacrificing security or performance.

This guide will walk you through the steps to install XRDP in CentOS 10. It covers installation, desktop setup, firewall configuration, and troubleshooting.

How to Install XRDP on CentOS 10?

Administrators who prefer to manage servers using a graphical user interface rather than the command line will find remote desktop access essential. XRDP, a popular implementation of the Microsoft Remote Desktop Protocol (RDP), allows you to connect to a Linux server using a standard RDP client. To install XRDP on CentOS 10, follow these steps:

Step 1: Update the CentOS 10 System

Keeping your operating system updated ensures compatibility and avoids dependency issues.

sudo dnf update

sudo dnf update

Updates to the operating system include the latest software and security patches, which reduce the chance of an installation error.

Step 2: Enable EPEL Repository

XRDP can be accessed through the EPEL repository (Extra Packages for Enterprise Linux), which must first be enabled.

sudo dnf install epel-release -y

sudo dnf install epel-release -y

EPEL provides enterprise-grade packages that are not available in the default CentOS repositories. This includes XRDP.

Step 3: Install XRDP on CentOS 10

Install XRDP with the DNF Package Manager once EPEL has been enabled.

sudo dnf install xrdp

sudo dnf install xrdp

This command installs XRDP and all its dependencies, which are required for RDP connections.

Step 4: Install a Desktop Environment

XRDP needs a graphical desktop to be able to deliver a remote desktop session. Most commonly, GNOME and XFCE are used.

Option 1: Install GNOME Desktop (Recommended)

sudo dnf groupinstall “Server with GUI” -y

sudo dnf groupinstall

GNOME is a powerful desktop environment that integrates well into CentOS 10.

Option 2: Install XFCE Desktop (Lightweight Alternative)

XFCE desktop is a lightweight environment that’s ideal for VPS servers with low resources.

sudo dnf groupinstall “Xfce” -y

Step 5: Set Default Desktop Session for XRDP

XRDP must know the desktop environment that should be launched when a user is connected.

For GNOME:

echo “exec gnome-session” > ~/.xsession

echo ~/.xsession" class="wp-image-16055 webpexpress-processed" srcset="https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-5.png 970w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-5-300x24.png 300w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-5-768x62.png 768w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-5-960x78.png 960w" sizes="(max-width: 970px) 100vw, 970px">

For XFCE:

echo “exec startxfce4” > ~/.xsession

echo ~/.xsession" class="wp-image-16056 webpexpress-processed" srcset="https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-6.png 968w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-6-300x26.png 300w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-6-768x67.png 768w, https://greenwebpage.com/community/wp-content/uploads/2026/01/word-image-16050-6-960x85.png 960w" sizes="(max-width: 968px) 100vw, 968px">

The.xsession files define the desktop session that XRDP launches when remote users log in.

Step 6: Start and Enable XRDP Service

Start the XRDP Service and configure it so that it launches automatically at system startup.

sudo systemctl start xrdp

sudo systemctl enable xrdp

sudo systemctl status xrdp

start and enable xrdp

This will ensure that XRDP remains running and accessible after a server restart.

Step 7: Allow XRDP Through Firewall

CentOS 10 comes with a firewall by default that blocks RDP connections until explicitly permitted.

sudo firewall-cmd –add-port=3389/tcp –permanent

sudo firewall-cmd –reload

sudo firewall-cmd --add-port=3389/tcp --permanent

The default RDP port is 3389. Remote desktop clients can connect by opening the port.

Step 8: Configure SELinux for XRDP

SELinux may prevent XRDP from accessing resources if it is not configured correctly.

sudo setsebool -P xrdp_can_connect_all 1

sudo setsebool -P xrdp_can_connect_all 1

This command will allow XRDP function without disabling SELinux completely, maintaining system security.

Step 9: Restart XRDP Service

Restart XRDP to apply the configuration changes.

sudo systemctl restart xrdp

sudo systemctl restart xrdp

By restarting, you can ensure that firewall, SELinux, and desktop environment settings have been correctly applied.

Step 10: Connect to CentOS 10 Using RDP Client

From your local computer:

  • Open Remote Desktop Connection for Windows or RDP Client (MacOS/Linux).
  • Enter your server’s IP address.
  • Enter your CentOS username or password to log in.

Common Troubleshooting Tips

XRDP is compatible with all remote desktop clients because it uses the standard RDP protocol. Sometime, CentOS 10 will not install xrdp and error occurs because CentOS 10 is end-of-life and its repositories are unavailable, so the solution is to migrate to a supported OS like CentOS Stream 9, Rocky Linux 9, or AlmaLinux 9 and then install XRDP.

  • Black screen after login: If you get a black screen after logging in, check that the desktop session is configured correctly.
  • Connection refused: Check XRDP service and firewall rules
  • Slow performance: Use XFCE instead of GNOME on low-resource servers

Conclusion

To install XRDP on CentOS 10, enable the EPEL repository, install the XRDP package, and set up a graphical desktop environment such as GNOME or XFCE. After configuring the desktop session, start and enable the XRDP server, open the port 3389 on the firewall and configure SELinux after configuring the desktop. After completing the steps, you can use any RDP client to remotely manage your CentOS 10 server.

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video