Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Set Up Remote Desktop on an Ubuntu 24.04 VPS With xrdp

A complete Ubuntu 24.04 guide to adding XFCE and xrdp to a VPS, configuring the user session, securing TCP 3389 and troubleshooting common RDP failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add a graphical desktop to a minimal Ubuntu VPS, install XFCE and xrdp, select XFCE for the RDP user, open TCP 3389 in both the VPS provider firewall and the guest firewall, then connect with an RDP client. The procedure below is written for Ubuntu 24.04 and keeps SSH available as a recovery channel. It also explains the common timeout, certificate, login-loop and black-screen failures.

What you are installing

A minimal VPS usually has no graphical desktop. xrdp is an RDP server: it accepts a Remote Desktop Protocol connection and starts a Linux graphical session for the account that logs in. On Ubuntu, its main configuration file is /etc/xrdp/xrdp.ini, and its primary log is /var/log/xrdp.log. The Ubuntu Noble manpage lists package version 0.9.24-4ubuntu0.1; that number identifies the package documented by that manpage, not a timeless version requirement.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The lightweight XFCE desktop is a practical match for a small VPS. Installing xrdp without a desktop environment may produce a successful network connection but no useful desktop session. The commands below install XFCE, configure xrdp to start it, and enable the service at boot.

Prerequisites and decisions

  • An Ubuntu VPS: The documented command sequence targets Ubuntu 24.04. Package names and service behavior can differ on other releases.
  • SSH access: Perform the installation over SSH first. Leave SSH enabled until RDP is tested so a failed graphical login cannot lock you out.
  • A regular Linux account with a password: Use that account for RDP. An SSH key supplied by a cloud provider is not, by itself, an xrdp password credential. Do not assume the provider’s root or key-only login will work at the xrdp screen.
  • Administrative privileges: The account running the commands needs sudo, or you must use the provider’s console to perform equivalent administrative actions.
  • A network path to the VPS: You need the VPS public IP (or a reachable private address) and permission to add a TCP 3389 rule in the provider’s security group, network ACL or equivalent control.

Decide who should be able to reach RDP before opening the port. A rule limited to a known office, home or VPN address is safer than allowing every source on the internet.

Install XFCE and xrdp over SSH

1. Update package metadata and install the desktop and server

SSH to the VPS with your normal administrative account, then run:

sudo apt update
sudo apt install xfce4 xfce4-session xrdp
sudo systemctl enable xrdp

xfce4 supplies the desktop, xfce4-session provides the session startup component, and xrdp supplies the RDP service. The installation can download a substantial set of desktop packages, so allow time and disk space for the transaction to finish. If apt asks you to confirm, review the package list and continue only when the VPS has enough storage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Apply the Ubuntu 24 certificate-group step when needed

The Ubuntu 24 procedure documents adding the xrdp service account to the certificate group:

sudo adduser xrdp ssl-cert

Run this when the installed package and service require certificate access, particularly if the service log reports certificate or permission errors. Adding the group does not replace restarting the service; group membership is used by new service processes.

3. Select XFCE for the RDP user

Run the next command as the Linux user who will sign in through RDP, not as a different administrator account:

echo xfce4-session >~/.xsession
sudo systemctl restart xrdp

The .xsession file tells xrdp to start XFCE for that user. If several people will use the VPS, each account needs its own correctly owned ~/.xsession file. Restarting xrdp applies the session selection and reloads the service.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Check that the service is running

Before testing from another computer, inspect the service locally:

sudo systemctl status xrdp --no-pager

A running service should report an active state. If it is failed, read the error and then inspect /var/log/xrdp.log. The status check does not test the provider firewall; a healthy local service can still be unreachable from the internet.

Open the RDP network path without exposing more than necessary

Provider-side rule

VPS platforms commonly filter traffic before it reaches Ubuntu. Add an inbound rule in the provider’s security group, firewall or network ACL for TCP port 3389. Set the source to the public address range that actually needs access. If the provider has separate IPv4 and IPv6 controls, configure only the address families you intend to use.

