
Ubuntu VPS images come without a graphical desktop, just a command line over SSH. That's ideal for web servers, but sometimes you want a full desktop: to run a browser or trading platform 24/7, use GUI tools, or give a less technical user a familiar screen. The most reliable way is a lightweight desktop such as XFCE plus xrdp, which lets you connect with the normal Remote Desktop client from Windows, macOS or your phone. This guide covers Ubuntu 22.04, 24.04 and 26.04, including why GNOME is the wrong choice for this.
Quick answer
sudo apt update && sudo apt upgrade -y
sudo apt install -y xfce4 xfce4-goodies xrdp dbus-x11
sudo adduser xrdp ssl-cert
echo "startxfce4" > ~/.xsession
sudo systemctl enable --now xrdp
sudo ufw allow from YOUR.IP.ADDR to any port 3389 proto tcp
Then connect with Remote Desktop Connection (mstsc) to the VPS IP and log in with your Linux user.
Why XFCE and not the Ubuntu (GNOME) desktop?
- xrdp needs an X11 session. Since Ubuntu 25.10, and in Ubuntu 26.04 LTS, the GNOME desktop is Wayland-only, so GNOME can't start inside an xrdp session at all. XFCE, MATE and KDE on X11 still work.
- Resources: XFCE idles at well under 1 GB of RAM; full Ubuntu Desktop wants 6 GB on 26.04.
- Speed over the network: a simple desktop without animations feels much faster in a remote session.
If you run Ubuntu Desktop on a physical PC rather than a VPS, use GNOME's built-in Remote Desktop (Settings → System → Remote Desktop) instead of xrdp.
Step 1: Prepare the VPS
- Choose a plan with at least 2 vCPU and 4 GB RAM for a comfortable desktop with a browser. 2 GB works for light use.
- Log in over SSH and update the system:
sudo apt update && sudo apt upgrade -y - Create a normal user for the desktop instead of using root:
sudo adduser alice sudo usermod -aG sudo alice
Step 2: Install XFCE
sudo apt install -y xfce4 xfce4-goodies dbus-x11
If a prompt asks for a display manager, choose lightdm (or either; xrdp doesn't use it). xfce4-goodies adds a terminal, task manager, screenshot tool and other useful extras. Want an even smaller install? sudo apt install xubuntu-core gives the Xubuntu flavour with its defaults.
Step 3: Install and configure xrdp
sudo apt install -y xrdp
sudo adduser xrdp ssl-cert # lets xrdp read the TLS key
sudo systemctl enable --now xrdp
Tell xrdp to start XFCE for your user. Log in as that user (or su - alice) and run:
echo "startxfce4" > ~/.xsession
Check that xrdp is listening on port 3389:
sudo systemctl status xrdp --no-pager
sudo ss -tlnp | grep 3389
Step 4: Open the firewall carefully
Allow RDP only from your own IP address if you can:
sudo ufw allow OpenSSH
sudo ufw allow from 198.51.100.25 to any port 3389 proto tcp
sudo ufw enable
If your IP changes often, allow port 3389 for everyone but use strong passwords and Fail2ban, or keep 3389 closed and connect through an SSH tunnel: ssh -L 3389:127.0.0.1:3389 alice@VPS_IP, then connect your RDP client to localhost.
Step 5: Connect from your computer
- Windows: press Win + R, run
mstsc, enter the VPS IP and click Connect. At the xrdp login screen, keep Xorg selected and enter your Linux username and password. - macOS, iPhone, Android: use Microsoft's Windows App and add the VPS as a PC.
- Linux: use Remmina with the RDP protocol.
Log out of the desktop (Applications → Log Out) when you're done if you want to free memory, or just close the window to keep your programs running and reconnect later.
Make the remote desktop faster
- Turn off the compositor: Settings → Window Manager Tweaks → Compositor, untick Enable display compositing.
- In your RDP client, lower the colour depth to 16-bit and disable desktop background and font smoothing on slow connections.
- Use a lightweight browser profile with few extensions, and close apps you don't need.
- Check memory with
free -h; if the VPS is swapping, upgrade RAM rather than tuning further.
Troubleshooting
- Black or blank screen after login: the
~/.xsessionfile is missing or the same user is logged in on the local console. Recreate the file and log out of other sessions. - Connection closes right after login: check
/var/log/xrdp-sesman.logand~/.xsession-errors. You may be trying to start GNOME; switch to XFCE. - "Authentication required to create a color managed device" popups: harmless polkit prompts; cancel them, or add a polkit rule that allows colord for all users.
- Can't connect at all: verify xrdp is running, port 3389 is allowed in UFW and in your provider's firewall, and you're using the right IP.
Alternatives to xrdp
- VNC (TigerVNC): works with any desktop; tunnel it over SSH because plain VNC isn't encrypted.
- X2Go: fast over slow links, uses SSH for transport, needs its own client.
- A Windows VPS: if you mainly need Windows software, a Windows RDP server avoids Linux desktop setup entirely.
Frequently asked questions
Can I install a desktop on an Ubuntu VPS?
Yes. Install a lightweight desktop such as XFCE and xrdp, then connect with any Remote Desktop client.
Why doesn't GNOME work with xrdp on Ubuntu 26.04?
GNOME 50 in Ubuntu 26.04 runs only on Wayland, and xrdp needs an X11 session. Use XFCE, MATE or KDE on X11 with xrdp.
How much RAM does an Ubuntu VPS with a GUI need?
2 GB for light use with XFCE; 4 GB or more if you'll run a modern browser or several apps.
Which port does xrdp use?
TCP port 3389, the standard RDP port. You can change it in /etc/xrdp/xrdp.ini.


