Skip to main content
To set up Remote Desktop Protocol (RDP) on Ubuntu, you can use the built-in Remote Desktop sharing feature or install a third-party RDP server like xrdp.

Method 1: Built-in Remote Desktop Sharing

This method only allows one active session at a time. If someone is logged in locally, a remote user cannot connect until the local user logs out.
The steps below are based on Ubuntu 24.04 LTS. The UI may differ slightly on other versions.
1
Open Remote Desktop settings
2
Go to Settings > System > Remote Desktop.
3
Enable Remote Desktop
4
Toggle the switch to enable Remote Desktop and configure the settings as needed (username, password).
5
Enable Remote Login (optional)
6
Enable Remote Login and set up login details if you want to allow remote connections without a local session.
7
Open the firewall port
8
If you have a firewall configured, allow RDP connections on port 3389:
9
sudo ufw allow 3389/tcp

Method 2: Install xrdp

This method allows multiple users to connect simultaneously by creating separate remote sessions that do not interfere with the local session. Each user gets their own isolated desktop environment.
sudo apt update && sudo apt install -y xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp

# Allow RDP through the firewall
sudo ufw allow 3389/tcp

Build docs developers (and LLMs) love