A provider rule alone is not sufficient when Ubuntu’s own firewall blocks the connection, and a UFW rule alone cannot bypass a provider-level deny.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Guest firewall rule

If UFW is active, Ubuntu’s remote-desktop documentation shows this range command for its documented remote-desktop modes:

sudo ufw allow 3389:3390/tcp
sudo ufw reload

An xrdp-only VPS normally needs only 3389, so a narrower rule is preferable. For example, the following permits one illustrative trusted public address; replace that example address with the address or CIDR range you control:

sudo ufw allow from 198.51.100.24 to any port 3389 proto tcp
sudo ufw reload

Do not use the broad 3389–3390 range simply because it is convenient if no service uses 3390. Ubuntu documents 3390 for a different remote-desktop combination; xrdp’s standard listener is TCP 3389.

Confirm the effective policy

After changing UFW, check its status and verify that the rule is present:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ufw status

If the provider firewall allows 3389 but a connection still times out, compare the source address seen by the provider with the address in your UFW rule. Home and office connections can change public IPs, and a VPN can make the VPS see a different source range than expected.

Connect from Windows, Ubuntu or another RDP client

Windows

  1. Open Remote Desktop Connection by running mstsc, or open the Microsoft Remote Desktop client.
  2. Enter the VPS IP address as the computer name. Use a DNS name only when it resolves to the intended VPS address.
  3. Start the connection and accept the certificate warning only after verifying that the address is your server.
  4. At the xrdp login screen, choose the default Xorg session when that option is offered.
  5. Enter the regular Linux username and its local password. These are not necessarily the same credentials used by an SSH key.

Ubuntu and other systems

Remmina on Ubuntu is a compatible graphical option. Other clients can work when they support standard RDP and the xrdp project supports their protocol behavior. Client labels vary by operating system, but the essential values remain the VPS address, TCP 3389 and the Linux account credentials.

What a successful first login looks like

A successful session should open an XFCE desktop rather than return immediately to the client. Open a terminal in that desktop and confirm that you are the expected user. Disconnect from the client normally instead of terminating the VPS; the SSH session remains available if you need to inspect logs or change the configuration.

Troubleshoot by symptom

Connection refused or connection timeout

Work from the outside inward:

  1. Confirm that the client is using the current public IP and TCP 3389.
  2. Check the VPS provider’s inbound security rule and its source range.
  3. Check UFW with sudo ufw status and make sure an allow rule covers your actual source address.
  4. Over SSH, check sudo systemctl status xrdp --no-pager. A stopped or failed service cannot accept a connection.
  5. Review /var/log/xrdp.log for startup or listener errors.

A refusal usually means the host was reached but no service accepted the connection; a timeout more often indicates filtering or an incorrect address. Both symptoms can have several causes, so verify each layer rather than changing the xrdp configuration first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Black screen, immediate disconnect or login returns to the client

These symptoms commonly indicate that the desktop session did not start:

  • Confirm XFCE installation completed, including both xfce4 and xfce4-session.
  • As the affected login user, check that ~/.xsession contains xfce4-session and belongs to that user.
  • Do not create the file only in the administrator’s home directory if another account is logging in.
  • Restart xrdp after correcting the file: sudo systemctl restart xrdp.
  • Read /var/log/xrdp.log and inspect /etc/xrdp/xrdp.ini for errors or an unexpected session configuration.

If the client offers multiple session types, select the default Xorg session. A different selection can fail even when the service itself is running.

Certificate, permission or startup errors on Ubuntu 24

Check whether the xrdp service account is in the ssl-cert group:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
getent group ssl-cert

If xrdp is absent and the package requires the group, run:

sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp

Then read the service status and /var/log/xrdp.log again. Group changes affect newly started processes, which is why the restart matters.

One user works but another does not

xrdp starts a session per account. Compare the working and failing users’ home-directory permissions and ~/.xsession files. The file must be in the home directory of the user signing in and must contain the XFCE session command. Re-run the command as that user rather than writing it with sudo into the wrong home directory.

