TutorialNov 2, 20264 min read

Linux VPS with Remote Desktop: XFCE + xrdp on Ubuntu in 10 Minutes

Turn a Linux VPS into a desktop you open with Remote Desktop from Windows, Mac or phone. Step-by-step XFCE and xrdp setup on Ubuntu 24.04 or Debian, how much RAM you need, and how to keep port 3389 safe.

Short answer: install a lightweight desktop (XFCE) and the xrdp server on your Linux VPS, create a normal user, and connect with any Remote Desktop app to the server's IP on port 3389. On Ubuntu 24.04 it's five commands and about ten minutes. Give it at least 2 GB of RAM, and allow port 3389 only from your own IP address or reach it through an SSH tunnel.

A Linux VPS comes without a screen: you manage it over SSH. That's perfect for servers, but sometimes you want a desktop: a browser that keeps running, a GUI tool, a trading terminal with a Linux build, or simply a remote machine you can click around in. You don't need Windows for that. This guide sets up a full desktop you open with the same Remote Desktop apps people use for Windows servers.

01What You Need

A Linux VPS

with Ubuntu 24.04, Ubuntu 22.04 or Debian 12. Root access over SSH.

2 GB RAM or more

XFCE itself is light; the browser is what eats memory.

A Remote Desktop client

Built into Windows (mstsc), free "Windows App" on Mac, iPhone and Android, Remmina on Linux.

About 10 minutes

UseRAMRdp.Vision plan
Desktop, file manager, a few tools2 GB1 vCPU / 2 GB, $6.50/month
Browser open all day, light apps6 GB2 vCPU / 6 GB, $13.00/month
Several apps, heavy browsing, IDE10 GB6 vCPU / 10 GB, $26.00/month

02Step 1: Update the Server

Log in over SSH as root and bring the system up to date:

bash
apt update && apt -y upgrade

03Step 2: Install XFCE and xrdp

XFCE is a fast, simple desktop that works well over Remote Desktop. xrdp is the server that speaks the RDP protocol.

bash
apt install -y xfce4 xfce4-goodies xrdp

If a screen asks which display manager to use, either choice works for xrdp.

04Step 3: Create a Desktop User

Don't use root for the desktop. Create a normal user (replace alex with your name) and give it sudo rights:

bash
adduser alex
usermod -aG sudo alex

Tell xrdp to start XFCE for that user:

bash
echo "xfce4-session" > /home/alex/.xsession
chown alex:alex /home/alex/.xsession

05Step 4: Start xrdp

Let xrdp read its certificate, then start it now and on every boot:

bash
adduser xrdp ssl-cert
systemctl enable --now xrdp
systemctl status xrdp --no-pager

The status should say active (running).

06Step 5: Open Port 3389, but Only for You

An open RDP port gets password-guessing attempts within hours.

The safest simple setup is a firewall that allows SSH for you and RDP only from your own IP address. Find your IP on any "what is my IP" page, then:

bash
ufw allow OpenSSH
ufw allow from YOUR.IP.ADDRESS to any port 3389 proto tcp
ufw enable

Allow SSH before ufw enable, or you'll lock yourself out.

If your IP changes often, use an SSH tunnel instead and don't open 3389 at all:

bash
# on your own computer
ssh -L 3389:localhost:3389 alex@SERVER-IP

Leave that window open, then connect your Remote Desktop app to localhost.

07Step 6: Connect

  1. 1Open your Remote Desktop app (mstsc on Windows, Windows App on Mac or phone).
  2. 2Enter the server's IP address (or localhost with the SSH tunnel).
  3. 3At the xrdp login, keep Xorg selected and enter the user and password from step 3.
  4. 4The XFCE desktop appears. For a browser, run sudo snap install firefox on Ubuntu or sudo apt install -y firefox-esr on Debian.

Never used Remote Desktop before? How to Connect to an RDP Server covers each app.

08Troubleshooting

ProblemFix
Black screen after loginCheck ~/.xsession contains xfce4-session; log out of any other session of the same user
Connection refusedsystemctl status xrdp; make sure the firewall allows your IP on 3389
Login box rejects the passwordUse the desktop user from step 3, not root
Very slow over a long distanceLower the colour depth in your RDP app to 16-bit; pick a server location closer to you
Session closes after disconnectingThat's normal for xrdp's defaults; reconnect with the same user to get a new session

09Debian 12 and Other Distributions

On Debian 12 the commands are identical. On Rocky Linux or AlmaLinux you need the EPEL repository first (dnf install -y epel-release), then dnf groupinstall -y "Xfce" and dnf install -y xrdp, and firewalld instead of ufw.

Nano1 vCPU · 1 GB · 10 GB NVMe$3.90/mobilled monthlyBuy
Most popularSpark1 vCPU · 2 GB · 20 GB NVMe$6.50/mobilled monthlyBuy
Pulse2 vCPU · 2 GB · 20 GB NVMe$6.50/mobilled monthlyBuy
Surge2 vCPU · 6 GB · 40 GB NVMe$13.00/mobilled monthlyBuy
Storm6 vCPU · 10 GB · 40 GB NVMe$26.00/mobilled monthlyBuy
Apex6 vCPU · 10 GB · 80 GB NVMe$39.00/mobilled monthlyBuy

Full root SSH access · NVMe storage · DDoS protection · No setup fee

Yes. Install a desktop environment such as XFCE and a remote desktop server such as xrdp, and you can open it with any Remote Desktop app.

  • linux vps remote desktop
  • linux vps gui
  • xrdp ubuntu vps
  • ubuntu remote desktop vps
  • xfce vps
  • linux desktop vps

Keep reading

All articles