Ubuntu VPS with a GUI: XFCE + xRDP Setup

Ubuntu VPS with a GUI: XFCE + xRDP Setup

Install the lightweight XFCE desktop and xRDP on an Ubuntu VPS, connect with Remote Desktop, and secure it with an SSH tunnel or firewall rule.

The easiest way to get an Ubuntu VPS with a GUI is to install the XFCE desktop and the xRDP server, then connect with the Remote Desktop app you already have on Windows or macOS. XFCE is light enough for a small server, and xRDP speaks the same RDP protocol as Windows, so there is no extra client to learn. Setup takes about 15 minutes.

This guide is for people who need a browser, a file manager or a graphical tool on a remote Linux server: running a trading or monitoring app, testing a website from another country, or managing a server without living in the terminal. It works on Ubuntu 22.04, 24.04 and 26.04 LTS.

Why XFCE and xRDP instead of GNOME?

XFCE uses far less memory and CPU than Ubuntu’s default GNOME desktop, which matters on a server without a graphics card. Recent GNOME releases also lean heavily on Wayland, which does not work well with remote desktop on a headless VPS. XFCE runs on X11, which xRDP supports well.

Option Resource use Client you need Best for
XFCE + xRDP Low Built-in Remote Desktop app Most VPS desktops
XFCE + VNC Low A VNC viewer People already using VNC
GNOME (ubuntu-desktop) High Varies Not recommended on a VPS

What do you need first?

  • An Ubuntu VPS with root SSH access. See how to connect to a Linux VPS with SSH if you have not logged in yet.
  • At least 4 GB of RAM. A desktop with a web browser open uses most of that, so 8 GB feels noticeably smoother.
  • Remote Desktop Connection on Windows, or Microsoft’s Windows App on macOS, iOS or Android.

Step 1: Create a normal user for the desktop

Do not log in to the desktop as root. Create a regular user and give it sudo rights:

adduser deskuser
usermod -aG sudo deskuser

Replace deskuser with the name you want.

Step 2: Install XFCE and xRDP

apt update
apt install -y xfce4 xfce4-goodies xrdp

If a screen asks which display manager to use, pick lightdm. The install pulls in a few hundred packages and takes several minutes.

Step 3: Tell xRDP to start XFCE

Allow xRDP to read its TLS certificate, then set XFCE as the session for your desktop user:

adduser xrdp ssl-cert
su - deskuser -c 'echo "xfce4-session" > ~/.xsession'
systemctl enable --now xrdp
systemctl restart xrdp

Check that it is listening on port 3389:

ss -tlnp | grep 3389

Step 4: Keep port 3389 away from the internet

Bots scan the whole internet for open RDP ports, so do not leave 3389 open to everyone. Use one of these two approaches.

Option A: connect through an SSH tunnel (safest)

Leave 3389 closed in the firewall and forward it over SSH from your own computer:

ssh -L 3389:localhost:3389 deskuser@YOUR_SERVER_IP

Keep that window open, then point your Remote Desktop app at localhost.

Option B: allow only your own IP

If you connect from a fixed address, open the port for that address alone with UFW:

ufw allow OpenSSH
ufw allow from YOUR_HOME_IP to any port 3389 proto tcp
ufw enable

Our UFW firewall guide explains these rules in more detail. If your home IP changes often, use the SSH tunnel or connect through a VPN instead. Our NordVPN plans are one way to do that from public Wi-Fi.

Step 5: Connect from your computer

  1. Open Remote Desktop Connection (Windows) or Windows App (macOS).
  2. Enter localhost if you used the tunnel, or the server’s IP if you allowed your address.
  3. Accept the certificate warning the first time; xRDP uses a self-signed certificate.
  4. Log in with the desktop user you created, not root.

You should see the XFCE desktop within a few seconds. If you also use Windows servers, the steps are the same as in our guide to connecting to a Windows VPS with Remote Desktop.

Why do I get a black or blank screen?

A black screen almost always means the session did not start. Check these in order:

  • The ~/.xsession file exists in the desktop user’s home folder and contains xfce4-session.
  • The same user is not also logged in to a local graphical session on the server.
  • The xRDP logs: journalctl -u xrdp -u xrdp-sesman --since "10 min ago".

Restart xRDP after any change with systemctl restart xrdp.

Which plan works for a Linux desktop?

For one person using a browser and a few apps, Cloud Turbo (6 vCores, 8 GB DDR4 RAM, €39 a month) gives a smooth session. Cloud Core (2 vCores, 4 GB RAM, €25 a month) handles a light desktop with a terminal and file manager, but slows down with several browser tabs open. If what you really want is Windows software rather than Linux, a Windows VPS with RDP built in is simpler than running a Linux desktop.

Frequently asked questions

Does this work on Ubuntu 24.04 and 26.04?

Yes. XFCE and xRDP are in the standard Ubuntu repositories for 22.04, 24.04 and 26.04 LTS, and the steps are the same on each.

Can several people use the desktop at once?

Yes. Each user gets a separate session. Create one Linux user per person and size the server for the combined memory use.

Is the connection encrypted?

xRDP encrypts the session with TLS. Its default certificate is self-signed, which is why your client shows a warning. The SSH tunnel adds a second layer of encryption.

How do I remove the desktop later?

Run apt purge xrdp xfce4 xfce4-goodies followed by apt autoremove. Your files in the user’s home folder stay in place.

Next step: set up the desktop on a server with room to breathe

A GUI is only as smooth as the RAM behind it. Start with 8 GB if you will run a browser, keep port 3389 behind a tunnel or firewall rule, and you will have a remote Linux desktop you can reach from anywhere.

Post Your Comment

Knowledgebase
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.