18Sep/190

LEMP: Debian, NGINX + Certbot, MariaDB, PHP

This tutorial shows you how to prepare your Debian VPS for hosting your website.
We are not going to perform any fine-tuning or optimization on the default configuration files. So neither NGINX, MySQL or PHP (LEMP) will get any other than the necessary configuration changes in order to run a website properly.

1. Install the Software

NGINX, Certbot, PHP installation:

:~# apt install nginx python3-certbot-nginx php-fpm php-mysql zip unzip pwgen

MariaDB can be installed as follows:

:~# apt install mariadb-server

Installing MariaDB by using the default-package repositories might not install the latest version of MariaDB. For the latest MariaDB version visit Official MariaDB Repo and follow the instructions.

2. Configure the Software

You should secure your MariaDB installation first:

:~# mysql_secure_installation && mysql_upgrade
:~# mysql

 Welcome to the MariaDB monitor.  Commands end with ; or \g.
 Your MariaDB connection id is 55
 Server version: 10.4.6-MariaDB-1:10.4.6+maria~buster mariadb.org binary distribution
 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

We will now run Certbot for our default vmXXXX.contaboserver.net hostname, you could also simply add any other website.

Important:
In case you want to secure multiple domains you can simply add them with another "-d" option behind the command, e.g.:

:~# certbot --nginx -d $(hostname) -d vmXXXX.contaboserver.net

Certbot will also create a default configuration for your website within /etc/nginx/sites-enabled/

Let's configure PHP, so NGINX knows where to send PHP-Files for interpreting. Check where PHP-FPM listens to:

:~# grep "listen =" /etc/php/7.3/fpm/pool.d/www.conf
listen = /run/php/php7.3-fpm.sock

The pool configuration file got a lot of parameters which can be adjusted according to the hardware your server is running and the type of scripts hosted on your website.
Open /etc/nginx/sites-enabled/default and you will see a PHP section which is commented out, you could install multiple PHP-Versions, add a server or VPS for PHP interpreting only and much more.
We will add the following lines to any "server {}" configuration we want PHP to be available on:

location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}

You also need to expand the "index" line with "index.php" :

 index index.php index.html index.htm; 

:~# systemctl restart nginx

We will now download and install phpMyAdmin and make it available. On Debian 10 phpMyAdmin is not available via "apt install phpmyadmin" command, they are probably going to add the package once the Alpha got stable.
For downloads visit Official phpMyAdmin Website . As we are using PHP 7.3 we need to download the Alpha Version, which is still in testing phase.

:~# mkdir /var/www/phpmyadmin
:~# cd /var/www/phpmyadmin/
:~# wget https://files.phpmyadmin.net/phpMyAdmin/5.0.0-alpha1/phpMyAdmin-5.0.0-alpha1-all-languages.zip
&& unzip phpMyAdmin-5.0.0-alpha1-all-languages.zip
:~# mv phpMyAdmin-5.0.0-alpha1-all-languages/* .

Create a database user and import the database; run "pwgen" to generate random passwords.

:~# mysql < sql/create_tables.sql
:~# mysql

CREATE USER 'phpmyadminuser'@'localhost'  IDENTIFIED BY 'USE ONLY SECURE PASSWORDS !!';
GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'phpmyadminuser'@'localhost'
IDENTIFIED BY 'USE ONLY SECURE PASSWORDS !!'; FLUSH PRIVILEGES;

Let's configure phpMyAdmin to use the database. Uncomment the following lines in config.inc.php:

/* User used to manipulate with storage */
  $cfg['Servers'][$i]['controlhost'] = 'localhost';
  $cfg['Servers'][$i]['controlport'] = '3306';
  $cfg['Servers'][$i]['controluser'] = 'phpmyadminuser';

:~# cp -p config.sample.inc.php config.inc.php
:~# pwgen 32 1 #Copy the password for blowfish secret
:~# chown www-data: /var/www/phpmyadmin -R

