How to install a xRDP

This guide will walk you through the steps on installing a xRDP. xRDP is an open source remote desktop protocol(rdp) server that lets you connect to your server on any Windows machine.

For AutoInstallation

For the Auto Installation, you just need to download the script in your server and need to execute that script. Just run the following commands in your server.(Installation process may take few minutes)

chmod a+x

Please note: This will not work if you have a CLI based server as it would drop the connection.

Manual Installation for CentOS

Installing EPEL repository and xRDP server

yum -y install epel-release
yum -y install xrdp

Installing MATE desktop

yum groupinstall -y "MATE Desktop"
echo "mate-session" > ~/.Xclients
chmod a+x ~/.Xclients

Add port to firewall

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

To change TLS Version

sed -i 's/ssl_protocols=TLSv1.2, TLSv1.3/ssl_protocols=TLSv1, TLSv1.1/g' /etc/xrdp/xrdp.ini

Starting the Server

systemctl start xrdp.service

Check if it's running

netstat -an | grep 3389

This should fetch you an output similar to: tcp 0 0* LISTEN

Auto start the Server on boot

 systemctl enable xrdp.service

Manual installation for Ubuntu

If you do not have a GUI based server, you can install GNOME Desktop environment.

Install the latest system packages on Ubuntu

apt-get update && apt-get dist-upgrade

Install xRDP

apt-get install xrdp

Start xRDP and enable autostart onboot

systemctl start xrdp && systemctl enable xrdp

Create xrdp user and an SSL-Cert

adduser xrdp ssl-cert

Restart xRDP

systemctl restart xrdp

You can now use the IP of the VPS and connect using Remote Desktop Connection on your Windows machine.

Logging in to xRDP

Open the Remote Desktop Application on Windows (or Vinagre if you are on Linux and select RDP),


Enter the VPS IP address in the box marked below and hit connect,

rdp VPS IP

Next you will find this screen open, here type your SSH login details which you used when installing the above packages,


Done! You will be redirected to your MATE GUI Desktop!