---
title: "xrdp on Ubuntu, Debian and Rocky Linux: a desktop over RDP · CloudSat"
description: "Run a Linux desktop over RDP: xrdp with Xfce on Ubuntu, Debian and Rocky Linux 9, GNOME Remote Desktop on EL10 and GNOME-only systems, and safe exposure."
url: https://cloudsat.io/learn/linux-desktop-over-rdp-with-xrdp
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Remote access](https://cloudsat.io/learn/topic/remote-access)

# xrdp on Ubuntu, Debian and Rocky Linux: a desktop over RDP

Run a Linux desktop over RDP: xrdp with Xfce on Ubuntu, Debian and Rocky Linux 9, GNOME Remote Desktop on EL10 and GNOME-only systems, and safe exposure.

CloudSat team November 18, 2026 6 min read

A Linux server has no desktop until you give it one, and xrdp is the usual way to reach that desktop: it speaks the Remote Desktop Protocol, so the client already on your Windows PC, Mac or phone can open a full Linux session. The setup is short. What changed recently is the choice of desktop, because the big distributions are moving away from the X11 display system that xrdp is built on. Pick the desktop first and the rest falls into place.

## Pick the desktop before the packages

xrdp starts an X11 session through its `xorgxrdp` back end. GNOME no longer offers an X11 session on Ubuntu 25.10 and later, and Red Hat Enterprise Linux 10 removed the X.Org server entirely, keeping only Xwayland. Lighter desktops such as Xfce and MATE still run on X11 and are the better fit for a remote session anyway.

| Distribution | xrdp in the repositories | Good desktops for xrdp | GNOME over xrdp? |
| --- | --- | --- | --- |
| Ubuntu 24.04 LTS | 0.9.24 | Xfce, MATE | Yes, through its X11 session |
| Ubuntu 26.04 LTS | 0.10.1 | Xfce, MATE, LXQt | No, use GNOME Remote Desktop |
| Debian 12 | 0.9.21.1 | Xfce, MATE | Yes, through its X11 session |
| Debian 13 | 0.10.1 | Xfce, MATE | Yes, through its X11 session |
| Rocky Linux and AlmaLinux 9 | 0.10.6.1 from EPEL 9 | Xfce from EPEL | Yes |
| Rocky Linux and AlmaLinux 10 | Not packaged in EPEL 10 | None | No, use GNOME Remote Desktop |

For sizing, treat 2 GB of memory as a comfortable floor for one Xfce session with a web browser open, and add memory for every extra user, since each one gets a separate session.

## Ubuntu and Debian: xrdp with Xfce

Install the desktop and xrdp together:

```bash
sudo apt update
sudo apt install -y xfce4 xfce4-terminal dbus-x11 xrdp xorgxrdp
sudo adduser xrdp ssl-cert        # lets xrdp read the TLS key it links to /etc/xrdp/key.pem
sudo systemctl enable --now xrdp
```

Create a normal user for the desktop rather than signing in as root, and tell xrdp which session to start for that user:

```bash
sudo adduser alice
sudo -u alice sh -c 'echo xfce4-session > ~/.xsession'
sudo systemctl restart xrdp
```

xrdp reads `~/.xsession` through `/etc/xrdp/startwm.sh`. Without it, Debian and Ubuntu fall back to the system default session, which may be a desktop that cannot run over X11.

## Rocky Linux and AlmaLinux 9: xrdp from EPEL

CentOS Linux 8 reached its end of life at the end of 2021; Rocky Linux and AlmaLinux took its place, and their version 9 still ships the X.Org server that xrdp needs. Xfce and xrdp both come from EPEL:

```bash
sudo dnf install -y epel-release
sudo dnf config-manager --set-enabled crb
sudo dnf groupinstall -y "Xfce"
sudo dnf install -y xrdp xorgxrdp
sudo systemctl enable --now xrdp
```

As the user who will sign in, set the session:

```bash
echo "startxfce4" > ~/.Xclients
chmod +x ~/.Xclients
```

If you want GNOME instead, `sudo dnf groupinstall -y "Server with GUI"` installs it, and it works over xrdp on version 9. It needs noticeably more memory and draws more slowly over the network than Xfce.

## Rocky Linux and AlmaLinux 10, and GNOME-only systems

EPEL 10 does not carry xrdp, and without an X.Org server it would have nothing to start. The supported route is GNOME's own RDP server, GNOME Remote Desktop, in its remote login mode: clients connect to the GDM login screen and start a fresh Wayland session. The same commands apply to Ubuntu 26.04 with GNOME.

```bash
sudo dnf groupinstall -y "Server with GUI"
sudo systemctl set-default graphical.target

# TLS certificate for the system service
D=~gnome-remote-desktop/.local/share/gnome-remote-desktop
sudo -u gnome-remote-desktop mkdir -p "$D"
sudo -u gnome-remote-desktop openssl req -new -newkey rsa:4096 -days 720 -nodes -x509 \
  -subj "/CN=$(hostname)" -keyout "$D/tls.key" -out "$D/tls.crt"

sudo grdctl --system rdp set-tls-key "$D/tls.key"
sudo grdctl --system rdp set-tls-cert "$D/tls.crt"
sudo grdctl --system rdp set-credentials      # prompts for a user name and password
sudo grdctl --system rdp enable
sudo systemctl enable --now gnome-remote-desktop.service

sudo firewall-cmd --permanent --add-service=rdp
sudo firewall-cmd --reload
sudo reboot
```

Run `set-credentials` without arguments so it prompts: a password typed on the command line ends up in your shell history. Those credentials only open the door. Your RDP client then shows the normal GDM login screen, where you sign in with your Linux account. On a GNOME desktop with a monitor, **Settings** > **System** > **Remote Desktop** offers the same remote login switch.

## Connect from any RDP client

Point the client at the server's address. xrdp shows its own login box: leave the session type on **Xorg**, then enter the Linux user name and password. From Windows, `mstsc /v:203.0.113.10` is enough; Windows App on macOS and phones, and Remmina or FreeRDP on Linux, work the same way. Our guide to [RDP clients](https://cloudsat.io/learn/remote-desktop-clients-windows-macos-linux) covers their settings.

Closing the client disconnects without signing out. xrdp keeps the session, and the next connection with the same user name returns to it, with programs still open.

## Keep port 3389 off the open internet

xrdp's login box faces whoever can reach the port, so limit who can. The simplest strong option is to listen on localhost only and tunnel through SSH. In `/etc/xrdp/xrdp.ini`, change the `port` line:

```ini
port=tcp://.:3389
```

That form binds to 127.0.0.1. Restart xrdp, then open a tunnel from your computer and connect the RDP client to `localhost:33389`:

```bash
ssh -N -L 33389:localhost:3389 alice@203.0.113.10
```

If you would rather keep the port reachable, admit only your own address:

```bash
# Ubuntu and Debian with ufw
sudo ufw allow from 198.51.100.24 to any port 3389 proto tcp

# Rocky Linux and AlmaLinux with firewalld
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="198.51.100.24" port port="3389" protocol="tcp" accept'
sudo firewall-cmd --reload
```

Two settings in `/etc/xrdp/sesman.ini` are worth changing as well: `AllowRootLogin=false` keeps root off the desktop, and `MaxLoginRetry=4` limits guesses per connection. If memory is tight, `KillDisconnected=true` with `DisconnectedTimeLimit=3600` ends sessions an hour after their user disconnects.

## Fix the common problems

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Black screen after login | No session file, or a desktop that needs Wayland | Check `~/.xsession` or `~/.Xclients`, use Xfce |
| Login box closes at once | Wrong password, or the user already has a local graphical session | Sign out locally, try again |
| GNOME refuses to start on Ubuntu 26.04 | GNOME has no X11 session there | Use Xfce, or GNOME Remote Desktop |
| Sluggish window moves | Desktop effects over the network | Turn off the Xfce compositor in **Window Manager Tweaks** |
| No sound | Missing audio module | Install `pipewire-module-xrdp` or `pulseaudio-module-xrdp` |

The logs usually name the problem: `sudo journalctl -u xrdp -u xrdp-sesman -n 50` on any distribution, plus `/var/log/xrdp-sesman.log` on Debian and Ubuntu.

If you would rather skip the setup, CloudSat has a one-click [IceWM over XRDP](https://cloudsat.io/apps/deploy-icewm-over-xrdp) image and [Linux desktop servers](https://cloudsat.io/linux-desktop-rdp) built for this.

## FAQ

### Can several people use the same server at once?

Yes. Each user gets a separate session, up to the `MaxSessions` limit in `sesman.ini`, which defaults to 50. Memory runs out long before that limit does.

### xrdp or VNC?

xrdp works with the RDP client already on most computers and encrypts the session with TLS by default. VNC needs an SSH tunnel to be safe across the internet. See our guide to [securing or replacing VNC](https://cloudsat.io/learn/secure-vnc-or-replace-it).

### Does GNOME Remote Desktop keep my session when I disconnect?

On current versions, yes: remote login sessions persist after a disconnect, and connecting again with the same account returns to the same desktop. Signing out from the desktop ends it.

### Does audio work?

Yes, with the xrdp module for your sound server, as listed above. Our guide to [Remote Desktop audio](https://cloudsat.io/learn/rdp-audio-and-microphone-redirection) covers the client side.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Remote access](https://cloudsat.io/learn/topic/remote-access)

- [Is VNC safe? How to secure it, and what to use instead](https://cloudsat.io/learn/secure-vnc-or-replace-it): Remote access Is VNC safe? How to secure it, and what to use instead 6 min read
- [RDP clients on Windows, macOS and Linux: setup and tuning](https://cloudsat.io/learn/remote-desktop-clients-windows-macos-linux): Remote access RDP clients on Windows, macOS and Linux: setup and tuning 6 min read
- [Chrome Remote Desktop: set it up and lock it down](https://cloudsat.io/learn/chrome-remote-desktop-setup-and-security): Remote access Chrome Remote Desktop: set it up and lock it down 6 min read
- [Install a GUI on Ubuntu Server, AlmaLinux or Rocky Linux](https://cloudsat.io/learn/install-a-desktop-on-a-linux-server): Remote access Install a GUI on Ubuntu Server, AlmaLinux or Rocky Linux 8 min read