Last but not least, configure the webserver to make the content available.
Add the following section to the domain you want to expose it on:

    location /phpmyadmin {
           root /var/www/phpmyadmin/;
           index index.php index.html index.htm;
           location ~ ^/phpmyadmin/(.+\.php)$ {
                   try_files $uri =404;
                   root /var/www/phpmyadmin/;
                   fastcgi_pass unix:/run/php/php7.3-fpm.sock;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           }
           location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                   root /var/www/phpmyadmin/;
           }
    }

5Sep/190

Webspace: Creating a Blog in Minutes

This tutorial will show you how to create a blog and publish it world wide in just a couple of minutes.

The requirement for the Softaculous automatic WordPress installation is a Webspace package L or higher.
Alternatively, WordPress can be installed manually by uploading files via FTP.

1. Login to your cPanel account after receiving the e-mail containing the login information.

2. Within "Softaculous Apps Installer" click on "WordPress" to open the following site:

3. This site shows all existing WordPress installations, as we are setting up WordPress for the first time we will hit "Install Now" in order to install our first WordPress site.

In case you want the WordPress site to be hosted on a subdomain or alternate directory you will be able to adjust the configuration to meet your requirements. We are going to use the main domain the Webhosting package was set up with, in this case we will have to remove the "wp" within the "in directory" option.

Set a secure password, adjust the remaining configuration options and hit "start installation".

That's it!
The Blog is installed, you are ready to upload content and share it world wide.

We recommend enabling automatic updates or at least perform manually updates often.
WordPress is a very common software used for websites, especially for blogs. As a very high amount of websites run WordPress, hackers always work on finding new security holes in order to hijack or even infect the website with malware.
WordPress updates are very important in order to run a safe website.
You should make sure to not run any outdated software on a website, even WordPress plugins need to be updated as well.

In case you want to reinstall the blog, use another software or the Contabo Website Builder instead, you are able to remove WordPress at any time using the Softaculous App Installer WordPress site within your cPanel login.

Posted by: Gianni-Donato | Tagged as: , , , , , No Comments
8Aug/192

Installation of a graphical user interface for Linux

All Linux-Server operating systems are installed by default without a graphical user interface (GUI). A GUI on a dedicated server can only be accessed if a KVM is connected.
This tutorial will guide you through an easy installation process of the two most common GUIs for Ubuntu, Debian and CentOS.
Please note that you will always have to create an additional user for your GUI login, since a login as root is not possible.
In order to access your GUI, you need to use your VPS VNC connection, or access your dedicated server via KVM. KVM access has to be ordered additionally for our dedicated servers, it is not included by default.

Also please be informed that VNC is NOT an encrypted connection method. We recommend to use xRDP if you plan on using your sevrer exclusively with a GUI.

Ubuntu 16.04 / 18.04

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the Ubuntu-Dekstop GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install ubuntu-desktop -y && init 6

