Back to blog
GuidesSeptember 16, 2026ยท3 min read

How to Install XRDP on Ubuntu

How to Install XRDP on Ubuntu

How to Install XRDP on Ubuntu

Installing xrdp on Ubuntu requires sudo apt update followed by sudo apt install xrdp -y. In this article, you will find how to do this, group permission needed to ensure it works properly, which firewall port should be opened, and the most common reason for RDP to connect to a black screen.

How do I install xrdp on Ubuntu?

You need to use two commands below: sudo apt update followed by sudo apt install xrdp -y.

$ sudo apt update
$ sudo apt install xrdp -y

According to one commonly used xrdp install guide, this command is enough for RDP server installation and starting it โ€” all other actions below relate to permissions, firewall settings, and behavior of the session once the connection is established.

Why do I need to add the xrdp user to the ssl-cert group?

xrdp should have the ability to read the SSL certificate it generates to ensure encryption for the RDP session. The command below ensures the proper permissions and does not make the SSL certificate accessible for anyone else.

$ sudo usermod -a -G ssl-cert xrdp
$ sudo systemctl restart xrdp

This step is documented as part of the standard xrdp setup along with the firewall configuration instructions. The lack of this command may be the reason why the connection attempt ends in TLS handshake error and not in showing the login page.

How do I open the firewall for RDP connections?

You can use ufw to allow port 3389 either for the specific subnet or for any IP.

Rule

Command

Exposure

Scoped to one network

sudo ufw allow from 192.168.1.0/24 to any port 3389

Only that subnet can reach RDP

Open to everyone

sudo ufw allow 3389/tcp

Any IP can attempt to connect

According to the same guide, you should use the command for the first case (sudo ufw allow from 192.168.1.0/24 to any port 3389) and sudo ufw reload. It is recommended to use the first form of the rule if you plan to use your RDP for connecting to the server from the internet because RDP is one of the most popular scanning targets.

Why do I get a black screen after logging in with RDP?

The most common reason is that there is an existing local or graphical session of this user. xrdp cannot attach to the session and start working. Thus, you need to logout from the session locally and establish RDP connection in order to start a new one.

It is a documented gotcha, not a bug that you need to analyze. The same install guide mentions it and claims that it is the problem reported by several users. The actual solution is to log out from the existing session before connecting, as xrdp can start only new session.

How do I check whether xrdp is running?

You should use sudo systemctl status xrdp. If you want to check it after configuration changes, you should use sudo systemctl restart xrdp instead.

$ sudo systemctl status xrdp
$ sudo systemctl restart xrdp

status just shows the current state of the service and nothing else, while restart is what actually picks up a configuration change. Checking status after editing the config file is not enough to apply changes โ€” you need to restart the service explicitly.

Our VPS plans and Bare Metal servers allow you to have full control over apt, systemd, and firewall, so configuring remote access through xrdp will be exactly as described in this article.


Get started with Orbit Servers

Low-latency VPS, bare metal, and colocation across the US, EU, and APAC - provisioned instantly and built for performance-critical workloads.

Get started
J

Written by

Julius

Related posts