How to install XRDP (Remote Desktop) Server on Centos 8

XRDP is an open-source implementation of the Microsoft Remote Desktop (RDP) that allows you to graphically control your system. With RDP, you can log in to the remote machine the same as you had logged into the local machine. It uses Port 3389 for its connection. In this tutorial, we will look at how to set up the Remote desktop Connection on Centos 8.

Installing CentOS Desktop Environment

Generally, Linux Server does not have a remote desktop installed. If you want to connect through a GUI, the first step is to install it. GNOME is the default desktop environment in Centos 8. To install GNOME on your remote machine, open up the terminal and run the following command:

# dnf groupinstall "Server with GUI"

Install Desktop GUI

Depending on your system, downloading and install the GNOME packages and dependencies may take some time.

Installing XRDP

XRDP is available in the EPEL software repository. If EPEL is not enabled on your system, enable it by typing the following command:

# dnf install epel-release

Install EPEL Repository

Now install the XRDP package.

# dnf install xrdp

Install XRDP

Once the installation is complete enable and start the XRDP service.

# systemctl enable xrdp

# systemctl start xrdp

To verify the XRDP is running, type the following command:

# systemctl status xrdp

If the XRDP service is running, the output should be like this as shown in the figure below:

Check RDP Status

You can also verify the XRDP service state by using the following command:

# netstat –atnp | grep 3389

Check RDP Port

Port should be Listening like below:

Result of the port check

Configuring XRDP

The configuration file is /etc/xrdp/xrdp.ini. By default, XRDP uses windows desktop, which is in our case is GNOME. For the connection, you don’t need to make any changes in the configuration file. This file is divided into different sections and allows you to set global configuration settings such as security and listening address and you can also create different XRDP login sessions.

Open up configuration file /etc/xrdp/xrdp.ini and add the following line at the end of the file.

exec gnome-session

After adding the above line restart the XRDP service, using the following command:

# systemctl restart xrdp

Configure the Firewall

If your firewall is running on your Centos 8, just add the rule to allow the XRDP port/service to allow traffic for the XRDP connection.

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

# firewall-cmd –reload

Connecting to the XRDP using Windows Machine

Windows by default uses a remote desktop client. To connect through Centos 8 using remote desktop type Remote desktop connection in the windows search bar and press enter.

Windows RDP Client

Enter the IP address of the remote machine and click on connect.

Remote Desktop Connection

It will prompt you to the login screen for the credentials. Enter username and password and click on Ok.

XRDP Login

Once logged in, you should see the default GNOME Desktop. Now you can start interacting with the remote machine.

If you are using Mac OS, install the Microsoft Remote Desktop application from Mac App Store, whereas the Linux user can use RDP clients like Remmina or Vinagre.


In this tutorial, we have learned how to configure Remote desktop Connection in Centos 8 and access using a windows machine. Using XRDP, allows you to manage and control your machine remotely from your local desktop machine with the use of a graphical interface.