Alternatively, the following command installs the Kubuntu-Desktop (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install kubuntu-desktop -y && init 6

You can connect to your VPS via VNC and login to your new GUI, or via KVM if you have a dedicated server.

Ubuntu 18.10 and later versions

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

You can choose from a variety of GUIs, which will automatically be installed with the "tasksel" tool:

apt update && apt upgrade -y && tasksel

Choose a desktop of your liking and confirm, please do not install multiple desktop environments at the same time. Reboot your server to make your GUI accessible via your VPS VNC access or KVM in case of a dedicated server.

CentOS 6

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you will need to edit your "/etc/inittab" to boot to runlevel 5 so that you will be able to use the GUI after (re)boot:

nano /etc/inittab

Please change the following line:

id:3:initdefault: -> id:5:initdefault:

Save your changes and close the editor by pressing strg+o, enter, strg+x.

The following command will update your server and install the GNOME GUI and required software (the server will be rebooted automatically):

yum update -y && yum -y groupinstall "Desktop" "X Window System" "Fonts" && init 6

Now you can access your GUI via your VPS VNC access or KVM in case of a dedicated server.

In order to install the KDE GUI, please use the following command. Your server will also be updated and rebooted:

yum update -y && yum -y groupinstall "KDE desktop" "X Window System" "Fonts" && init 6

Now you can access your GUI via your VPS VNC access or KVM in case of a dedicated server.

CentOS 7

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the KDE GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

yum update -y && yum -y groupinstall "KDE Plasma Workspaces" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6

As alternative the following command for an installation of the GNOME GUI (the server will update and reboot automatically):

yum update -y && yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6

You can connect to your VPS via VNC or KVM in case of a dedicated server and login to your new GUI.

Debian 8 and later versions

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the GNOME GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install gnome -y && init 6

As an alternative the following command for an installation of the KDE GUI (the server will update and reboot automatically):

apt update && apt upgrade -y && apt install kde-standard -y && init 6

Now you can connect to your VPS via VNC or KVM in case of a dedicated server and login to your new GUI.

Posted by: Philipp | Tagged as: , , , , , 2 Comments
24Jul/190

Debian & Ubuntu Upgrade

At Contabo, we always offer you the latest version of many popular Linux operating systems. This tutorial shows you how to upgrade from an old version to the latest Debian (stable) or Ubuntu LTS.

Important:
Before proceeding make sure to have a local backup of all important files, the upgrade might fail and your server becomes inoperable!
In case you are upgrading a VPS with 100% SSD, creating a prior snapshot will be sufficient for backup.
The upgrade really depends on the customization performed on the system and the amount of software installed. The higher the amount of additional software, the higher the risk of package-conflicts which need to be solved manually.

1. Preparation

The system needs to get all pending updates for your software packages, prior to proceeding. If you have not installed updates recently this might take some time.
Packages which were installed due to dependencies and are not needed anymore should be deleted as well.

:~#apt-get update && apt-get upgrade -y
:~#apt-get autoremove

2. Adjusting the apt.conf (Debian)

The following commands will replace "stretch" with "buster" in any repository entry.
In case you manually added additional repositories they might fail, you will have to manually investigate or disable those package sources.

:~#sed -i 's/stretch/buster/g' /etc/apt/sources.list
:~#sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*

Usually there should be no additional package sources configured and your sources list will have the following configuration:

:~# cat /etc/apt/sources.list
deb http://asi-fs-n.contabo.net/debian buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
deb http://asi-fs-n.contabo.net/debian buster-updates main contrib non-free

3. a) Start upgrade (Debian)

The following commands will start the upgrade and will also update the packages.

:~#apt clean && apt update
:~# apt upgrade -y
:~# apt dist-upgrade -y
:~# apt autoremove
:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

3. b) Start upgrade (Ubuntu)

Ubuntu has got a Tool/command for this purpose: "do-release-upgrade" it will update to next available LTS version, so 14.04 LTS to 16.04 or 16.04 LTS to 18.04 LTS.
In case the command was not found and the tool is missing, it can be installed with following command:

:~# apt-get install update-manager-core

4. Restart server

In order to use the recently installed kernel, you will have to reboot your server. After rebooting you are running the latest version of Debian (stable)/ Ubuntu LTS.

In case of any issues or inquiries, our customer support team is available to assist you.

Posted by: Gianni-Donato | Tagged as: , , , , , No Comments
6Jun/190

Migration using Plesk

The migration of a website is always a challenging task for the webmaster. Beside a loss of reputation and ranking on search engines, dead links or famous 404-errors, there are some other risks during such a migration. But often it is more dangerous to leave the website on an old server, since old software can become a serious security risk.

Plesk Migrator

If you want to migrate from a current Plesk server with an outdated operation system or an EOL Plesk version, cPanel, Confixx, Helm or DirectAdmin server, Plesk provides the Plesk Migrator.

The Plesk Migrator is an extension which needs to be installed first. Within Plesk navigate to "Extensions", search for "Plesk Migrator" and then you can install it.

After the installation you can open the "Plesk Migrator" at the tab "My Extensions".

The next step is to "Start new Migration" and select the panel type, from which you want to transfer the data. Important: For this you need root access via SSH to the source server. Beside password authentication you can add an SSH key to the server.

If SSH access is not available and only FTP is possible, please see the next chapter Site Importer.

