Ubuntu LTS Bare Metal Server

Basic Linux server installation on server hardware

For many self-hosted server setups, you need to start with a basic Linux server, such as Ubuntu LTS. Follow these instructions on setting up a basic bare bones server.

Step 1: Download Ubuntu Server LTS (Long Term Server)

Go to Canonical's Ubuntu website and download the latest ISO image.

Burn the ISO to a DVD or make a bootable USB stick with a utility like BalenaEtcher.

Step 2: Enable Virtualization hardware in the BIOS of the server.

If you bought a CPU with VT-x or AMD-V, then you can run virtual servers on one machine. Determine the key to press in order to enter the BIOS screen for the motherboard by Googling the manufacturer name and "BIOS". Turn on the computer and press the key to enter the BIOS (usually Esc or one of the Function keys). Find the option that says "Intel VT-x" or" Intel Virtualization Technology" or "AMD-V" or "Virtualization Extensions" and enable it. This option may be under a submenu under Processor, or Chipset, or Advanced CPU Configuration or Northbridge. One you have enabled the option, "Save the settings to CMOS and Exit the BIOS".

Step 3: Install the server with the Ubuntu DVD or bootable USB stick.

You may need to enter the BIOS again and enable the "Boot Order" so the server computer can boot with the DVD drive or a USB. Otherwise, the BIOS may only allow booting from the hard drives (security feature). You can disable this after you finish installing the server.

There are many great online tutorials on how to install Ubuntu Server. Follow these tutorials and customize your installation with the following considerations:

Customization Considerations:

  • Install the baremetal hypervisor server on to a separate SSD (you can hardware RAID that if you are extra careful) that is different than your main RAID hard drives that will store your virtual machines and other files. This way, if you need to replace the much used hard drives, you don't need to to reinstall the bare metal server.
  • Partition your installation with separate root, boot, mount, and swap partitions:
    • /boot =  1 GB (ext4 file system)
    • swap = 2 GB (if you have lots of RAM, you don't need much swapfile space)
    • /mnt = 100 MB (ext4 file system) * This prevents backup scripts from filling up the root partition if copying to improperly mounted network drives
    • / = leftover space on the disk (ext4 file system)
  • If you use whole disk encryption at this stage, you run the risk of needing to physically present to manually typing in your root password everytime the server restarts or reboots after a power outage.
  • If you encrypt the "Home" directory, you run the risk of some things stored in your "Home" directory not running until you log in as the user. So don't store scripts or virtual machine images in your Home directory if you choose to encrypt.
  • Allow Ubuntu to "install important security updates automatically".
  • If you have the option of runing tasksel during the installation phase, consider installing these at this point (if not, we will show you how later):
    • Virtual Machines KVM
    • OpenSSH server

Various Tutorials and Resources on installing Ubuntu Server




Step 4: Perform some initial housekeeping items

Once the server is installed, you can remove the installation media and boot in to the server. Using the administrator username and password you created when you installed the server, log in to the server.

Update and upgrade the server:

$ sudo apt-get update && apt-get upgrade


Allow the server to automatically remove unused dependencies (to keep the /boot from filling up). Edit the config file with nano:

$ sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Find the line that looks like the following and remove the "//" characters in the beginning of the line (uncomment), and change the parameter to "true":

Unattended-Upgrade::Remove-Unused-Dependencies "true";

Press Ctrl-O to save, Ctrl-X to exit.

Lower the wait time "Raising networking interfaces...." when booting the server, in case you have multiple network interfaces and not all are connected to a network with DHCP:

$ sudo nano /etc/dhcp/dhclient.conf

Edit the timeout to be 15 seconds:

timeout 15;