Install Xrdp server on Debian 11

This guide is going to take you through on how to Install Xrdp Server on Debian 11. Xrdp is a free and open-source implementation of Microsoft’s RDP (Remote Desktop Protocol) server that lets non-Windows operating systems (such Linux and BSD-style operating systems) provide a fully functional RDP-compatible remote desktop experience. It relays client controls to the X Window Server and bridges graphics from the X Window System to the client.

How to Install Xrdp Server on Debian 11

  • Using the command below, update your packages.
sudo apt update
  • Next, use the following command to install Xrdp Server on Debian 11.
sudo apt install xrdp

Sample output

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  xorgxrdp
Suggested packages:
  guacamole xrdp-pulseaudio-installer
The following NEW packages will be installed:
  xorgxrdp xrdp
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 506 kB of archives.
After this operation, 3,238 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main amd64 xrdp amd64 0.9.12-1.1 [446 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 xorgxrdp amd64 1:0.2.12-1 [59.9 kB]
Fetched 506 kB in 1s (354 kB/s)
Selecting previously unselected package xrdp.
(Reading database ... 142422 files and directories currently installed.)
Preparing to unpack .../xrdp_0.9.12-1.1_amd64.deb ...
Unpacking xrdp (0.9.12-1.1) ...
Selecting previously unselected package xorgxrdp.
Preparing to unpack .../xorgxrdp_1%3a0.2.12-1_amd64.deb ...
Unpacking xorgxrdp (1:0.2.12-1) ...
Setting up xrdp (0.9.12-1.1) ...

Generating 2048 bit rsa key...

ssl_gen_key_xrdp1 ok

saving to /etc/xrdp/rsakeys.ini

Created symlink /etc/systemd/system/multi-user.target.wants/xrdp-sesman.service → /lib/systemd/system/xrdp-sesman.service.
Created symlink /etc/systemd/system/multi-user.target.wants/xrdp.service → /lib/systemd/system/xrdp.service.
Setting up xorgxrdp (1:0.2.12-1) ...
Processing triggers for man-db (2.9.4-2) ...

Processing triggers for libc-bin (2.31-13+deb11u3) ...
  • Check Xrdp Server status using the command below.
sudo systemctl status xrdp

Sample output

● xrdp.service - xrdp daemon
     Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-04-18 20:45:20 EAT; 59s ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
    Process: 5130 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
    Process: 5142 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
   Main PID: 5152 (xrdp)
      Tasks: 1 (limit: 4623)
     Memory: 768.0K
        CPU: 25ms
     CGroup: /system.slice/xrdp.service
             └─5152 /usr/sbin/xrdp

Apr 18 20:45:19 debian xrdp[5142]: (5142)(139754740594496)[INFO ] address [0.0.0.0] port [3389] mode 1
Apr 18 20:45:19 debian xrdp[5142]: (5142)(139754740594496)[INFO ] listening to port 3389 on 0.0.0.0
Apr 18 20:45:19 debian xrdp[5142]: (5142)(139754740594496)[INFO ] xrdp_listen_pp done

Configure Xrdp Server on Debian 11

  • During the installation, Xrdp created a user named xrdp in your system. The xrdp session uses the “/etc/ssl/private/ssl-cert-snakeoil.key” certificate key file.
  • To make the file accessible to the user, run the following command to add the xrdp user to the ssl-cert group.
 sudo adduser xrdp ssl-cert

Allow Xrdp Server on Firewall

  • By default, Xrdp listens on port 3389; if you’re using a firewall, grant Xrdp access with the command below.
sudo ufw allow 3389
  • To apply the changes, restart the firewall.
sudo ufw reload 

Connect to Debian 11 Xrdp Server

  • In this example, we’ll use Windows 10 to connect to the Xrdp server we just set up.
  • Open RDP on your Windows computer, then input your Debian IP address to connect.
  • You will be prompted to confirm if you want to connect.
  • To connect, enter your Debian credentials as shown below.

If you receive a black blank screen, log out of Debian first and then reconnect the Windows RDP.

  • You will be connected to the Debian Xrdp server after a successful connection.
  • Congratulations for making it to the end of the article! . You have learned how to Install Xrdp Server on Debian 11.
    Read more about Xrdp

Other Tutorials

Install NFS Server on Debian 11

Install Cacti on Ubuntu 22.04

Install KVM on Ubuntu 22.04

System administrator | Software Developer | DevOps

Leave a Comment