Transcription
foreign [Music] Tech enthusiasts, today we're diving deep into creating an Ubuntu 22.04 VPS with GUI desktop on Contabo, and to top it off, we'll be connecting to it using RDP. Let's get started.
Navigate to Contabo's official website. You'll immediately notice a range of hosting solutions, including web hosting, VPS, dedicated servers, and more. Contabo is one of the many providers that offer virtual private servers at competitive prices. A VPS is essentially a virtualized server that acts like a dedicated server within a larger physical server.
Choose a VPS package. There are various VPS packages available. Contabo provides a range of configurations with varying CPU, RAM, and storage options. Take the one that suits your requirements and budget. I will go for the Cloud VPS Small for this demonstration.
Once you've selected a package, on the next page, you can select whether to pay monthly, yearly, and so on. When you go for a longer period, it will be much cheaper compared to just paying monthly. There is also a one-time setup fee.
On the region, select a region that's closest to your location. This offers several benefits like lower latency and increased speed. A shorter distance for data to travel also often translates to faster data transfer rates, which can lead to quicker page load times, improved download and upload speeds. This will lead to better performance.
On the storage type, choose either NVMe or SSD. Both NVMe (Non-Volatile Memory Express) and SSD (Solid State Drive) pertain to solid-state storage technology. However, their primary distinction lies in the interface and protocol they use. You can research more on the differences.
On the image section, choose an operating system. For this tutorial, choose Ubuntu 22.04.
On the login and password, enter a strong root password that you will use for your system. Make sure you do not forget it. You can leave the rest on the defaults if you want. Click on Next when done. Click on Next when done.
On the next page, complete the purchase. Follow the website's instructions to complete your purchase. After successfully purchasing your VPS, you'll receive an email containing details like the server's IP address, the root username, and password. Safeguard this information.
When you log into your Contabo dashboard, you will be presented with an interface like this one, where you can manage your VPS machine.
Connect to your server. To set up your server, you'll need to connect to it. Use an SSH client like PuTTY for Windows or Terminal for Mac OS and Linux. I am on an Ubuntu machine and I have installed PuTTY. You can install PuTTY even on a Windows computer. Log in using the details that were sent to you in the email.
Before you install any new packages, it's always a good idea to update the local package index and upgrade the system. Run the following commands.
Create a username and give the new user administrative rights. You are going to use this user instead of the root username for security reasons, but if you want, you can continue using the root.
If you are on a Linux machine, you can just use the terminal instead of using PuTTY to connect to the VPS machine. So, let us connect using the terminal and continue with the commands. If you are on a Windows machine, continue using PuTTY. I switched to the terminal because the font is bigger and it will be much easier to see the commands.
Entering this command will give the newly created username. You can switch to the new user now if you want. For security reasons, you can disable the root user and use `sudo` in front of the command, otherwise, you will get this error.
Enter this command. This command will install the Ubuntu desktop environment, Firefox browser, Stacer system optimizer, and MMB utility. If any of these packages is already installed, the command will attempt to ensure it's the latest version. The installation will take a few minutes, so just be patient.
This command changes the directory to your home directory and then downloads the xrdp installer script from Synergy. The script makes the installation and post-configuration actions of xrdp much easier.
This command will extract the contents of the file we just downloaded above. Press the letter Q to quit or exit.
The command is used to change the permissions. This command makes the script executable and then immediately runs it. If the script contains instructions to install or set up xrdp, those instructions will be executed when this command is run.
The command is changing the default RDP port number from 3389 to 51575 in the xrdp configuration file. This is often done to change the port that xrdp listens on, which can be a security measure to deter basic automated attacks targeting the default RDP port. After making this change, anyone trying to connect to the xrdp server would need to specify port 51575 instead of the default 3389.
This command will change the default SSH port 22 and change it to 51576. After making this change, you'd need to restart the SSH server for the changes to take effect. Once the SSH server is restarted, it will listen on port 51576 for incoming SSH connections instead of the default port 22. Changing the default port can be done as a measure to deter basic automated attacks that target the default SSH port, although it's just one piece of a comprehensive security strategy.
The next commands are for opening the ports we just configured on the firewall for incoming traffic. This command simply ensures that the firewall won't be the blocker for traffic on that port.
This command activates the Uncomplicated Firewall on Ubuntu and other Linux distributions that support UFW firewall.
This command activates the Uncomplicated Firewall on Ubuntu and other Linux distributions that support UFW firewall. The output will show you the rules for both incoming and outgoing traffic.
You need to reboot the machine before you connect using RDP. Let me now go on a Windows machine and try to connect. Enter the IP address of the Ubuntu machine, then a full colon plus the port number at the end. Enter the password you configured, and voila! You now have an Ubuntu 22.04 VPS running with a GUI desktop on Contabo, accessible from anywhere with RDP.
Don't forget to set up a firewall and take additional security measures to keep your VPS safe. Also, play around with the display settings on the Remote Desktop Connection application to achieve faster connection.
Remember, if you found this tutorial helpful, hit that like button and subscribe for more tech tips and tricks. Until next time.