After you have entered the login data, the connection to the source server is started and depending on the server, different migration options are shown.

On a Plesk-to-Plesk migration you can see the subscriptions, customers, reseller and hosting plans.

In addition you can either migrate the customers of a reseller or assign them to a new reseller. After everything is selected, you can continue with a click on "Migrate". At first there are some checks on Apache modules or PHP versions. If there are no errors or you want to ignore possible hints, the migration will start and you can watch the status of the migration.

In case you want to restart the migration after some days, you can click on "Restart Migration".

You can find further information in the Plesk Migration Guide and also in a support article.

Site Importer

In many cases, you already have a running website and want to migrate it with a few clicks. Likely examples are: you have just started with Plesk, you manage your website using a different panel like cPanel or DirectAdmin, or you have a server with a pure LAMP installation.

In this case, Plesk offers an extension called Site Import.

This is also an extension which needs to be installed. Therefore navigate to "Extension" in your Plesk and search for "Site Import", which can be installed then.

There a two different ways to import your website with the Site Importer:

You can login as server administrator and open "Site Importer" at "Extension" - "My Extensions". Alternatively you can navigate to the subscription and select "Website Importing". In the next step, you need to enter the login data for SSH or FTP.

After you entered the login data and clicked "OK", the connection to the source server will be started and the necessary information will be gathered.

If the file structure can not be detected automatically, you can enter additional information like the location of the home directory.

Website software like WordPress, Joomla, Drupal und PrestaShop are recognised automatically and the import is easy. Further information can be found in the Plesk documentation.

Beside websites, this useful extension can also import email accounts. For this choose "Mail Importing" in the subscription. After a click on "Import mail messages", you need to enter the login data and destination email account. If the the email server can not be detected through the login data, you can enter the necessary details at "Show advanced options". With a click on "OK" the import starts.

Additional information is also available on the Plesk website.

Conclusion

We cannot eliminate the risks of a website migration, but minimize them since Plesk offers some useful tools to make a migration easier and reduce the human factor. But the most important thing for a successful migration is a detailed and well thought out planning.

Order a VPS from Contabo and you get the Plesk edition of your choice one month for free! You can also find further information on our Plesk information site.

Posted by: Torsten | Tagged as: , , , , No Comments
24Jan/190

Installation of Softaculous in Plesk and cPanel

Softaculous offers a huge number of scripts which can be installed by the popular „Auto Installer“ under the Plesk and cPanel administration. For Plesk you can activate Softaculous only on a Linux operating system. The free version gives you access to more than 50 scripts whereas the fee-based, fully-licensed version offers around 450 scripts. An overview of the supported scripts can be found here.

Procedure under Plesk

For Plesk 12.0+ versions

The installation of Softaculous under Plesk can be performed by just a few clicks. Please login to your Plesk Control panel with your root user. Afterwards go to the "Server Management -> Extensions" page and click on the "Extensions Catalog" tab. Once done you can search for Softaculous and click on the "Install" button.

Once you have finished the installation of Softaculous you can find it under the "My Extensions" tab.

Please take note that the free version of Softaculous is installed per default. In case that you need the full license for Softaculous, you can order it directly in the "My Extensions" tab next to Softaculous under the "Buy" button.

For older versions of Plesk please use the following procedure for the installation of Softaculous:

1. ionCube loader activation

Befor you start with the activation of the ionCube loader, you have to check if this one is not already installed and enabled on your server.

To check the ionCube version please connect to your server via SSH as root and use the following command:

find / -name 'ioncube_loader_*'

To check if the ionCube loader is activated you can use the following command:

php -m | grep -i ioncube

2. Installation of Softaculous

When the ionCube loader is activated you can continue with the installation of Softaculous. Therefore please take care that you have enabled POSIX. You can check this by executing the following command:

php -m | grep -i posix

In case that POSIX is not enabled, you can enable it in „Tools & Settings“ → „PHP Settings“ → Please select the related PHP handler and continue with the next steps. Once you have taken care that POSIX is enabled, please connect to your server via SSH as root and execute the following commands:

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh

