Threefold Guide: Deploy a Full VM with IPv4 XRDP Remote Desktop Connection (Windows, MAC, Linux)

Deploy a Full VM with IPv4 Remote Desktop Connection (Windows, MAC, Linux)

Table of Contents


In this Threefold Guide, we learn how to deploy a full virtual machine on a 3node on the Threefold Grid and access Ubuntu with a desktop environment to offer a graphical user interface (GUI).

This guide can be done on a Window, MAC or Linux computer. The only difference will be in downloading the Remote Desktop app. The steps should be very similar.

Server Side

Deploy a Full VM

Create a Root-Access User

  • Once connected, update, upgrade and install the desktop environment
    • Update
      • sudo apt update -y && sudo apt upgrade -y
    • Install a light-weight desktop environment (Xfce)
      • sudo apt install xfce4 xfce4-goodies -y
      • Choose between gdm3 and lightdm. In this guide, we choose lightdm.
  • Create a new user with root access (here newuser)
    • adduser newuser
  • To see the home directory of the new user, type the following
    • ls /home
      • You should see the new user’s directory
    • Give sudo capacity to newuser
      • usermod -aG sudo newuser
    • Make the new user accessible by SSH
      • su - newuser
      • mkdir ~/.ssh
      • nano ~/.ssh/authorized_keys
        • add authorized public key in file and save
    • Exit the VM and reconnect with new user
      • exit

Install and Set XRDP

  • Reconnect to the 3node server’ terminal to install XRDP
    • ssh newuser@IPv4_address
  • Install XRDP
    • sudo apt install xrdp -y
  • Check XRDP’s status
    • sudo systemctl status xrdp
    • If not running, run manually:
      • sudo systemctl start xrdp
  • If needed, configure xrdp (optional)
    • sudo nano /etc/xrdp/xrdp.ini
  • Create an XRDP session with a root-access user
    • Go to the home directory of the root-access user
      • cd ~
  • Create a session
    • echo "xfce4-session" | tee .xsession
  • Restart xrdp
    • sudo systemctl restart xrdp

Set a Firewall

  • Find your local computer IP address

    • On your local computer terminal, write
      • curl
  • On the 3node terminal, allow client computer port to the firewall (ufw)

    • sudo ufw allow from your_local_ip/32 to any port 3389
  • Allow SSH connection to your firewall

    • sudo ufw allow ssh
  • Enable the firewall

    • sudo ufw enable
  • Verify status of the firewall

    • sudo ufw status

Client Side

For the client side (the local computer accessing the 3node server remotely), you can use remote desktop connection for Windows, MAC and Linux. The process is very similar in all three cases.

Simply download the app, open it and write the IP address of the 3node server. You will then need to write the username and password of the 3node server (in this guide, we used newuser) to enter into your 3node.

Download the App

Connect Remotely

  • General process
    • In the Remote Desktop app, enter the following information:
      • IP Address of the 3node with the XRDP port (:3389)
      • root-access username and password
    • Connect to the 3node server remotely
    • You should now have established a remote desktop connection to your 3node server


After reading and completing this Threefold Guide, you should now have access remotely to the desktop screen of your 3node server.

If you have any questions, feel free to write a post on the Threefold Forum.