Web Server - Ubuntu Xenial Xerus 16.04 LTS ESM

I switched my VPS from a provider in Thailand to Server4you on a server located in Köln/Germany. As per 24th September 2021, the following OS are available for their least expensive Server S configuration: CentOS 7, Debian 8, and Ubuntu 16.04 LTS. I chose Ubuntu, as for Ubuntu Extended Security Maintenance is available with security updates until April 2026.

Server Setup

  • Register a Virtual Server at Server4you, then login and Restore under menu vSERVER. Choose your preferred OS (Ubuntu 16.04 LTS with LAMP) and wait for about 30 minutes for the server image to be ready. Note that Server4you has sites with TLD .net, .com, and .de, you must login on the same TLD you created the server.
  • Once the server is ready login via SSH as root with the password you defined in the previous step. Create your administrative user and add him to the sudoers:
    sudo adduser <user>
    sudo vim /etc/group
    -> sudo:x:27:<user>
  • For Ubuntu the first thing you should do is to register on the Ubuntu Advantage Portal so you can enable the Ubuntu 16.04 LTS Extended Security Maintenance (ESM) with the following commands:
    # Install the latest UA client
    $ sudo apt update
    $ sudo apt install ubuntu-advantage-tools
    
    # Use the client to attach this machine to your contract using your UA token
    $ sudo ua attach <token>
    
    # Ensure ESM-infra is enabled as well:
    $ sudo ua enable esm-infra
    $ sudo apt update
    $ sudo apt upgrade
    
    # UA status
    $ sudo ua status
  • change the machine name:
    sudo edit /etc/hostname
    sudo edit /etc/hosts
  • enable force_color_prompt=yes in file ~/.bashrc and /root/.bashrc
  • add the following line to the sudoers file (not necessary for Debian) so .bashrc is read from root's home when opening a root shell:
    sudo visudo
    Defaults set_home

Apache

  • Apache gets installed with image Ubuntu 16.04 LTS with LAMP through Server4you's setup.
  • Keep default apache installation as his will remain maintained through Ubuntu ESM. On time of installation (24th Sep 2021) this is Apache 2.4.18 and PHP 7.0.
  • Setup your virtual hosts
  • Install Let's Encrypt
  • Install missing php modules:
    sudo apt install php php7.0-mysql php7.0-sqlite

ProFTP Server

UFW

BackupPC