There is a new version of this tutorial available for Ubuntu 17.04 (Zesty Zapus).

How to install a Ubuntu 16.04 (Xenial Xerus) Minimal Server

This tutorial shows the installation of a Ubuntu 16.04 minimal server in detail with many screenshots. The purpose of the guide is to show the basic installation of Ubuntu Xenial Xerus that can be used as a basis for the other Ubuntu tutorials here at howtoforge like our perfect server guides.

1. Requirements

To install a Ubuntu Server, you will need the following prerequisites:

2. Preliminary Note

In this tutorial I use the hostname with the IP address and the gateway These settings might differ for you, so you have to replace them where appropriate.

3. The Base System

Insert your Ubuntu install CD into your system and boot from it. When you install the OS in a virtual machine like I do it here, then you should be able to select the downloaded ISO file as source for the CD/DVD drive in VMWare and Virtualbox without burning it on CD first.

The first screen will show the language selector. Plese select your language:

Then choose the option Install Ubuntu Server:

Select your language again (?):

Then choose your location. The location settings are important for the keyboard layout, locale and timezone of your server:

Choose a keyboard layout: You have the option to let the Ubuntu installer detect the keyboard layout automatically by choosing "yes" here. I prefer to select the right keyboard from a list and therefore, I choose No & keyboard layout as German:

The installer checks the installation CD, your hardware, and configures the network with DHCP if there is a DHCP server in the network:

Enter the hostname of the system. In this example, my server is named, so I enter

Ubuntu does not let you log in as root user directly. Therefore, we create a new system user here for the initial login. I will create a user with the name Administrator and user name administrator (don't use the user name admin as it is a reserved name on Ubuntu Linux):

Choose a password

I don't need an encrypted private directory, so I choose No here:

Share this page:

Suggested articles

15 Comment(s)

Add comment


From: thctlo

Hai, Thanks, nice and clean.. But now you still have a "slow" responding ubuntu. Dont install the "Standaard system utilities", it safes disk space, and you system wil respond faster. Mostly due to "command-not-found" and the security notice at logon for example.When you use resolvconf  and you added : dns-nameservers do also add dns-domain and dns-search Notice, if both (domain and search)  are used the last in the config wins, so make sure dns-search is last and starts with your primary domain.

And i do advice to NOT use the login administrator.

If your using a server with samba4 (AD)  this wil conflict with the domain user Administrator. so my advice is name it something like nixadmin or sysadmin

And last, If you installed any mail tools at install, which happens also when you install the default utils. Dont forget to check /etc/mailname

Greetingz and Thanks for the nice howto again.

From: Lionel

Hey, can you do one with Ubuntu minimal + LXQt

From: Saulo de Baco

Hi there, when

echo server1 > /etc/hostname, then

# service hostname startFailed to start hostname.service: Unit hostname.service is masked.

Any idea? Tks.

From: Vic Silvano


I am also encountered error when i run the 

# service hostname start

error: ERROR: Failed to start hostname.service: Unit hostname.service is masked.


Anyone who had an Idea?. 


From: till

You can restart the server as alternative to apply the hostname.

From: Vic Silvano

Hi Sir,

I follow all your instruction here . .but my question is how can i use this ISP config 3.1..what Mail that i will use? 

or these ISP are not yet have an webmail access?..

This error that i have encountered:

i type my login https://(My IP):8080/webmail

then error below:

Not Found

The requested URL /webmail was not found on this server.






From: Chales Witely

I am getting a constant "Failed to restart hostname.service: Unite hostname.service is masked."


Unsure of what this is.


From: till

Just reboot the server instead.

From: Liam



This has been a very helpful tutorial, and I'm not sure if anyone has brought this up, but at the very end, the "Service hostname start" part, I get an error, "Failed to start hostname.service: Unit hostname.service is masked."

I went back and followed your process again, and still the same issue. I'm running Virtual Machine on iOS. Not sure if that makes a difference. I couldn't find any work arounds online either. Any ideas?

From: till

Just restart the vm to apply the hostname.

From: lucas

Great tut! I got all the way through it and when I ran 'service networking restart' it returned "Failed to start hostname.service: Unit hostname.service is masked."

Everything else worked as the tutorial described. I want to make sure this is working before i move forward. Thanks - L

From: chech

The title is misleading. This is by no means a minimal install, just a normal server install.

From: Renata

This aplication is useful when ubuntu alredy installed? I have doubts about use CD and make a system boot and lose my work documents there are in computer. Thanks by your attention. Forgive my bad english rsrsrs

From: till

This document describes how to install a new Ubuntu server. This tutorial is not the right one for you if you have already Ubuntu installed :)

From: ertuzio

How big is that server when everything is installed? I mean how many GB of space does it use?