How To Install XRDP on Ubuntu 20.04

Table of Contents

Learn to Install XRDP on Ubuntu 20.04


It’s an open-source implementation of the Microsoft Server for providing fully functional RDP access to remote desktops to operating systems other than Microsoft Windows. Security issues are minimal when using the xrdp service on your internal network. In contrast, others would like to increase the security level of the XRP solution.

One of the most common methods of creating a secure connection with Linux is to use SSH to make certain connections between clients and servers.






Let’s get started,





Step 1: Setting up the desktop environment



Remote desktops are not commonly installed on Linux Servers. The first step to connecting through a GUI is to install it. First, update your system using the following command.


# apt-get update && apt-get upgrade -y



To install a desktop environment, run the Tasksel utility,  


# apt install tasksel -y



Run Tasksel by typing the following command,



# tasksel


You’ll see a new interface where you will find the Ubuntu desktop using the arrow key. Once you have installed all the packages, ensure your system will boot into the GUI. Use the following command to do so,


# systemctl set-default



To apply the changes, restart your system.




Step 2: Installing XRDP




Run the following command to install a remote desktop on your Ubuntu system,


# sudo apt install xrdp -y




If XRDP installation is successful, its service will be automatically started. Run the following command to check the service status,


# sudo systemctl status xrdp 



Step 3: Configuring Xrdp


To initiate a remote desktop session, the XRP server uses the necessary certificate file “/etc/ssl/private/ssl-cert-snakeoil. the key“. To make sure it works correctly, add the user xrdp to the group “ssl-cert” with the command below,



# sudo usermod -a -G ssl-cert xrdp



Run the following command to restart the Xrdp service,



# sudo systemctl restart xrdp



Step 4: Adjust the Firewall


Port 3389 is used by XRDP, the RDP protocol’s default port. The firewall must be configured to allow remote systems access to port 3389. Using the UFW firewall, you can open port 3389 for the LAN network using the following command.


# sudo ufw allow from to any port 3389



You will need to reload the UFW to apply the new rules. Use the following command to do so,


# sudo ufw reload


You can now access your system via RDP.




We have successfully installed the Xrdp service and are ready to connect.



Start the RDP client on Windows and enter the IP address of the Ubuntu system—type “mstsc” to launch the RDP client in the run window or command line.


Authentication is required once the remote system has established a connection. You must enter the credentials of the remote Ubuntu system to access the remote desktop.


I hope you have found this helpful article, and I hope you have gotten some information from it.

How to Install Remote Desktop on Ubuntu 18.04

How to install XRDP Server on CentOS 8


XRDP is an open-source remote desktop protocol (RDP) server allowing users to connect to a Linux desktop environment remotely.

Installing XRDP on Ubuntu allows users to remotely access their Ubuntu desktop environment from other devices, such as a Windows PC or a mobile device.

To install XRDP on Ubuntu, you can use the following command:
Sudo apt-get install xrdp

Yes, you will need to install the “tightvncserver” package as a dependency. You can do this with the following command:
Sudo apt-get install tightvncserver

XRDP should start automatically after installation. If it does not, you can start it manually by using the following command:
Sudo systemctl start xrdp

XRDP should start automatically after installation. If it does not, you can start it manually by using the following command:
Sudo systemctl start xrdp

You can use any RDP client software, such as Microsoft’s Remote Desktop Connection or Remmina, to connect to your Ubuntu desktop environment. Simply enter the IP address or hostname of the Ubuntu machine, along with your username and password, and you should be able to access the desktop.

If you are having trouble connecting to your Ubuntu desktop environment with XRDP, you can check the “xrdp.log” file located in the “/var/log/xrdp” directory for error messages. You can also try restarting XRDP with the following command:
Sudo systemctl restart xrdp

XRDP is designed to be secure, but as with any remote desktop protocol, there is always a risk of unauthorized access. It is recommended that you use a strong password and keep your XRDP installation up-to-date with the latest security patches. You can also configure XRDP to use SSL encryption for added security.

Yes, XRDP can be used with other desktop environments, but you may need to install additional software and make configuration changes to get it to work properly.

Make a Comment
Share on
VPSie Cloud service

Unlock Your

20% Discount

The First 3 orders get 20% discount! Try Sign up on VPSie to get a chance to get the discount.