How to Install and configure xRDP Server on Ubuntu 20.04

How to Install and configure xRDP Server on Ubuntu 20.04

xRDP is an open source program that allows you to use a desktop session to work with a distant computer as if it were a local computer.

Setting up a desktop environment

We must first establish a desktop environment for our Ubuntu server machine.

$ sudo apt install ubuntu-desktop

xRDP installation and configuration

Run the following command to install the xRDP package:

$ sudo apt install xrdp

You must also provide the xrdp user access to the /etc/ssl/private/ssl-cert-snakeoil.key file. By default, members of the ssl-cert group have access to it.

$ sudo adduser xrdp ssl-cert

Restart the service if necessary.

$ sudo systemctl restart xrdp

Configuration of the firewall

You must grant access to port 3389.

$ sudo ufw allow 3389

It’s safer to restrict access to your IP address or network.

$ sudo ufw allow from to any port 3389

To connect to the remote desktop, the best practice is to utilize an SSH tunnel and set xRDP to only accept local connections.

xRDP connection to Ubuntu 20.04 server

Please keep in mind that the person who will connect to xRDP must first log out! It’s now time to connect to your Ubuntu server through xRDP. Use any RDP client to connect to your server.


Enter your Ubuntu server’s user credentials.

You should now be able to see the remote desktop’s initial screen.


Follow us TwitterFacebookLinkedIn

Open Source Listing

Previous Post
Next Post

Leave a Reply