Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Blog/RDP on a Linux VPS

RDP on a Linux VPS:
set up a desktop with xrdp.

28 November 20267 min readBy the RapidServer team

Can you use RDP on a Linux VPS?

Yes. A Linux VPS is managed over SSH from a terminal by default and has no desktop, but you can add one: install a light desktop such as Xfce plus xrdp, an open-source RDP server, and log in from any Remote Desktop app. For Windows software such as Tally or MT5, a Windows VPS is the better choice. Linux VPS plans start at ₹581/mo plus 18% GST.

Every RapidServer VPS is a KVM server in Mumbai (BOM1) or Delhi NCR (DEL1) with full root, ready a few minutes after payment, so the desktop is yours to install. New to the terms? Start with RDP vs VPS.

How xrdp works

xrdp gives a Linux machine a graphical login over Microsoft's Remote Desktop Protocol. It listens on TCP port 3389, like Windows Remote Desktop, so mstsc, Microsoft's Windows App and FreeRDP-based apps such as Remmina can connect. It encrypts the connection with TLS by default, and each user gets their own desktop session.

How much RAM a Linux desktop needs

A desktop uses more memory than a headless server running only SSH and your apps, and a web browser adds the most. There is no fixed figure; it depends on what you keep open. For one person with a terminal and light tools, start on Stardust with 4 GB RAM. If a browser stays open all day or several people log in, Full Moon has 8 GB for ₹1,723/mo. You can upgrade at any time, prorated to the day.

How to install Xfce and xrdp on Ubuntu 24.04

Log in over SSH (see SSH kya hai) and take a snapshot first, so you can roll back. Ubuntu packages the lightweight Xfce desktop as xfce4, with optional extras, including a terminal, in xfce4-goodies. The xrdp package comes from Ubuntu's universe repository and installs xorgxrdp with it:

shell
sudo apt update
sudo apt install xfce4 xfce4-goodies xrdp
sudo adduser deskuser
sudo adduser xrdp ssl-cert
sudo systemctl restart xrdp

Don't use the desktop as root: adduser deskuser creates a normal user with its own password, which is what you type at the RDP login. xrdp runs as its own xrdp user and may need the ssl-cert group to read its TLS key.

Next, tell xrdp to start Xfce for that user. On Ubuntu, xrdp's startwm.sh hands over to /etc/X11/Xsession, which runs the user's ~/.xsession if there is one (see the Xsession manual). xfce4-session starts Xfce:

shell
sudo -iu deskuser
echo xfce4-session > ~/.xsession
exit

One catch: snap apps such as Ubuntu's Firefox can fail inside an xrdp session; the xrdp wiki's Ubuntu 24.04 guide explains the fix.

Allow port 3389 only from your own IP

An RDP port open to the whole internet gets password-guessing bots. With ufw, allow SSH first so you don't lock yourself out (see our firewall guide), then allow 3389 only from your home or office IP, in the rule format from Ubuntu's firewall documentation. Add the same limit in any client-area firewall rules:

shell
sudo ufw allow 22/tcp
sudo ufw allow proto tcp from your-home-ip to any port 3389
sudo ufw enable
sudo ufw status

xrdp needs only this TCP rule. Home broadband IPs usually change when the router restarts, so you would keep updating it; the tunnel below avoids that.

Better: tunnel RDP over SSH and keep 3389 closed

An SSH tunnel carries RDP inside your SSH connection, so port 3389 never opens to the internet and your SSH keys guard the way in. Skip the 3389 rule above, or remove it with sudo ufw delete followed by the rule. Then, on your own computer, run:

your computer
ssh -N -L 3389:localhost:3389 user@your-vps-ipv4

Keep that window open and point your RDP app at localhost. In the ssh manual, -L forwards a port on your computer to the server and -N skips the remote shell. Use your usual SSH login here; the desktop login stays deskuser. On Windows 10 or 11, run it in PowerShell; if ssh isn't found, add OpenSSH Client under Optional Features. If your computer already uses port 3389, pick a spare local port: -L 3390:localhost:3389, then connect to localhost:3390.