Once the commands are executed the installer will start with the installation process of Softacoulous. During the installation scripts will be downloaded and the download activity will be shown on the screen. Afterwards you can select Softaculous in your Plesk administration.

Procedure under cPanel/WHM:

1. ionCube loader activation

To activate the ionCube loader on your cPanel administration please follow the steps below:
* Login to WHM (root)
* Got to Server Configuration → Tweak Settings → PHP
* Select „ioncube“ check box for „cPanel PHP loader“
* Click on „Save“ button.
* That's it. This will enable ionCube for you in 3rd party PHP binary.

ioncube_activation

2. Installation of Softaculous

Once you have activated the ionCube loader you have to connect to your server via SSH as root and execute the following commands:

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh

Afterwards go to WHM > Plugins > Softaculous – Instant Installs

The following webpage should open if the installation was successful:

softaculous_en

There you can purchase the fully licensed version, if required.

General information about Softaculous

More detailed information about Softaculous and an overview of the current apps can be found using the links below:

https://www.softaculous.com/
https://www.softaculous.com/softaculous/apps

31Aug/180

SRV Records – How do I use them correctly?

Definition of an SRV record

With a Service Resource Record (short: SRV record) you can make services, which are usually available via an IP:PORT combination, reachable using a DNS host name. Important to note regarding SRV record is the fact, that they only work if an application has been specifically programmed to make use of them. Examples for this are TeamSpeak3 or Minecraft. SRV-Records can not be used to point a DNS name to an IP address/port combination for arbitrary use by any application.

Example - Teamspeak:
Usually TeamSpeak is using the protocol UDP over port 9987. If you are running a TeamSpeak instance with the IP 123.124.125.126 every client that wants to connect has to enter the IP:port combination of 123.124.125.126:9987. If you change the port or the server IP, you have to inform everyone about the new combination. With SRV records it is possible to connect to TeamSpeak using a DNS host name like ts.mydomain.com

In general every SRV record contains the same information:

_SERVICE._PROTOCOL.yourdomain.tld 86400 IN SRV PRIORITY WEIGHT PORT SERVER

In this example:

_ts3._udp.ts.mydomain.com 86400 IN SRV 0 5 9987 ts.mydomain.com

Values for priority and weight can usually be left at their defaults, they are only used if two or more SRV records with the same name exist. Please note that for the data field, you cannot simply add an IP address here. Instead, you will have to add a valid DNS host name which in turn resolves to an IP address by using an A record, so make sure that the host name you set there exists.

How to create an SRV record at Contabo

  1. Log in into your Contabo customer control panel using https://my.contabo.com
  2. Using the menu item "DNS Zone Management" you can edit a DNS zone and create a new record
  3. The type has to be SRV
  4. Fill in the form. An example can be seen below (please click on the picture in order to increase its size):
  5. The finished record should look like this:

_ts3._udp.ts.mydomain.com 86400 IN SRV 0 5 9987 ts.mydomain.com

From now on your users can connect to TeamSpeak using only the subdomain ts.mydomain.com

For Minecraft, the record may look like this:

_minecraft._tcp.mc.mydomain.com 86400 IN SRV 0 5 25565 server01.mydomain.com

Please make sure to consult the documentation of your service or application regarding whether SRV records are supported and what scheme they should use.

Posted by: Markus | Tagged as: , , , , No Comments
9Aug/180

Full Monitoring

The optional upgrade Full Monitoring from Contabo is an extensive monitoring tool for your VPS and Dedicated Servers. We are going to present the features of this tool in this tutorial.

Why Full Monitoring?

By the help of Full Monitoring, outages can be detected quickly.

The key benefit of this tool is the immediate notification via SMS (text message) and/or e-mail, should an outage of a server or of only a running service on a server happen. It is like an alert which signals a need for action! We all know and are aware, that a downtime is always a very unpleasant scenario. You can surely understand, that in such a situation it will be beneficial, if you are aware of it immediately. Full Monitoring enables you to react and to take necessary appropriate actions in order to recover all services as soon as possible. In addition other measures can be started, as informing your important customers, for instance.

