There is a new version of this tutorial available for Debian 11 (Bullseye).

How to install a Debian 9 (Stretch) Minimal Server

This tutorial shows how to install a Debian 9 (Stretch) minimal server. The purpose of this guide is to provide a minimal Debian setup that can be used as the basis for our other Debian 9 tutorials and the perfect server guides here at

1 Requirements

To install a Debian 9 server system you will need the following:

 I will use the 64Bit installation media here.

The Debian Download links change regularly. If the above links do not work anymore, then go here to fetch the latest Debian netinst image:

2 Preliminary Note

In this tutorial, I will 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 Debian Base System

Insert your Debian 9 (Stretch) network installation CD into your system and boot from it. When you use a virtualization software like VMware or Virtualbox, then select the Debian 9 minimal iso file as source file for the DVD drive of the VM, you don't have to burn it to a CD or DVD for that first.

Select Install (this will start the text installer - if you prefer a graphical installer, select Graphical install):

Debian 9 Boot Screen

Select your language:

Select Debian installation language

Then choose your location:

Select server location / country

Choose a keyboard layout:

Select Keyboard Layout

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

Loading additional components

Configure network with DHCP

Enter the hostname. In this example, my system is called, so I enter server1:

Enter the server hostname

Enter your domain name. In this example, this is

Enter the domain name of the Debian server

Afterward, give the root user a password:

Enter the root password

Confirm that password to avoid typos:

Confirm the root password

Create a Linux user account, e.g. your name or nickname. For this example installation, I will choose the name "administrator" with the user name administrator (don't use the user name admin as it is a reserved name on Debian Linux):

Enter realname of the user

Enter username

Set a password

Repeat the user password

Now select the timezone for the server

Select the time zone

Now you have to partition your hard disk. For simplicity's sake I select Guided - use entire disk - this will create a large partition for the / file system and another one for swap (of course, the partitioning is totally up to you - if you know what you're doing, you can also set up your partitions manually). For hosting systems like the ISPConfig 3 perfect server tutorials you might want to choose e.g. 30GB for / and a large /var partition as all website and email data is stored in subdirectories of /var.

Partition method

Select the disk that you want to partition:

Select Disk partition

Then select the partitioning scheme. As mentioned before, I select All files in one partition (recommended for new users) for simplicity's sake - it's up to your likings what you choose here:

Partition scheme

When you're finished, select Finish partitioning and write changes to disk:

Finish partitioning

Select Yes when you're asked: "Write changes to disk?":

Write partitions to disk

Afterward, your new partitions are created and formatted. Now the base system is installed:

Installing the base system

Share this page:

16 Comment(s)

Add comment

Please register in our forum first to comment.


By: calbasi

In a fresh debian install I get:


---------------------------------       localhost127.0.1.1       debian# The following lines are desirable for IPv6 capable hosts::1     localhost ip6-localhost ip6-loopbackff02::1 ip6-allnodesff02::2 ip6-allrouters-----------------------------------

And /etc/hosname with just my machine/domain name:


I wonder if these settings are OK, and, thus, your manual has an (old) alternative.


By: Someone

Update links from 9.0.0 to 9.1.0

By: thctlo

Hai, Just tried your vm for a samba 4 install, but that errors at some point due to the existance of Administrator as linux users. deleting your default administrator user fixes the problem.


but great howto again.



By: AnHa

When I try to install debian9.1.0 amd64 on my VMWare-System 8.0.2, the base system installation failes with error:"Debootstrap waring: Failure trying to run: chroot /target dpkg --force-depends --install /var/cache/apt/archives/base-passwd_3.5.43_amd64.deb". Trying to ignore does not help, I can't go on with installation.

Having a look @ /var/log/syslog, I see something like "dpkg: error processing package base-passwd (--install): subprocess installed post-installation script was killed by signal (Segmentation fault)"

Any suggestions?

By: AnHa

After updating the VMWare-Version everything works fine

By: Adam

would it be possible to create one of these perfect server setups that has been tested and oriented towards Google Cloud Compute Instances?

There is some of this that is simply not going to be doable...beginning with the very first part of this. Trying to start with a blank canvas is a little difficult when Google Cloud instances have disks with O/S's already on them when the instance is first setup.

By: till

An OS instance at Google is a minimal setup, so the perfect server setups work perfectly on cloud servers as well.

By: Vincent

 I have a 404 on the debian 9 64 bit link...

By: manuel guerra

i follow all this instructions and i got several isues, one of those with the net, it presents malfunction and doesnt apply the "apt-get update" command, so im enabled to update the system

By: igor


i can't find the link to the virtual machine mentioned in section 8 of the tutorial.

By: till

In the menu on the right side near the top, right below the big red download icon. If you don't see a menu at the right, deactivate your ad blocker.

By: gui


I try to follow your instructions, but with version 9.4, installing debian on a laptop. My problem is that wifi won't come up after the reboot! All help I find on forums start with apt-get-something but without a network tha won't work!

ifup wlan0 gives me 'unknown interface wlan0'

Why did the installer not remember?

By: steam

I don't have a network after I reboot from fresh install. Even if I plug in a UTP-cable, I cannot ping the network (or do apt-get). During the netwerk install wifi worked grait!

How should I proceed?


A much easier method is to use a fully automatic installation ISO. The FAI project provides such ISOs. You can also create customized ISO images, that already include a list of software packages using a simple web interface. HAve a look at

By: Conrad

With the gateway, to get internet to my pc the modem/router sits on an ip address x.x.x.138 now if I set the server gateway to x.x.1.1 will that work or does it have to be the same as what I get internet from the ISP?

By: Conrad

Sorry to be a pest, but what I am trying to say is, should I set the values I see in 'ifconfig' and use to ssh into the device?