How to Install Xrdp on Ubuntu 24.04: Step-by-Step Tutorial
Would you like to manage your Ubuntu 24.04 server with a graphical interface instead of the command line? Ubuntu Server doesn't come with a desktop interface out of the box. This is intentional, as servers are built to be lightweight. However, nothing prevents you from installing one yourself, and when you do, you'll need Xrdp to access it remotely.
Xrdp is an open-source tool that lets you use standard Remote Desktop Protocol (RDP) clients like the one built into Windows to get a full graphical session on your Ubuntu server. Think of it as the visual alternative to SSH. It's perfect for remote administration, development, or running any app that needs a GUI.
This guide will walk you through setting up Xrdp on your Ubuntu 24.04 server, step by step.
#What is Xrdp and Why Use it on Ubuntu 24.04
It's an open-source Remote Desktop Protocol (RDP) server that brings graphical remote access to Linux systems. This means you can use common RDP clients to connect to your Linux machine and get a full-blown desktop experience..
#Why use Xrdp on Ubuntu 24.04?
Here are some reasons why you might want to set up Xrdp on your Ubuntu 24.04 server:
-
Work from anywhere: It gives you secure access to your Ubuntu desktop from anywhere with an internet connection.
-
Cross-platform compatibility: You can connect from Windows, macOS, or another Linux machine using standard RDP clients you probably already have.
-
Full Graphical Desktop Experience: It is great for running GUI applications like text editors, browsers, or monitoring tools that aren’t as convenient in the terminal.
-
Supports multiple users: Xrdp can handle separate desktop sessions for different users at the same time, without interfering with one another.
-
Security and authentication: Xrdp supports SSL/TLS encryption and integrates with Ubuntu’s existing user authentication system.
-
Cost-effective solution: It’s open-source and works smoothly with efficient desktop environments such as XFCE.
Linux Dedicated Servers with Full Control
Optimize your workloads with customizable Linux bare metal servers, offering high-performance processors, reliable storage, and full root access.
#Prerequisites
Before proceeding with the installation, ensure you have the following:
-
Ubuntu 24.04 server with at least 2 GB RAM.
-
A non-root user with sudo privileges.
-
A remote desktop client on your local computer. Windows has a default client, while on Linux you can use Remmina or FreeRDP, and on macOS there’s the Microsoft Remote Desktop app.
#Installing Xrdp on Ubuntu 24.04
This section will guide you through the installation process of Xrdp on your Ubuntu 24.04 server.
#Step 1: Connect to your server via SSH
After deploying and setting up your server, log in to the server via SSH using the format:
ssh user@ip_address
Outputubuntu@5.199.162.156's password:
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-62-generic aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Thu Sep 25 08:45:36 EEST 2025
System load: 0.0 Processes: 153
Usage of /: 2.3% of 95.82GB Users logged in: 1
Memory usage: 1% IPv4 address for eth0: 5.199.162.156
Swap usage: 0%
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
#Step 2: Update system packages
Before installing new software, it’s good practice to update your packages:
sudo apt update && sudo apt upgrade -y
OutputHit:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease
Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 Packages [15.3 MB]
Get:6 http://ports.ubuntu.com/ubuntu-ports noble/universe Translation-en [5982 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 Components [3573 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 c-n-f Metadata [295 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports noble/multiverse arm64 Packages [223 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports noble/multiverse Translation-en [118 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports noble/multiverse arm64 Components [31.6 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports noble/multiverse arm64 c-n-f Metadata [7152 B]
Get:13 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 Packages [1514 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports noble-updates/main Translation-en [282 kB]
Get:15 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 Components [172 kB]
Get:16 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 c-n-f Metadata [15.0 kB]
Get:17 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe arm64 Packages [1420 kB]
Get:18 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe Translation-en [299 kB]
Get:19 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe arm64 Components [376 kB]
Get:20 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe arm64 c-n-f Metadata [29.8 kB]
Get:21 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted arm64 Packages [2705 kB]
Get:22 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted Translation-en [441 kB]
Get:23 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted arm64 Components [212 B]
Get:24 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted arm64 c-n-f Metadata [492 B]
Get:25 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse arm64 Packages [27.0 kB]
Get:26 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse Translation-en [5500 B]
Get:27 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse arm64 Components [212 B]
Get:28 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse arm64 c-n-f Metadata [304 B]
Get:29 http://ports.ubuntu.com/ubuntu-ports noble-backports/main arm64 Packages [39.9 kB]
Get:30 http://ports.ubuntu.com/ubuntu-ports noble-backports/main Translation-en [9152 B]
Get:31 http://ports.ubuntu.com/ubuntu-ports noble-backports/main arm64 Components [3584 B]
Get:32 http://ports.ubuntu.com/ubuntu-ports noble-backports/main arm64 c-n-f Metadata [272 B]
Get:33 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe arm64 Packages [30.1 kB]
Get:34 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe Translation-en [17.4 kB]
Get:35 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe arm64 Components [19.2 kB]
Get:36 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe arm64 c-n-f Metadata [1300 B]
Get:37 http://ports.ubuntu.com/ubuntu-ports noble-backports/restricted arm64 Components [216 B]
Get:38 http://ports.ubuntu.com/ubuntu-ports noble-backports/restricted arm64 c-n-f Metadata [116 B]
Get:39 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse arm64 Components [212 B]
Get:40 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse arm64 c-n-f Metadata [116 B]
Get:41 http://ports.ubuntu.com/ubuntu-ports noble-security/main arm64 Packages [1244 kB]
Get:42 http://ports.ubuntu.com/ubuntu-ports noble-security/main Translation-en [197 kB]
Get:43 http://ports.ubuntu.com/ubuntu-ports noble-security/main arm64 Components [18.5 kB]
Get:44 http://ports.ubuntu.com/ubuntu-ports noble-security/main arm64 c-n-f Metadata [8480 B]
Get:45 http://ports.ubuntu.com/ubuntu-ports noble-security/universe arm64 Packages [862 kB]
Get:46 http://ports.ubuntu.com/ubuntu-ports noble-security/universe Translation-en [195 kB]
Get:47 http://ports.ubuntu.com/ubuntu-ports noble-security/universe arm64 Components [52.2 kB]
Get:48 http://ports.ubuntu.com/ubuntu-ports noble-security/universe arm64 c-n-f Metadata [17.6 kB]
Get:49 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted arm64 Packages [2584 kB]
Get:50 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted Translation-en [419 kB]
Get:51 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted arm64 Components [212 B]
Get:52 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted arm64 c-n-f Metadata [468 B]
Get:53 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse arm64 Packages [25.7 kB]
Get:54 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse Translation-en [5228 B]
Get:55 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse arm64 Components [212 B]
Get:56 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse arm64 c-n-f Metadata [384 B]
Fetched 39.0 MB in 6s (6652 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
117 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
linux-headers-6.8.0-84 linux-headers-6.8.0-84-generic linux-image-6.8.0-84-generic linux-modules-6.8.0-84-generic linux-tools-6.8.0-84
linux-tools-6.8.0-84-generic
The following packages will be upgraded:
apport apport-core-dump-handler base-files bind9-dnsutils bind9-host bind9-libs bsdextrautils bsdutils cloud-init coreutils dirmngr dpkg eject
fdisk flash-kernel fwupd git git-man gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv gzip iproute2 iputils-ping
iputils-tracepath jq keyboxd landscape-common libblkid1 libc-bin libc-dev-bin libc-devtools libc6 libc6-dev libfdisk1 libfwupd2 libgnutls30t64
libjq1 libmount1 libnetplan1 libnss-systemd libopeniscsiusr libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g
libperl5.38t64 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 libsmartcols1 libsqlite3-0 libssh-4 libsystemd-shared libsystemd0
libtiff6 libudev1 libudisks2-0 libuuid1 libxml2 linux-headers-generic linux-headers-virtual linux-image-virtual linux-libc-dev
linux-tools-common linux-virtual locales motd-news-config mount netplan-generator netplan.io open-iscsi openssh-client openssh-server
openssh-sftp-server perl perl-base perl-modules-5.38 powermgmt-base python-apt-common python3-apport python3-apt python3-distupgrade
python3-netplan python3-problem-report python3-software-properties python3.12 python3.12-minimal snapd software-properties-common sudo systemd
systemd-dev systemd-hwe-hwdb systemd-resolved systemd-sysv systemd-timesyncd u-boot-tools ubuntu-pro-client ubuntu-pro-client-l10n
ubuntu-release-upgrader-core udev udisks2 util-linux uuid-runtime vim vim-common vim-runtime vim-tiny xxd
117 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
61 standard LTS security updates
Need to get 233 MB of archives.
After this operation, 235 MB of additional disk space will be used.
...
#Step 3: Install a desktop environment
Next, install a lightweight desktop environment. XFCE is recommended for remote desktop use due to its low resource consumption:
sudo apt install xfce4 xfce4-goodies -y
OutputReading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
7zip accountsservice ... acl activity-log-manager adwaita-icon-theme alsa-topology-conf ...
... (A large number of dependency packages are required and listed here) ...
xfce4-xkb-plugin xfconf xfdesktop4 xfdesktop4-data xfonts-base ... xserver-xorg-video-vesa yelp yelp-xsl zeitgeist-core
Suggested packages:
7zip-standalone 7zip-rar gnome-control-center ... (Suggested dependency list omitted) ... zeitgeist-datahub
Recommended packages:
printer-driver-braille appmenu-qt jayatana ...
The following NEW packages will be installed:
7zip accountsservice accountsservice-ubuntu-schemas ...
...
xfwm4 xiccd xinit xinput xorg xorg-docs-core xserver-common xserver-xorg xserver-xorg-core
0 upgraded, **721 newly installed**, 0 to remove and 0 not upgraded.
Need to get 317 MB of archives.
After this operation, **1331 MB of additional disk space will be used.**
Get:1 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 libasound2-data all 1.2.11-1ubuntu0.1 [21.1 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 libasound2t64 arm64 1.2.11-1ubuntu0.1 [386 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports noble-updates/main arm64 bluez arm64 5.72-0ubuntu5.4 [1364 kB]
# --- Download log truncated: Packages 4 through 721 would be listed here ---
Get:57 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 libunity-gtk2-parser0 arm64 0.0.0+18.04.20171202-0u
...
#Step 4: Install Xrdp
With the desktop environment in place, it's time to install the Xrdp server itself.
sudo apt install xrdp -y
Once the installation completes, Xrdp will automatically start and be enabled to launch at boot.
OutputReading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libfuse2t64 libpipewire-0.3-modules-xrdp pipewire-module-xrdp xorgxrdp
Suggested packages:
pipewire-bin guacamole
The following NEW packages will be installed:
libfuse2t64 libpipewire-0.3-modules-xrdp pipewire-module-xrdp xorgxrdp xrdp
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 700 kB of archives.
After this operation, 4551 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 libfuse2t64 arm64 2.9.9-8.1build1 [89.9 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 xrdp arm64 0.9.24-4 [525 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 libpipewire-0.3-modules-xrdp arm64 0.2-2 [19.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 pipewire-module-xrdp all 0.2-2 [3800 B]
Get:5 http://ports.ubuntu.com/ubuntu-ports noble/universe arm64 xorgxrdp arm64 1:0.9.19-1 [62.3 kB]
Fetched 700 kB in 1s (740 kB/s)
Selecting previously unselected package libfuse2t64:arm64.
(Reading database ... 162335 files and directories currently installed.)
Preparing to unpack .../libfuse2t64_2.9.9-8.1build1_arm64.deb ...
Unpacking libfuse2t64:arm64 (2.9.9-8.1build1) ...
Selecting previously unselected package xrdp.
Preparing to unpack .../xrdp_0.9.24-4_arm64.deb ...
Unpacking xrdp (0.9.24-4) ...
Selecting previously unselected package libpipewire-0.3-modules-xrdp:arm64.
Preparing to unpack .../libpipewire-0.3-modules-xrdp_0.2-2_arm64.deb ...
Unpacking libpipewire-0.3-modules-xrdp:arm64 (0.2-2) ...
Selecting previously unselected package pipewire-module-xrdp.
Preparing to unpack .../pipewire-module-xrdp_0.2-2_all.deb ...
Unpacking pipewire-module-xrdp (0.2-2) ...
Selecting previously unselected package xorgxrdp.
Preparing to unpack .../xorgxrdp_1%3a0.9.19-1_arm64.deb ...
Unpacking xorgxrdp (1:0.9.19-1) ...
Setting up libpipewire-0.3-modules-xrdp:arm64 (0.2-2) ...
Setting up xorgxrdp (1:0.9.19-1) ...
Setting up libfuse2t64:arm64 (2.9.9-8.1build1) ...
Setting up xrdp (0.9.24-4) ...
Generating 2048 bit rsa key...
ssl_gen_key_xrdp1 ok
saving to /etc/xrdp/rsakeys.ini
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp-sesman.service → /usr/lib/systemd/system/xrdp-sesman.service.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /usr/lib/systemd/system/xrdp.service.
Setting up pipewire-module-xrdp (0.2-2) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.6) ...
Scanning processes...
Scanning candidates...
Scanning linux images...
Pending kernel upgrade!
Running kernel version:
6.8.0-62-generic
Diagnostics:
The currently running kernel version is not the expected kernel version 6.8.0-84-generic.
Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
Restarting services...
Service restarts being deferred:
/etc/needrestart/restart.d/dbus.service
systemctl restart getty@tty1.service
systemctl restart serial-getty@ttyAMA0.service
systemctl restart systemd-logind.service
systemctl restart unattended-upgrades.service
No containers need to be restarted.
User sessions running outdated binaries:
root @ session #1: sshd[1128]
root @ user manager service: systemd[1133]
No VM guests are running outdated hypervisor (qemu) binaries on this host.
#Step 5: Check Xrdp service status
You can check the service status by running:
sudo systemctl status xrdp
If everything is set up correctly, you should see that the service is active and running.
Output● xrdp.service - xrdp daemon
Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-09-25 09:11:55 EEST; 5min ago
Docs: man:xrdp(8)
man:xrdp.ini(5)
Process: 27177 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
Process: 27186 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 27187 (xrdp)
Tasks: 1 (limit: 28692)
Memory: 824.0K (peak: 1.6M)
CPU: 31ms
CGroup: /system.slice/xrdp.service
└─27187 /usr/sbin/xrdp
Sep 25 09:11:54 demo systemd[1]: Starting xrdp.service - xrdp daemon...
Sep 25 09:11:54 demo xrdp[27186]: [INFO ] address [0.0.0.0] port [3389] mode 1
Sep 25 09:11:54 demo xrdp[27186]: [INFO ] listening to port 3389 on 0.0.0.0
Sep 25 09:11:54 demo xrdp[27186]: [INFO ] xrdp_listen_pp done
Sep 25 09:11:54 demo systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: No such file or directory
Sep 25 09:11:55 demo systemd[1]: Started xrdp.service - xrdp daemon.
Sep 25 09:11:56 demo xrdp[27187]: [INFO ] starting xrdp with pid 27187
Sep 25 09:11:56 demo xrdp[27187]: [INFO ] address [0.0.0.0] port [3389] mode 1
Sep 25 09:11:56 demo xrdp[27187]: [INFO ] listening to port 3389 on 0.0.0.0
Sep 25 09:11:56 demo xrdp[27187]: [INFO ] xrdp_listen_pp done
#Configuring Xrdp for Your Desktop Environment
To make sure Xrdp launches the XFCE desktop when you connect, you’ll need to adjust a few settings.
#Step 1: Add Xrdp to SSL-Cert Group
First, ensure the xrdp user is part of the ssl-cert group to access the SSL certificate.
Add the xrdp user to the ssl-cert group with this command:
sudo adduser xrdp ssl-cert
Outputinfo: Adding user `xrdp' to group `ssl-cert' ...
#Step 2: Configure the Xrdp session
Next, create a simple configuration file in your home directory so Xrdp knows which desktop to start:
echo "xfce4-session" > ~/.xsession
Each user who intends to connect via Xrdp must perform this step in their own home directory.
#Step 3: Restart Xrdp service
After configuring your session, restart Xrdp to apply the changes:
sudo systemctl restart xrdp
#Step 4: Configure the Firewall (UFW) to Allow RDP Connections
For Xrdp to accept incoming connections, you must configure UFW to allow traffic on the default port for RDP, which is 3389. To allow incoming connections on the default RDP port from a specific IP address, run:
sudo ufw allow from <trusted_IP_address> to any port 3389
Replace <trusted_IP_address> with the actual IP address of your client machine.
OutputRule added
If UFW is inactive, enable it:
sudo ufw enable
You will be prompted to confirm. Type y and press Enter.
Then verify that your rules are active:
sudo ufw status
You should see that port 3389 is now open for your chosen IP address.
OutputStatus: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
3389 ALLOW <Trusted_IP_address>
22/tcp (v6) ALLOW Anywhere (v6)
#Connect to Ubuntu 24.04 via Remote Desktop
Once everything is configured, you can connect to your Ubuntu 24.04 server using any RDP client. Here’s how it looks on Windows, though the process is similar on macOS or Linux.
#Step 1: Open remote desktop connection
Press Windows key + R, type mstsc, and hit Enter or simply search for "Remote Desktop Connection" in the Start Menu.
#Step 2: Enter connection details
In the dialog box, enter your server’s IP address in the "Computer" field, enter your Ubuntu username in the "User name" field, then click "Connect".
#Step 3: Accept the security certificate
You’ll likely see a message about the identity of the remote computer. Go ahead and click Yes to continue.
#Step 4: Enter user credentials
When the Xrdp login window appears, make sure the session type is set to Xorg. Enter your Ubuntu username and password, and click OK.
You should now see your XFCE desktop environment ready to use.
Keep in mind that each user can only have one active session at a time. If you log in again without ending a previous session, you might run into a black screen or connection error.
#Conclusion
By installing Xrdp on your Ubuntu 24.04 server, you’ve given yourself a flexible, graphical way to manage your system remotely. Whether you’re a developer, administrator, or just someone who prefers a desktop interface, this setup provides an easy, secure way to access your server from anywhere. From here, you can explore further configurations and security enhancements to tailor your remote desktop experience to your specific needs.
Starting at just $3.24 / month, get virtual servers with top-tier performance.