The administration of services and functions is separated. The contacts - it does not matter if they are e-mail or SMS contacts - can be assigned to the services  which are going to be monitored in any combination.

Furthermore the traffic graphs for VPS and Dedicated Servers can be displayed.

How does Full Monitoring work?

You will receive special login data for Full Monitoring. After logging into Full Monitoring, the screen could look as follows:

We already added two contacts who should be notified. It is only necessary to click on „Add contact“ under „Alert contacts“. Then you can choose the type of contact, with „E-Mail“ and „SMS“ (text message) being the two available options. Please choose the appropriate form of communication depending on your requirements. Under „Services“ you can add services after protocol and port. Particularly, you can assign different contacts to the corresponding services.

In the screenshot you can see that the VPS is online. The services RDP 3389 and http 80 are online, too.

In the following screenshot we reproduce the worst-case scenario when the server is down.

 

In this example, we would send an e-mail to max.mustermann@contabo.com to alert him. In addition we would send a text message to 4912345678.

As a consequence, the services rdp and http would be down, too. We would inform max.mustermann@contabo.com via e-mail and would send a second text message to 4912345678 that RDP is down. In addition we would text a person at 497654321 that the service http is not working.

Given only the webserver is down, but the server is online, we would only send a
text message to 498754321 in this example.

 

For Dedicated Servers already known, we can provide traffic graphs for VPS now as well! In this screenshot you can see the graph for different periods: Daily, weekly, monthly and yearly. For each period you can see the consumed bandwidth for in- and outgoing traffic.

We hope we could introduce this upgrade well and you can see the advantages it has. Could we awake your interest in Full Monitoring? Our whole team would be very pleased to answer your questions. You can find this upgrade during your online order under „Services and upgrades“. You can order the upgrade together with your server online, but it is also possible to order it at any time later by e-mail. For any inquiries, please do not hesitate to contact our customer support team.

Posted by: Alois | Tagged as: , , , No Comments
13Jul/180

Mounting local HDDs via RDP

With RDP it is not only possible to connect to a Windows server. You can also mount local HDDs on the remote Windows server in order to directly transfer data. In this tutorial this process is described step by step.

By the way: In a separate tutorial, we explain how you can connect to your Windows server via RDP. Please read this first in case you are not familiar with RDP yet.

Open your Windows remote desktop connection:

In the sub-menu "Local Resources" you will find the "Local devices and resources" part. Using the "More" button you can choose the HDDs you want to mount on your remote Windows session.



After that you can connect to your server in the way you are used to. During the connection you have to confirm that you really want to allow remote desktop connections to access your local discs.

Once connected you can see the chosen discs directly in the Windows explorer:

Posted by: Julian | Tagged as: , , , , , No Comments
28Jun/180

How do I connect to my Windows server via RDP?

This tutorial will show you how to connect to your Windows VPS or dedicated server at Contabo via RDP from different operating systems.

The following scenarios will be covered:

Connections from desktop operating systems:

  • Establishing a RDP connection from WindowsOS (e.g. Windows 7, 8, 10)
  • Establishing a RDP connection from LinuxOS (e.g. Debian, Ubuntu)
  • Establishing a RDP connection from MacintoshOS (e.g. Apple MacBook)

Connections from mobile devices:

  • Establishing a RDP connection from Android based systems (e.g. Samsung Galaxy)
  • Establishing a RDP connection from iOS based systems (e.g. Apple iPhone)

 

RDP connections from Windows
  • on Windows 7: Please navigate to the "Start icon" of the taskbar and search for "Remote Desktop Connection"
  • bei Windows 8/10: Please navigate to the "Windows icon" of the taskbar and search for "Remote Desktop Connection"

The RDP client should start as follows:

Now you should be able to connect to your server using its hostname (e.g. "vmiXXXXX.contaboserver.net" for VPS or "mXXXX.contaboserver.net" for dedicated servers) or the IP address (e.g. "173.xxx.xxx.xxx"). The RDP session will be established within a few seconds automatically.