The desktop is usable but feels slow

RDP over the public internet adds input latency. Microsoft notes that the delay depends on network speed and the distance between you and the VM’s datacenter. Choose a VPS region geographically close to the people using it, avoid unnecessary visual effects in the desktop, and test from the same network where the work will occur. No authoritative performance figure establishes a universal latency or bandwidth threshold for this setup, so treat responsiveness as a property of your route, client and VPS location.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and maintenance practices

Limit who can reach 3389

RDP is an interactive login service, so avoid an unrestricted internet rule when a fixed source range is available. Keep the provider rule and UFW rule aligned, and remove temporary broad rules after testing. If your users’ addresses change frequently, use the narrowest practical network boundary rather than leaving the port open to every source.

Use a non-root account

Sign in with a regular Linux account and grant administrative access through sudo only when required. Keeping SSH available gives you a separate recovery path for changing the account password, repairing XFCE or disabling xrdp.

Patch through SSH or the provider console

Desktop packages add more software than a headless server. Keep Ubuntu packages maintained, but perform changes from SSH or the provider console so an RDP failure does not interrupt administration. Test a reboot only after confirming that xrdp is enabled and that your provider firewall rule persists.

Know the important files

Item Purpose
/etc/xrdp/xrdp.ini Main xrdp configuration file documented by the Ubuntu Noble manpage.
/var/log/xrdp.log Main xrdp log for listener, startup and session diagnostics.
~/.xsession Per-user session selector containing xfce4-session for this setup.
TCP 3389 Standard xrdp RDP port that must pass both provider and guest firewall controls.

xrdp versus other ways to administer an Ubuntu VPS

There is no single best access method. Choose based on whether you need a graphical application, how much software you want installed, and how much network exposure you can accept.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach Best fit Desktop and resource profile Client support Network considerations
Headless SSH Administration, automation and command-line workloads No graphical desktop; lowest desktop overhead SSH clients on all major platforms Uses SSH rather than RDP; keep it as the recovery path
XFCE with xrdp A lightweight graphical session on a minimal VPS Installs XFCE and its session packages; exact memory and disk requirements are not stated in the cited documentation RDP clients such as Windows Remote Desktop and Remmina Requires TCP 3389 through the provider and guest firewalls; restrict the source range
Ubuntu GNOME Remote Login Users who want Ubuntu’s built-in GNOME remote-desktop modes Uses the GNOME desktop stack; exact resource requirements are not stated here Depends on the GNOME remote-desktop mode and a compatible client Ubuntu documents separate Desktop Sharing and Remote Login modes, with TCP 3389 and, when both modes are enabled, 3390

xrdp is an independent RDP server, while Ubuntu’s GNOME documentation describes remote access modes integrated with the GNOME desktop. On a minimal VPS where you specifically want a separate RDP service and a lighter desktop, XFCE with xrdp is the more direct workflow. If you only need commands, installing any desktop is unnecessary overhead; use SSH instead.

Removal or rollback

If you decide the graphical service is not needed, first remove the network exposure, then disable xrdp while keeping SSH available:

sudo ufw delete allow 3389:3390/tcp
sudo systemctl disable --now xrdp

Delete the matching provider-side rule as well. Removing the service does not automatically remove every XFCE package, so review the packages apt proposes before attempting a desktop cleanup. Keeping the desktop installed but disabling xrdp is a valid rollback when you may need the files later.

Practical decision

For Ubuntu 24.04, the dependable sequence is: SSH in, install xfce4, xfce4-session and xrdp, enable xrdp, add the ssl-cert membership when required, write xfce4-session to the RDP user’s ~/.xsession, restart the service, and allow only TCP 3389 from trusted sources. Connect with an RDP client using the Linux user’s password, and use the documented configuration and log paths when a session fails. If the VPS does not need a GUI, staying with SSH avoids the desktop installation and the additional RDP exposure altogether.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.