With the tunnel, xrdp can listen on the server itself only: in /etc/xrdp/xrdp.ini, change port=3389 to port=tcp://.:3389, which xrdp's config comments map to 127.0.0.1:3389, and restart xrdp.

Connect from Windows, Mac or a phone

  • Windows: press Windows + R, type mstsc and enter the VPS IP, or localhost through the tunnel. Accept the certificate prompt the first time, because xrdp uses a self-signed certificate.
  • Mac: install Microsoft's free Windows App from the Mac App Store, choose Add PC and enter the IP or localhost.
  • Android or iPhone: use Windows App from the Play Store or App Store. Mobile IPs change often, so an IP rule rarely fits; reach the server over your own WireGuard VPN instead (see VPS vs VPN).
  • Linux: Remmina or xfreerdp.

If xrdp shows its own login box, choose the Xorg session and sign in as deskuser. Screens for each app and fixes for common errors are in how to connect to RDP.

When a Windows VPS is the better choice

xrdp gives you a Linux desktop, not Windows. Tally, Busy, Windows trading terminals such as MT5 and other Windows-only software are made for Windows. For those, take a Windows VPS: Remote Desktop is on from first boot, you log in as Administrator, and the Windows Server licence is in the price, from ₹2,323/mo, also sold as our RDP server. Pick Linux with xrdp for Linux tools or a desktop next to your Docker or Python projects; Linux VPS vs Windows VPS compares the two.

Keep your Linux desktop secure

  • Keep 3389 closed and use the SSH tunnel, or allow only your own IP.
  • Give each desktop user a long, unique password, and don't sign in to the desktop as root.
  • Install Ubuntu updates regularly with sudo apt update and sudo apt upgrade.
  • Daily backups kept for 7 days are included, and you can take a snapshot before big changes.

More on locking down Remote Desktop: is RDP safe?

Put a desktop on your own Linux VPS.

Full root on KVM in Mumbai or Delhi NCR, ready a few minutes after payment, with daily backups kept for 7 days and 24/7 support, from ₹581/mo.

See VPS plans

Questions

Can I use RDP on Ubuntu?+
Yes. Install a desktop such as Xfce and the xrdp server, both in Ubuntu 24.04's universe repository, set ~/.xsession to xfce4-session and connect with any Remote Desktop app.
Which port does xrdp use?+
TCP port 3389, like Windows Remote Desktop. Allow it only from your own IP with ufw, or keep it closed and reach xrdp through an SSH tunnel with ssh -L 3389:localhost:3389.
Why does my xrdp session show a black screen or close after login?+
Check that ~/.xsession exists in that user's home and contains xfce4-session, then restart xrdp. Also check the user isn't signed in to another desktop on the server: the xrdp FAQ says systemd-based systems don't allow the same user in both.
Can I run Tally or MT5 on a Linux VPS with xrdp?+
They are Windows programs, so use a Windows VPS instead. Ours start at ₹2,323/mo plus 18% GST with the Windows Server licence included.
Is xrdp encrypted?+
Yes. The xrdp README says RDP transport is encrypted with TLS by default. On Ubuntu the certificate is self-signed, so your app asks you to trust it the first time. An SSH tunnel adds SSH encryption and keeps port 3389 closed.
Kya Linux VPS par RDP chal sakta hai?+
Haan. Linux VPS normally SSH se chalta hai, par Xfce desktop aur xrdp install karke aap mstsc ya Windows App se login kar sakte hain. Port 3389 sirf apne IP ke liye kholein, ya SSH tunnel use karein. Tally ya Busy ke liye Windows VPS lein. RapidServer par Linux VPS ₹581/mo plus 18% GST se shuru hota hai.

A Linux desktop, on a server in India.

KVM VPS with full root and a dedicated IPv4 in Mumbai or Delhi NCR, billed monthly in rupees with a GST invoice.