Alternatively, you might choose a few options beforehand (e.g. screen resolution and audio settings). Therefore, please click on the "Show Options" button:

Explanations:

  • The screen resolution can be individually modified using the slider
  • If you would like to pass through the audio signal to your local PC, you have to set the "Remote audio playback" function to "Play on this computer"
  • If you would like to make your local printer available on your server, please enable the "Printer" option at the "Local devices and resources" section (Important: The printer device driver must be compellingly installed on your server!)
  • The clipboard is enabled by default, so STRG + C / STRG + V will always work. It can be disabled by disabling its checkbox

 

Troubleshooting:

If you determine issues while connecting to your server, please find enclosed some information about how to fix them:

1. "Remote Desktop can't connect to the remote computer for one of these reasons":

Causes / Solutions:

2. "The remote session was disconnected because there are no Remote Desktop Licence Servers available to provide a license. Please contact the server administrator."

Causes / Solutions:

Obviously, a terminal service was installed on your server and no active licence server has been assigned yet. After the grace period of 90 respectively 120 days, all temporarily licences will be deleted and all further RDP logins will be rejected.

To fix this issue, you either have to delete the terminal service or the affected Windows Registry key

  • If you rent a VPS, you can connect to your server through VNC to perform the required steps:

https://contabo.com/?show=tutorials&tutorial=vnc-connect-vps

  • If you use a dedicated server and you do not have a KVM device attached to your server yet, please get in contact with us at support@contabo.com

* The required server role "Remote Desktop Services" can be deleted at the server manager ("Remove roles and features")
* The affected Registry key can be deleted at the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Important: Please be careful while changing settings at the Windows registry! Please create a full backup of the registry beforehand.

* Now please perform a reboot of your server and you should be able to login to your server afterwards again

 

RDP connection from Linux

Alternatively, you can also connect from Linux to your Windows server via RDP. There is a command line based program called "rdesktop" and it is usable for all available linux distributions.

  • Installation:

sudo apt-get install rdesktop

  • Start the RDP connection:

rdesktop <IP address>

Now the RDP connection has been established and you can login to your server using the initial login credentials.

Important information:

  • In order to be able to establish a RDP connection, your Linux system must have an X11 server available. It should be installed by default if you already use a GUI (graphical desktop environment - e.g. "Gnome" or "KDE")
  • Please note, it is generally not recommended to establish a RDP connection through SSH
  • Alternatively, there is another program called 'freeRDP', which can be used instead of 'rdesktop'. Please find more information about it at http://www.freerdp.com/

 

RDP connection from MacOS

In order to be able to establish a RDP connection from MacOS based systems (e.g. Apple MacBook), a RDP client is also required. Please find enclosed a download URL to get the latest RDP client version:

https://itunes.apple.com/us/app/microsoft-remote-desktop/id715768417?mt=12&ign-mpt=uo%3D4

Afterwards, you can start the RDP client following by entering the Windows login credentials (at the "Domain:" field, you can either use the server's IP address or the hostname):



Please always use the latest RDP client version from iTunes, so it is ensured that no connection issues occur!

Troubleshooting:

1. "Remote Desktop Connection cannot verify the identity of the computer that you want to connect to":

=> This kind of error message is mostly caused by an old respectively outdated RDP client version

Causes / Solutions:

  • Please make sure, that you are currently using the latest RDP client version (download-URL above)

 

RDP connection from Android-based systems

To establish a RDP connection from Google-Android-based systems (e.g. Samsung Galaxy) please use the following RDP client directly from the Google App store. You can always download the latest RDP client version here:

https://play.google.com/store/apps/details?id=com.microsoft.rdc.android&hl=en

 

RDP connection from iOS-based systems

Last of all, we would like to inform you about the possibility of how to connect to your Windows server via an iOS-based system (e.g. Apple iPhone).

Please find enclosed the download URL to get the latest RDP client version:

https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092?mt=8&ign-mpt=uo%3D4

Very important: In order to use the latest RDP client above, iOS version 8.0 is required at least!


If you have any further questions about connecting via RDP to your server or need help, please do not hesitate to contact us at support@contabo.com.