How To

Install Xrdp Remote Desktop on Ubuntu: Setup and Connect

Xrdp is an open-source server that lets you connect to your Ubuntu machine from another computer using the Remote Desktop Protocol (RDP). You get a full graphical desktop session over the network, just like sitting in front of the machine itself.

This guide shows you how to install Xrdp remote desktop on Ubuntu and connect to it from Windows, macOS, or Linux.

Install a Desktop Environment First

Ubuntu servers do not come with a desktop environment by default. If you already run Ubuntu Desktop, skip this step.

You have two good options:

  • Gnome is the default Ubuntu desktop. It looks polished but uses more memory.
  • Xfce is lightweight and fast, making it a better fit for remote servers with limited resources.

To install Gnome:

bashsudo apt updatesudo apt install ubuntu-desktop

To install Xfce instead:

bashsudo apt updatesudo apt install xubuntu-desktop

Downloading a full desktop environment takes a few minutes depending on your connection speed.

Install Xrdp Remote Desktop on Ubuntu

Xrdp is available in the default Ubuntu repository. Install it with:

bashsudo apt install xrdp

The service starts on its own after install. Confirm it is running:

bashsudo systemctl status xrdp

You should see active (running) in the output.

By default, Xrdp reads an SSL certificate that only users in the ssl-cert group can access. Add the xrdp user to that group:

bashsudo adduser xrdp ssl-cert

Restart Xrdp so the change takes effect:

bashsudo systemctl restart xrdp

Xrdp configuration files live in /etc/xrdp/. The main file is xrdp.ini. For basic connections, you do not need to change anything in there. If you want to change which desktop Xrdp launches, edit the startwm.sh file.

Configure the Firewall

Xrdp listens on port 3389. Open that port in your firewall. To allow access from a specific subnet only (the safer choice):

bashsudo ufw allow from 192.168.33.0/24 to any port 3389

To allow access from anywhere (not recommended on public servers):

bashsudo ufw allow 3389

For extra security, consider setting up an SSH tunnel. This routes your RDP traffic through an encrypted SSH connection without opening port 3389 to the outside world at all.

<strong>Tip:</strong>&nbsp;If this server is reachable from the public internet, restrict port 3389 to your IP address only. Leaving it fully open is a security risk.

Connect From Windows, Mac, or Linux

On Windows: Search for “Remote Desktop Connection” in the Start menu. Enter your server’s IP address in the “Computer” field and click Connect. Enter your Ubuntu username and password when asked.

On macOS: Install the Microsoft Remote Desktop app from the Mac App Store. Add your server IP and connect using your credentials.

On Linux: Use Remmina or Vinagre. Both support RDP and are available in most distribution repositories.

After logging in, your Gnome or Xfce desktop will appear. You can interact with it using your keyboard and mouse just as you would on a local machine.

Xrdp is one of the quickest ways to get remote desktop access on Ubuntu. The setup takes just a few minutes, and once it is working, the experience feels close to using the machine in person. It is a great option for server admin tasks, remote work, or testing GUI apps on a headless machine. Got questions? Leave a comment below.

Cyber Defence

Recent Posts

Install Docker on Ubuntu 20.04: Complete Step-by-Step Guide

Docker is an open-source platform that lets you package and run applications inside containers. Each container…

19 seconds ago

Install PostgreSQL on Ubuntu: Database Setup and Admin Guide

PostgreSQL (often called Postgres) is an open-source relational database system. It supports advanced features like JSON…

54 minutes ago

Tomcat 9 on Ubuntu 20.04: Install, Configure, and Start

Apache Tomcat is an open-source web server and Java servlet container. It is one of the…

1 hour ago

Automatic Updates on Ubuntu: Set Up unattended-upgrades

Keeping your Ubuntu system updated is one of the best ways to protect it. Security…

2 hours ago

Best OSINT Tools for Intelligence Analysts 2026: Evidence-Grading Workflow

Intelligence analysts do not use OSINT only to collect information. They use it to turn…

1 day ago

Best OSINT Reconnaissance Tools 2026 for Ethical Security Research

OSINT reconnaissance is the first stage of ethical security research. Before testing anything, a security…

1 day ago