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

The Perfect Server - Ubuntu 16.04 (Xenial Xerus) with Apache, PHP, MySQL, PureFTPD, BIND, Postfix, Dovecot and ISPConfig 3.1

This tutorial shows the installation of an Ubuntu 16.04 (Xenial Xerus) web hosting server with Apache2, Postfix, Dovecot, Bind and PureFTPD to prepare it for the installation of ISPConfig 3.1. The resulting system will provide a Web, Mail, Mailinglist, DNS and FTP Server.

ISPConfig 3 is a web hosting control panel that allows you to configure the following services through a web browser: Apache or nginx web server, Postfix mail server, Courier or Dovecot IMAP/POP3 server, MySQL, BIND or MyDNS nameserver, PureFTPd, SpamAssassin, ClamAV, and many more. This setup covers the installation of Apache (instead of Nginx), BIND (instead of MyDNS), and Dovecot (instead of Courier).

Notice: The ISPConfig 3.1 version that is used in this tutorial is currently in beta state. The ISPConfig old stable 3.0.5p9 version can not be used on Ubuntu 16.04 as it is not compatible with PHP 7.

1. 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.  Before proceeding further you need to have a basic minimal installation of Ubuntu 16.04 as explained in the tutorial.

2. Edit /etc/apt/sources.list And Update Your Linux Installation

Edit /etc/apt/sources.list. Comment out or remove the installation CD from the file and make sure that the universe and multiverse repositories are enabled. It should look like this afterwards:

nano /etc/apt/sources.list


# deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420)]/ xenial main restricted

#deb cdrom:[Ubuntu-Server 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420)]/ xenial main restricted

# See for how to upgrade to
# newer versions of the distribution.
deb xenial main restricted
# deb-src xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb xenial-updates main restricted
# deb-src xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb xenial universe
# deb-src xenial universe
deb xenial-updates universe
# deb-src xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb xenial multiverse
# deb-src xenial multiverse
deb xenial-updates multiverse
# deb-src xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb xenial-backports main restricted universe multiverse
# deb-src xenial-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb xenial partner
# deb-src xenial partner

deb xenial-security main restricted
# deb-src xenial-security main restricted
deb xenial-security universe
# deb-src xenial-security universe
deb xenial-security multiverse
# deb-src xenial-security multiverse

Then run

apt-get update

to update the apt package database and

apt-get upgrade

to install the latest updates (if there are any). If you see that a new kernel gets installed as part of the updates, you should reboot the system afterwards:



3. Change the Default Shell

/bin/sh is a symlink to /bin/dash, however we need /bin/bash, not /bin/dash. Therefore, we do this:

dpkg-reconfigure dash

Use dash as the default system shell (/bin/sh)? <-- No

If you don't do this, the ISPConfig installation will fail.


4. Disable AppArmor

AppArmor is a security extension (similar to SELinux) that should provide extended security. In my opinion, you don't need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn't working as expected, and then you find out that everything was ok, only AppArmor was causing the problem). Therefore, I disable it (this is a must if you want to install ISPConfig later on).

We can disable it like this:

service apparmor stop
update-rc.d -f apparmor remove
apt-get remove apparmor apparmor-utils


5. Synchronize the System Clock

It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet when you run a physical server. In case you run a virtual server then you should skip this step. Just run

apt-get -y install ntp ntpdate

and your system time will always be in sync.


6. Install Postfix, Dovecot, MariaDB, rkhunter and binutils

For installing postfix, we need to ensure that sendmail is not installed and running. To stop and remove sendmail run this command:

service sendmail stop; update-rc.d -f sendmail remove

The error message:

Failed to stop sendmail.service: Unit sendmail.service not loaded.

Is ok, it just means that sendmail was not installed, so there was nothing to be removed.

Now we can install Postfix, Dovecot, MariaDB (as MySQL replacement), rkhunter, and binutils with a single command:

apt-get install postfix postfix-mysql postfix-doc mariadb-client mariadb-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd sudo

You will be asked the following questions:

General type of mail configuration: <-- Internet Site
System mail name: <--

It is important that you use a subdomain as "system mail name" like or and not a domain that you want to use as email domain (e.g. yourdomain.tld) later.

Next, open the TLS/SSL and submission ports in Postfix:

nano /etc/postfix/

Uncomment the submission and smtps sections as follows - add the line -o smtpd_client_restrictions=permit_sasl_authenticated,reject to both sections and leave everything thereafter commented:

submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       -       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

NOTE: The whitespaces in front of the "-o .... " lines are important!

Restart Postfix afterward:

service postfix restart

We want MySQL to listen on all interfaces, not just localhost. Therefore, we edit /etc/mysql/mariadb.conf.d/50-server.cnf and comment out the line bind-address =

nano /etc/mysql/mariadb.conf.d/50-server.cnf

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address           =

Now we set a root password in MariaDB. Run:


You will be asked these questions:

Enter current password for root (enter for none): <-- press enter
Set root password? [Y/n] <-- y
New password: <-- Enter the new MariaDB root password here
Re-enter new password: <-- Repeat the password
Remove anonymous users? [Y/n] <-- y
Disallow root login remotely? [Y/n] <-- y
Reload privilege tables now? [Y/n] <-- y

Then we restart MariaDB:

service mysql restart

Now check that networking is enabled. Run

netstat -tap | grep mysql

The output should look like this:

root@server1:~# netstat -tap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 5230/mysqld

7. Install Amavisd-new, SpamAssassin, and Clamav

To install amavisd-new, SpamAssassin, and ClamAV, we run

apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl postgrey

The ISPConfig 3 setup uses amavisd which loads the SpamAssassin filter library internally, so we can stop SpamAssassin to free up some RAM:

service spamassassin stop
update-rc.d -f spamassassin remove

Edit the clamd configuration file:

nano /etc/clamav/clamd.conf

and change the line:

AllowSupplementaryGroups false


AllowSupplementaryGroups true 

And save the file. To start ClamAV use:

service clamav-daemon start

The following warning can be ignored on the first run of freshclam as we start the ClamAV daemn after we updated the database.

WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.ctl: No such file or directory 

7.1 Install Metronome XMPP Server (optional)

The Metronome XMPP Server provides an XMPP chat server. This step is optional, if you do not need a chat server, then you can skip this step. No other ISPConfig functions depend on this software.

Install the following packages with apt.

apt-get install git lua5.1 liblua5.1-0-dev lua-filesystem libidn11-dev libssl-dev lua-zlib lua-expat lua-event lua-bitop lua-socket lua-sec luarocks luarocks

luarocks install lpc

Add a shell user for Metronome.

adduser --no-create-home --disabled-login --gecos 'Metronome' metronome

Download Metronome to the /opt directory and compile it.

cd /opt; git clone metronome
cd ./metronome; ./configure --ostype=debian --prefix=/usr
make install

Metronome has now be installed to /opt/metronome.

Share this page:

Suggested articles

200 Comment(s)

Add comment


From: Allan

When you are ready for the tutorial Nginx?


Thank you for the excellent work that site.


The community appreciates your commitment.



From: JHR

For some reason mariadb on 16.04 LTS (release) ignores /etc/mysql/mariadb.conf.d/50-server.cnf ...

Thus commenting bind-address do not make mariadb listen on all interfaces.

From: django

I'm getting the following error on 16.04 LTS:

Setting up amavisd-new (1:2.10.1-2ubuntu1) ...Creating/updating amavis user account...Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.invoke-rc.d: initscript amavis, action "start" failed.dpkg: error processing package amavisd-new (--configure): subprocess installed post-installation script returned error exit status 1Errors were encountered while processing: amavisd-newE: Sub-process /usr/bin/dpkg returned an error code (1)

From: till

Check the /var/log/mail.log file for the real error message. If you need further help, please use the forum to post your issue.

From: Jeremy

Did you ever solve this? I am getting the same error

From: Christer

You need a valid domain based hostname:

hostnamectl set-hostname

From: Stefan


From: Gioele

For phpmyadmin to work I had to do:

sudo apt-get install php-gettext

From: Khayo

Thank you! Your tip has helped me, now everything is working! 

From: rtf

MariaDB stores 0000-00-00 00:00:00 instead of NULL if "Expires At" in FTP Options GUI is changed, then blanked out (and saved). Initially, database expires column is NULL when the FTP user is created until a save causes it to change. Other than setting a date a long time in the future, as it stands, there is no way to fix this from the web page or know that it has happened. With 0000-00-00 00:00:00 in the expires column the FTP user will be expired.

As I just installed a new system, this took hours to find, many won't find it, and it will be very frustrating when the FTP login stops working for some unknown (but now we know) reason.

A proposed fix is to change "(expires IS NULL OR expires > NOW())" to "(expires = 0 OR expires IS NULL OR expires > NOW())" everywhere in /etc/pure-ftpd/db/mysql.conf

This has been submitted as a bug to ISPConfig, perhaps they will have a better solution.

From: jar240

my phpadmin installation wouldn't interpret php (it displayed the .php contents as text). I installed php-gettext, with no change in symptoms (restarted as well).


Any ideas?

From: Questler

Step 8.3 doesn't work because of this:

# apt-get build-dep php5E: Unable to find a source package for php5

As i see it, it is only possible to install php 5.6, and it's like this:

# add-apt-repository ppa:ondrej/php# apt-get update# apt-get install php5.6

Or am i wrong?


From: MacDres

Nice - where is the download link for the OVF?

From: till

See download link in the right menu at the top.

From: Lucas

I have a problem with PHPMA. When I try open url PHPMA I see the source code. Can I fix it? ;/

From: ACE

Also u need apt-get install php7.0-mbstring with other php7 modules. ISPConfig installation crashes on that. PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /tmp/ispconfig3-stable-3.1-hash/install/lib/mysql.lib.php:445 Hello 4rom Ukraine

From: Red

The ISPConfig installer throws an error:

PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /tmp/ispconfig3_install/install/lib/mysql.lib.php:445

But I fixed it by installing these packages:

sudo apt-get install php-mbstring php7.0-mbstring php-gettext

From: Enthr

Hi! i followed your step-by-step in this tutorial in a fresh installed ubuntu 16 server, but in the moment of the checkout of the ispconfig page i noticed that the apache its not working properly, because i get a ERR_CONNECTION_TIMED_OUt when i try to enter by the IP or by the domain name of the server, even when i try to see the default page (port 80)...

When i do service apache2 start or restart i get no errors, but its still with the same issue.

¿What can i do? thanks

From: PHP Fatal error:

I get a fatal error when trying to install ISPConfig. It seems to be an encoding (UTF8) error. Isn't mysql using UTF8 by default?

See below:

PHP Fatal error:  Uncaught Error: Call to undefined function mb_detect_encoding() in /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9b                                ebe17996d11dc4863afd8bc/install/lib/mysql.lib.php:445Stack trace:#0 /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/mysql.lib.php(146): db->escape('dbispconfig')#1 /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/mysql.lib.php(228): db->_build_query_string('C                                REATE DATABASE...', 'dbispconfig', 'utf8')#2 /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/mysql.lib.php(267): db->_query('CREATE DATABAS                                E...', 'dbispconfig', 'utf8')#3 /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/installer_base.lib.php(232): db->query('CREATE                                 DATABASE...', 'dbispconfig', 'utf8')#4 /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/install.php(254): installer_base->configure_databa                                se()#5 {main}  thrown in /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/mysql.lib.php on line 445

Warning, I haven't used Unix in 25 years, so I am chipping off a lot of rust here.

Thanks for any insight


From: Joe A

I've done a few builds now and each time I've had issues with phpmyadmin not working.  It appears to be not processing the PHP file.  A friend of mine just built a new 16.04 build and he's seeign the same thing.  


This is what the first few lines of the page say.


<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Main loader script * * @package PhpMyAdmin */ /** * Gets some core libraries and displays a top message if required */ require_once 'libraries/';


From: M


I encountered the same issue!

did you find the solution?

From: Stanislav

A followup to my error message I am receiving ( Uncaught Error: Call to undefined function mb_detect_encoding() in /tmp/ispconfig3-stable-3.1-d30f2c69b1fbfcb9bebe17996d11dc4863afd8bc/install/lib/mysql.lib.php:445)

I went in and edited the the php script so that it passed the UTF-8 check automatically. This allowed the install BUT!!!! I get a blank screen when connecting to my server. ?


From: Enthr

Well, nevermind, i fix it by rebooting the system, it work like a charm

From: Chris Pipkin

once I got the system up, it won't install Wordpress from ISPConfig3.1, also there are a couple of lines missing from the Roundcube  setup, been using Ispconfig for years thanks for keeping it up

From: florian030

I used this tutorial with mysql instead of mariadb. Set installer works, but i needed "apt-get install php-mbstring"

From: Niklas

You need php7.0-zip to install APS-packages. It can't handle the zip's if not installed.

Just run apt-get install php7.0-zip

From: Eudes

The function PHP split() not work anymore on php7




line 168

I change to explode()

Exist best solution?


"mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to undefined function split()"

From: Vladimir

And save the file. To start ClamAV use:

freshclam < -errorservice clamav-daemon start


/etc/init.d/clamav-freshclam stop





From: Vladimir

Please change rm -rf jailkit-2.19* to rm -rf jailkit-2.1* (file still in /tmp :()

From: eudesafp


I followed the tutorial and so far all right!

I like to use the roundcube and I want to use the plugins that ispconfig3 it!


But I see that it still does not work properly with roundcube 1.2 beta:


[09-May-2016 15:24:25 America/Sao_Paulo] PHP Warning:  Declaration of ispconfig3_pass::load_config() should be compatible with rcube_plugin::load_config($fname = '') in /var/lib/roundcube/plugins/ispconfig3_pass/ispconfig3_pass.php on line 0

This happens with all modules ispconfig3 plugin


It is easy to fix this?


Thank you very much.

From: till

Thi is a third-party Roundcube plugin and not developed by the ISPConfig project. You might want to contact the developer of this plugin at Github and report the issue there.

From: Escael

Hello, when will this tutorial to nginx?


From: Johan Ehnberg

To get quotas working in ubuntu cloud, you have to install the package linux-image-extra-virtual. This could be included in the instructions above.

From: Johan Ehnberg

The phrase "and remove the # in front of the first 2 alias lines, add the two other "Alias" statements and add the line "AddType application/x-httpd-php .php" right after the "<Directory /var/lib/roundcube>" line:" and the example box do not match. There are no two other Aliases.

Also, the current version of the file has 'Directory /var/lib/roundcube/' with trailing slash.

From: Johan Ehnberg

HHVM heading number seems odd and maybe should be explicitly optional, too?

From: Johan Ehnberg

"Install Apache..." seems to be missing a heading number

From: Johan Ehnberg

Tuumke, check that the first line of your /etc/hosts file contains the FQDN and public IP of your instance.

From: Johan Ehnberg

phpmyadmin is actually installed in 8, contrary to what the heading 6 states

From: Ugur

Anybody can help me with the Microsoft Azure VM setup with this ? I did almost every step, but in the end I can not connect to ISPConfig, server responding too long. Maybe the problem is my servername, I dont know why. Any help, or any documents for how to set this perfect ubuntu server to Azure VM ?

From: Bill

Regarding "7. Install Amavisd-new, SpamAssassin, and Clamav", does amavisd use of the SpamAssassin filter library make use of the SpamAssassin rules? If so, does CRON in /etc/cron.daily/spamassassin and /etc/default/spamassassin need to be changed to something outher than 0, so the rules get updated?

From: Bill

Can sa-learn [1] be incorporated? Or, does using the SpamAssassin filter library by amavisd preclude using sa-learn?

Can other HowToForges [2] [3] be layered onto The Perfect Server? The perfect server is opinionated. I am asking risk of other how to forge articles undoing the opinionated changes in the very fine perfect server series.





From: Bill

Regarding sa-learn, /etc/cron.d/amavisd-new is invoking /usr/sbin/amavisd-new-cronjob, which does /usr/bin/sa-learn.

From: Bill

I suspect sa-learn is not picking up the list of /var/vmail/[DOMAIN]/[USER]/Maildir created using ISPConfig. I ran /usr/sbin/amavisd-new-cronjob with a -D on the invokation of sa-learn. I only saw 'dbg: locker: safe_lock: created /var/lib/amavis/.spamassassin/bayes.lock.*' for the first domain I created in ISPConfig.

How can make sure sa-learn is picking up all the Maildir's added I the ISPConfig is adding domains/users?

For my perfect server, config is loaded from:

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/init.pre

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/sa-compile.pre

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/v310.pre

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/v312.pre

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/v320.pre

May 16 10:24:41.306 [12731] dbg: config: read file /etc/spamassassin/v330.pre

May 16 10:24:41.307 [12731] dbg: config: read file /etc/spamassassin/v340.pre

May 16 10:24:41.307 [12731] dbg: config: read file /etc/spamassassin/v341.pre

May 16 10:24:41.307 [12731] dbg: config: read file /var/lib/spamassassin/3.004001/

May 16 10:24:41.307 [12731] dbg: config: read file /etc/spamassassin/

May 16 10:24:41.308 [12731] dbg: config: read file /etc/spamassassin/

May 16 10:24:41.308 [12731] dbg: config: read file /var/lib/amavis/.spamassassin/user_prefs


From: Claymenia

Hi've a problem with you install, i've follow all steps with success but when i go in ISP panel -> system -> PHP setting i've php configured and installed !!! Can you help me ?

I'ts possible to install PHP7 & 5 in same, and nginx + apache on your config ?

From: wjk940

After digging into sa-learn in a amavisd-new, spamassassin, postfix, dovecot system, I decided to move the discussion to ISPConfig 3->Installation/Configuration communitity discussion [1].


From: Gijs Noorlander

Will it be possible to install this ISP config beta version and later upgrade to the final, or will there be some mayor changes be applied, so it is not to be adviced?

From: till

You will be able to update to final later with the normal command.

From: Snoopyski

Tks for the howto :-)

Works fine for 3 hours and now, after installing php5 support (howto) I get this on all clients web site !



You don't have permission to access /info.php on this server.

From: Claymenia

I've follow this great tutorial, but when i try to access to phpmyadmin, i've an error 404 on https://urlofmyserver:8080/phpmyadmin... can you help me ?

From: till

You have to enable PHPMyAdmin during its installation by selecting the apache2 option. Selections in apt are done ith the space bar. If you missed to enable PHPMyAdmin, then you will not be able to reach it and get a 404 error. To fix that, run "dpkg-econfigure phpmyadmin" and select apache2 during reconfiguration.

From: Claymenia


i've resolved phpmyadmin install and 404 error but no i've an display error with my phpmyadmin ( and apparently it's a php7 problem... not recognize... and some people recommande an install of php5... can you help me ?

From: till

Did you run " apt-get install php-gettext" as mentined in the comments? After that, phpmyadmin works fine here.

From: max

PHP-FPM not working , probably problem with localtion new /etc/php/7.0/ ?

From: till

PHP-FPM works fine here on my Ubuntu 16.04 server with iSPConfig 3.1. You should check if the paths under System > server config for php are correct.

From: jack

Have same problem here... fresh installation steb by step from this tutorial and phpmyadmin shows only code from index.php and php-fpm doesn't work... :/

From: till

Works fine here in a exact copy of this tutorial. When the php code of PHPMyAdmin is shown then you most likely missed to install mod_php as described in this tutorial.

root@server1:/etc/apache2/conf-enabled# ls -la /etc/apache2/mods-enabled/php*
lrwxrwxrwx 1 root root 29 Apr 21 15:35 /etc/apache2/mods-enabled/php7.0.conf -> ../mods-available/php7.0.conf
lrwxrwxrwx 1 root root 29 Apr 21 15:35 /etc/apache2/mods-enabled/php7.0.load -> ../mods-available/php7.0.load

Please use the forum to get help with debugging the issue on your setup.

From: jack

hm, maybe that is the problem, I don't see comman install "mod_php" in tutorial..?  or what is the exact command? Thanks!

From: till

The command that installs mod_php is this one:

apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap phpmyadmin php7.0-cli php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt  imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext

You can find it on the second page of the tutorial. The exact package name is "libapache2-mod-php". As described above, please ask in the forum for help with your install, you might have installed other conflicting software or missed a command or you got an incomplete base image from your ISP, there are many possible error sources that are not related to this known working tutorial and these problems related to your install can not be discussed here in the comment section.

From: Gertjan

I have a problem with access to MySQL.

I have set a password for 'root' like in this tutorial and also deactivated the plugin unix_socket with the following command in MySQL: update user set plugin='' where User='root';

When I try to install phpmyadmin I get the error access denied for user 'root'@'localhost' (using password no).

I got around this by temporarily removing the root-password. I had to do the same when installing ISPConfig.

After that I had set a root-password again. But now ISPConfig gives an error in the logs and it can not setup/alter MySQL-databases (unless I remove the root-password for MySQL).

Unable to connect to the database: Access denied for user 'root'@'localhost' (using password: NO)

How can I get ISPConfig to work properly as well as have a password for root @localhost in MySQL?

From: till

Check that the correct MySQL root password has been set in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf

From: Gertjan

Thanks, that helped!

Nice tutorial, it works really well on my virtual machine. I added a few things like mod-perl (that should be in the tutorial!).

When 16.04.1 comes out, I hope I can upgrade my 14.04 server to that new version without to much pain...

From: Nikolay

Good day! Setting phpmyadmin - debconf results in an error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using ? password: NO)

From: JOduMonT

this command make me unable to install phpmyadmin and roundcube

echo "update user set plugin='' where User='root';" | mysql -root -p mysql

From: till

This command is required but Ubuntu really messed the MySQL / MariaDB setup up in the 16.04 release by removing the Debian sys-maint-user from /etc/mysql.debian.cnf. Without this command, it is impossible to login to PHPMyAdmin as the newly introduced unix user plugin disallows connections from php applications like phpMyAdmin for the MySQL root user and with this command, you can't install .dep packages that use the Debian MySQL installer anymore due to the missing sys-maint-user.

I moved the command that to the end of the tutorial now (step 18.1) so that it gets executed after the installation of PHPMyAdmin and RoundCube.

From: lnxgs


I followed this guide to migrate from Debian 8 to Ubuntu 16.04. I decided to migrate because Debian offers older packages, I need new feature.

All good! Please add letencrypt part in order to integrate the guide.


Thank you all...


From: JOduMonT


I just don't get it, i'm unable to host any PHP Page except with HHMV PHP technologyAll PHP Page give me a500 Errors. That just happen when I'm using this tutorial for Xenial.

I just installed HHMV and PHP 7 like in the tutorial ;) I'm also unable to choose a PHP Version, that might have a link with my issue

I'm might be a fool, just let me know :P



From: till

1) Ensure that all php pages in the web folder are owned by the web[ID] user and client[ID] group of the website. If you uploaded them by FTP then they have the correct owner automatically, if you uploaded or unpacked them as root user, then chown them to the correct user.

2) ensure that the suexec checkbox in the website is enabled (thats the case by default).


The reason fo the error can be found in the error.log of the website. If you need help with your setup,please post in the forum.

From: unab

great tutorial but there's a problem with phpmyadmin which return a 404 error do someone have this probleme too?

From: till

This happens when you missed to enable the apache2 option during phpmyadmin installation as described above. You can redo the phpmyadmin configuration with the command.


dpkg-reconfigure phpmyadmin

From: unab

i already have done dpkg-reconfigure but still have 404

From: till

Then you still have not enabled apache2. The option has been selected with the space bar and must show a cross as enabled, if you just go to the option with tab so that it shows up as highlighted, then it is not selected.

From: unab

that's right!!! thank's a lot!!! shame on me :)

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: LetsEncrypt

Part 9 is outdated:

From: Holger

Ui, very good tutorial. And i wondering about the new ISP Config web interface. I made a update on my other server and i didnt have the new design. Why?

And the older server, that is running very good, is the reason for my qusestion. I installed it along you tutorial "perferct-server-ubuntu-16.04...". Since a few days Ubuntu 16.04.01 is available, so the upgrade from 14.04 to 16.04 is possible. Is there any tutorial for upgrading from 14.04 to 16.04 LTS with upgrading php to php7 and other nice new things?


Thank you for your answer

From: Deepak Temkar

At some point, (I don't rember where) one of the installers asked for srtingprep.h, which was not present on my machine. I downloaded and installed libidn11-dev and then it worked

From: Marek

Hello, how to make phpmyadmin and roundcube secured by https?

And there is propably security issue, becose if I set url as https://myurl:8080/phpmyadmin it write me plain text which started:


<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Main loader script * * @package PhpMyAdmin */ /** * Gets some core libraries and displays a top message if required */ require_once 'libraries/';

From: Ravi Singh

Hi, How do I enable Password Change for my users from the roundcube Interface?

From: Adrian Ivanciu

Hello there,

I cannot connect via ftp client to server with user and pass created in ISPCONFIG

Can you help me pease?


From: joe

Keep up the good work, you're a life saver.

From: Dahero

Hi, yesterday I went thru this tutorial and everything worked fine. I started migrating sites and created a mysql login path for my management scripts. But today I can not connect to mysql. It does not start. I can not even log in to ISPConfig any more. Mysql service does not start. It is weird and I cant see how to fix this and keep the installation consistent as I have set up 2 sites with databases already on ISPConfig. Please give me an idea what to check before starting over.

From: till

ISPConfig needs MySQL, s if MySQL does not work, then ISPConfig will not work as well. Check the syslog for MySQL errors to find out why it stopped. If you need help, please post in the forum.

From: Shyam

When i try http://myip:80 i'm getting apache2 default page.

From: till

Yes, that's fine and the expected behaviour. If you want to access ispconfig, then use port 8080. If you want to access one of the websites that you created in ispconfig, then use the domain name of this website.


excellent tutorial!


okay, but where is the url of WebMail service?

From: Pero

 There is something changed and not tested afterwards in this tutorial.I've done it two times line by line.

Problem 1: PhpMyAdmin opens a script

Problem 2: server:8080/webmail doesnt opens at all

Did anybody find a workaround?

From: George

Having the same problem 1.

Problem 1: PhpMyAdmin frontpage shows php code

Try using roundcube and not webmail for problem 2

Problem 2: server:8080/roundcube

From: uniQ

Same here. Can't get this to work at all. :/

From: till

You are using a wrong URL, port 8080 is ispconfig only, you can not use that port to access ohomyadmin or roundcube. roundcube and phpmyadmin are on port 80, so the crrect URL to access them is http://yourdomain.tld/phpmyadmin


You have to adjust the URL to match your domain in ISPConfig under system > interface config.

From: Richard

How do I set up phpmyadmin and roundcube for SSL? Thanks for the guide btw! I figured out my dns problems and was able to FINALLY get php5. Best damn guide for setting up a personal domain hosting server hands down.

From: Bud Manz

"This tutorial is available as ready to use virtual machine image in ovf/ova format..." Where? I don't see a link!  Otherwise, a great tutorial (as usual).

From: till

Big red download icon in the upper right corner of the site.

From: This guy!

So, my question is how do you configure roundcube to get a login and password....

From: till

Roundcube is just a mail client, so the username and password are the email address and password of that mailbox that you add in ispconfig.

From: peri0603

When do you plan to release this Tutorial with nginx instead of Apache?

From: JH

What would be really wonderful is a guide on how to configure roundcube and all that to send and receive mail.

From: till

That's what described in this tutorial. All you have to do now after you installed this guide is to login to ispconfig, enter your email domain name and then the mailbox details that you want to use. Then you can use the login details of the mailbox that you just created to send and receive email with roundcube.

From: philip

I'm having trouble with this. I especially don't understand this: "It is important that you use a subdomain as "system mail name" like or and not a domain that you want to use as email domain (e.g. yourdomain.tld) later."

Does this mean that if my domain is that I can't use for the server, and then create the domain for email users within ispconfig?

I'm guessing that it does mean I cannot, but I don't know how to create mail users for the domain if the server has a subdomain name.

How do I create an ispconfig instance on server subdomain and mailboxes for users like [email protected] // ?




From: Philip

Well, I've discovered that on the server running ISPConfig, any software other than those listed in the basic os install and this guide will create problems. Mine were caused by Webmin, and a linux user with the same username as an email user for the tld. ISPConfig users should be cautioned against installing additional packages.

From: Jon S

So thankful and impressed by all the work over the years on this tutorial - THANK YOU! Only issue I've identified so far was that the phpmyadmin installation created an account that had minimal priviledges, so I had to go into MariaDB manually and grant priviledges to the phpmyadmin user before I could generate new databases/add users, etc.

From: till

The PHPMyAdmin user shall have minimal privileges as it is only for phpmyadmin's internal use, you do not use this user to login to PHPMyAdmin or myriadb. The user that is used to login to PHPMyAdmin to create databases is the MariaDB root user.

From: Johan Ehnberg

What is the status of the letsencrypt repo package in comparison to the manual download? Letsencrypt is developing quickly so I am guessing the repo version is not feasible?

From: Richard

Hello. I've followed this guide on a kvm (i think) vps. After a little trouble with the quota program on a virtual machine I think I got it installed. I set up an email and I am able to log in with roundcube at my domain name. I can send mail from the email I created in ISPConfig, but I get a temporary delivery error 6-7 hours after sending mail to the ISPconfig domain. I think its a problem with DNS but am not sure. In domain registrar I have A www domain.tld ---> server ip and MX domain.tld ----> mail.domain.tld

From: Mitch

I just finished attempting to set up my webserver using this tutorial.  The web part works, but the email not so much.  My email client can find the server, but the server is not responding.  I've verified that my router is correctly configured to allow POP3 and SMTP thru the server's ip address.  Going back thru the steps, #16 says "and remove the # in front of the first 2 alias lines, add the two other "Alias" statements".  There was only 1 alias statement in the config file, and WHAT other two Alias statements are we supposed to add?!?  Not surprising, when I go to, I get "server not found".  Suggestions?  Other tutorials?  Thx!

From: till

Your server is absolutely fine, you just dont seem to know the difference between an alias and a domain name. An alis is /roundcube, so you access it with http://YOURIP/roundcube/ or http://yourdomain/roundcube (yourdomain must exist in NS off course) and not roundcube.yourdomain.tld (which is a subdomain and not an alias).

From: Brianjes

 This tutorial would be fantastic if you could update it so it's a LEMP stack, (including phpmyadmin)


From: till

There is already a LEMP tutorial available:

From: Mallardman

Installing PureFTP on a VPS or AWS in the way described above will fail. My work around is to use the "linux-image-extra-virtual" package from the ubuntu repos. After installing it run:

modprobe quota_v2

modprobe quota_v1

and the mount flags should work correctly. After running "quotaon"

The original solution is detailed here:

From: till

I run the setup from the tutorial on several VPS without a problem. The problem that you had is that you used a base image with a stripped kernel without quota support and not the normal Ubuntu kernel as described in the minimal server setup which is the basis for this tutorial.

From: maurizio

have the same problem with amavisd-new. May be cause of version 16.04.1 ?

But it is a great style of how to doc. Thx

From: cpugourou

Fantastic tutorial. thank you very much.

everything is working EXEPT roundcube . I searched the web for solutions regarding roundcube not able to retrieve emails. Looks like plugins (zip) is not working at all and generates errors.

From: Gianni

I have a problem with ISPCONFIG 3.1 and UFW Firewall.

From web interface i set a rule (for example close 22 port) but not applied to ufw. 

From: Mateus

there is a setting to join the nginx + apache on different port?

Thanks For All Dedication and Shared Work.. 

From: Anozer

For me, everything works except that I can't receive emails. Any idea ?

Here is my /var/log/mail.log :

Aug 21 02:55:06 myserver postfix/smtpd[1471]: connect from[]

Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/ is unavailable. open /etc/postfix/ Permission denied

Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains: proxy:mysql:/etc/postfix/ table lookup problem

Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains lookup failure

Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/ is unavailable. open /etc/postfix/ Permission denied

Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: virtual_mailbox_domains: proxy:mysql:/etc/postfix/ table lookup problem

Aug 21 02:55:06 myserver postfix/proxymap[1327]: warning: mysql:/etc/postfix/ is unavailable. open /etc/postfix/ Permission denied

Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: proxy:mysql:/etc/postfix/ lookup error for "[email protected] // "

Aug 21 02:55:06 myserver postfix/trivial-rewrite[1328]: warning: transport_maps lookup failure

Aug 21 02:55:06 myserver postfix/smtpd[1471]: NOQUEUE: reject: RCPT from[]: 451 4.3.0 <[email protected] // >: Temporary lookup failure; from=<[email protected] // > to=<[email protected] // > proto=ESMTP helo=

Aug 21 02:55:06 myserver postfix/smtpd[1471]: disconnect from[] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7


From: anerty

Dude, I have this same situation, please let me know if you did fix it ???

From: D Harvell

Got to step #7 and received the following:

Job for amavis.service failed because the control process exited with error code.  See "systemctl status amvis.service" and "journalctl -xe" for details.  Invoke-rc.d: initscript amavis, action "start" failed.  dpkg:  error processing package amavisd-new (--configure): subprocess installed post-installation script returned error exit status 1 .  Errors were encountered while processing: anavisd-new.  E:  Sub-process /usr/bin/dpkg returned an error code (1).

I'm not sure what went wrong.  Can anyone point me in the right direction to figure it out?  Thanks.

From: jeremy

Did you find a fix for this? I'm getting the same error

From: simon

Someone did upgrade from 14.04.5 LTS to 16.04 LTS with ISPConfig Any errors came? Is it safe?

From: Mateus Takz

Hello , someone risks say what the best Linux distribution considering the security, performance and stability in ispconfig application ?

From: till

ISPconfig is developed on Debian, so that's the recommended and most stable option. Ubuntu works fine as well.

From: Mateus


simple cpu intel e7400 + 2gb + 500gb

Link 15mb down /1.5mb upload ip static, dns reverse.

Tp-link r470, port open 21, 25, 42, 43, 53, 80, 110, 465, 587, 995, 8080 virtual port NAT.

Perfect Server.. 16.04 the Best

From: Danny

i can load the log in screen and when i enter my log in credentials

it stays on the log in screen without any error messages

Please help thanks

From: Primaxius

Freaking followed this guide and the wrong php version showed up under system-->server config-->web-->PHP Settings ... Should be php7


Apache php.ini path CGI php.ini path PHP-FPM init script PHP-FPM php.ini path PHP-FPM pool directory PHP-FPM start port PHP-FPM socket directory PHP open_basedir Check php.ini every X minutes for changes  0 = no check Default PHP Handler DisabledDefault PHP Handler

From: Hammer

Getting dpkg error code 1 on amavisd-new

From: geolp

Helle i have some trouble in step package configuration of mailman.  it can't continue when i choose a language.

thanks for support.

From: geolp

It's ok i see my mistake.

From: Tim

Ok it all installed i powered it down moved the computer elsewhere reconnected the ethernet and now it doesn't work!

From: faber

everything is okey until finished... but i have a problem when I send email to public (ex., my account in gmail) ...

this is report :

pleasee give me solution and tutorial mr.forge ... :-) pleasee help me This is the mail system at host localhost. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <[email protected] // >: host[] said: 550-5.7.1 [ 1] Our system has detected an unusual rate of 550-5.7.1 unsolicited mail originating from your IP address. To protect our 550-5.7.1 users from spam, mail sent from your IP address has been blocked. 550-5.7.1 Please visit 550-5.7.1 to review our 550 5.7.1 Bulk Email Senders Guidelines. l8si3332066itc.92 - gsmtp (in reply to end of DATA command) pleasee give me solution and tutorial mr.forge ... :-) pleasee help me

From: till

Your problem is not related to the server setup or tutorial, Google explains in the message why they blocked your email. I guess you got an IP from your server hoster that was used by a spammer before, or your server is sending large amounts of spam (you can check this in the mail.log file or with the "postqueue -p" command. If you need help with your server, use the forum and not the comment function.

From: Artur Portella

YOU SIR, DESERVE A MEDAL! HAHAHAHA Works like a charm!I'm really impressed!


Thank you very much!

From: Carsten

pure-ftpd requires update-inetd which was'nt installed on my server. Maybe you want to add this dependency.

From: JOduMOnT

PHP Fatal error:  Uncaught Error: Call to undefined function mb_detect_encoding() in /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/mysql.lib.php:445Stack trace:#0 /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/mysql.lib.php(146): db->escape('dbispconfig')#1 /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/mysql.lib.php(228): db->_build_query_string('CREATE DATABASE...', 'dbispconfig', 'utf8')#2 /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/mysql.lib.php(267): db->_query('CREATE DATABASE...', 'dbispconfig', 'utf8')#3 /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/installer_base.lib.php(237): db->query('CREATE DATABASE...', 'dbispconfig', 'utf8')#4 /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/install.php(290): installer_base->configure_database()#5 {main}  thrown in /tmp/ispconfig3-stable-3.1-7000d9bb8f6ccba0141b9cdefb91fb0edcc45bb9/install/lib/mysql.lib.php on line 445

few months ago this tuto was working perfectly with Xenial

From: till



apt-get install php7.0-mbstring

From: JOduMOnT

I found my "mistake"

Mysql & MariaDB don't accept complex password and/or password with more than 18caracters.

From: Stefan

I have the same problem but no clue how to solve this. Is there any solution yet?

THX, Stefan

From: till

Which "same" problem?

From: Paul

Tha server name in /etc/hosts must be a FQDN.

From: Mick Walker

I've been trying to install the server in the 16.04 and 16.10 versions.  The problem was first experienced with 16.10 so I tried the earlier version and found the same problem:

During the installation of apache2, the system objects to

libapache2-mod-php php7.0apache2-suexec-pristine php-pearmcrypt  imagemagickmemcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring

basically, these packages can't be found.  Any ideas?


From: till

First of all, this tutorial is for 16.04 only, not 16.10, do not use tutorials for OS versions were they are not made for. Regarding your problem on Ubuntu 16.04, check your sources.list file and ensure that you use the exact sources.list from tjis tutorial and that you have run "apt-get update" after you changed the sources.list.

From: Ahmed

Error is mentioned below,

Job for amavis.service failed because the control process exited with error code. See "systemctl status amavis.service" and "journalctl -xe" for details.invoke-rc.d: initscript amavis, action "start" failed.dpkg: error processing package amavisd-new (--configure): subprocess installed post-installation script returned error exit status 1Processing triggers for libc-bin (2.23-0ubuntu3) ...Processing triggers for systemd (229-4ubuntu11) ...Processing triggers for ureadahead (0.100.0-19) ...Errors were encountered while processing: amavisd-newE: Sub-process /usr/bin/dpkg returned an error code (1)


From: till

Check your mail.log for errors. The most likely reason for a failing amavis process is a wrongly set server hostname. If you need further help, please post in the forum.

From: Mick Walker

I know the version the notes are aimed at.  I found the problem on 16.04 as well.

ALL steps have been followed, including checking the sources list ( I have never had to change it) and apt-get steps.

From: Phil Gardner

There seems to be a problem with the instructions to install Roundcube. They say:

Then edit the RoundCube apache configuration file.

nano /etc/apache2/conf-enabled/roundcube.conf

and remove the # in front of the first 2 alias lines,

But there is only one alias line:# Alias /roundcube /var/lib/roundcube

... add the two other "Alias" statements

What other two Alias statements?

Please clarify!

From: lima2x


I've got secured connexion to my websites selecting SSL + Let's Encrypt SSL in the Domain tab but I don't have it for my ISPConfig connexion on https://xxx.xx:8080.

It says :

This page is insecure (broken HTTPS). Certificate Error There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).

From: till

That's ok and not an error, it just means that you use a self-signed SSL certificate.

From: Llorenç

Hi, thank you very much for this step by step tutorial.

I'd like to know how to configure pureFTP for users to access to /var/www/some_folders. All tutorials I have found assing a /home/ftpusers/own-folder for every user but I need that one user could upload to /var/www/folder1 an /var/www/folder 2 but not to /var/www.

Also I've tried to install pureadmin but I have errors and doesn't work. Do I need install something more?

May you help me about it?

From: till

The folders mentioned above are never used on an ispconfig server, so your request to access them makes not much sense for this setup. All you have to do is login to ispconfig, create a new website and then create a new ftp user in ispconfig. Folders are generated automatically, you don't have to enter them. You can add as many FTP users to a website in ispconfig as you want and all users that belong to on website can upload to the same folder of this site, so your request to have two ftp users that can upload to the same folder is fullfilled automatically. No need for any additional configuration.


Do not install pureadmin, it is not compatible with this setup and will mess up your config.

From: omnico

certbot unable to find nameservers


From: flavius

Nice tutorials, i tested second time.

I want a webserver to host like 10 wordpress websites because my machine is kinda weak.

It is abit condusing this ispconfig . For example if i set like in this tutorial server , in my case hostname is ns1 and fqdn is so i have server set

I set it with local ip, but when i hit my public ip or, it shows default apache page.

How can i disable those? Or how do i add wordpress in since is set as fqdn for server?

Even after i create website, if i hit my public ip in browser will show apache default page.

It is abit confusing how this ispconfig is set. Too many variables , set domain set domain alias set subdomain set client :) . Not to mention on first install how pissed i was about mail configuration. I was getting spam on my gmail account from server because i set mail to gmail. And barely i made it working to receive mails. That squerril mail login was so annoying :), till i learned i had to enter entire mail address at username not only alias mail name.

I cannot find a way to setup a "perfect" server to be stable to let it run 5 years w/o carry. I've took out my hope to migrate my old websites from cpanel webhosting companies.


From: till

> I set it with local ip, but when i hit my public ip or, it shows default apache page.

That's the purpose of a default page, it shall show up when someone enters a non existng domain or the Ip or hostname of the server.


> How can i disable those? Or how do i add wordpress in since is set as fqdn for server?


That's really easy and not related to the defaul host in any way as is not the fqdn of your server, the fqdn hostname is and this hostname is never used for a website, so it can't collide with a site domain. Just login to ispconfig, click on new website, enter into the domain field and press save, that's all.

> Too many variables , set domain set domain alias set subdomain set client :)


That's all optional and needed by professionsl users. These settings re not required for your simple WP site. You just have to click on new website, enter the domain name and press save.


>  till i learned i had to enter entire mail address at username not only alias mail name.


Off course you have to use the mail address and not jut the pat in front of the @, otherwise you won't be able to have the same address on multiple domains. e.g. you have two customers, both names tom, each of them has it's own domain name. If only "tom" would be required for login, how should the system know which of the two mailboxes to use? That's why you use the email address.

From: james

had the same problem. the error code said to check: systemctl status amavis.service

when running that it referred to: /etc/amavis/config.d/05-node_id

opened that file woth nano, and there was the variable $myhostname.

i set it the the hostname i chose during setup before.

then it finished the amavisd-new installation.

(can't tell you if everything else works properly afterwards, but at least it passed this step)

(i'm using VM Virtual box)

From: dave

I installed letsencrypt and roundcube? no https without clicking proceed anyway. Cant find roundcube in ispconfig. what am I missing?

From: PA1JIM

Really good HowTo! I love it.

I run into one problem over and over again, I can't seem to find a solution. After everything is installed and up and running, I moved my sites to the new server. All my sites run on https only with Let's Encrypt certificates. If I mark SSL & Let's Encrypt SSL in ISPconfig somehow SSL doesn't seem to start. I get SSL_ERROR_RX_RECORD_TOO_LONG-errors only. When I open the website properties in ISPconfig again, SSL and Let's Encrypt SSL are off again. Tailed all the logs I can find; no errors relating ssl.

I'm almost there, but not yet. Please can someone point me in the right direction?


From: Szop

Great Tutorial! Works out of the box :)

From: M Lemon

The HHVM is not compatible with i386 machines.  So if installing on an i386 don't try.

From: Dr Slappy

Soent hours today following this, sorted out problems with things that wouldnt install and then I get to the big Kahuna.... Installing ISPCONFIG itself... then there were thears........ I got all the way through and then this..... WTF?

http requst sent, awaiting response 302 found...

cant download ispconfig


From: till

ISPConfig can be downloaded from three different places:, and from I just tested all three download options and they are all working fine.

From: Dr Slappy

Thanks, managed to get it in the end. All installed and can get to IPSCONFIG on 8080 but can't get to a new site created, just getting "this site can't be reached. took too long to respond" checked DNS and mysite.mydomain.local points to the correct address.... I can connect using FTP and end up in the correct directory.

From: Deadlight


One question about 15. Install fail2ban and UFW

When i try to Add the missing ignoreregex line in the postfix-sasl file with the code:

" sudo echo "ignoreregex =" >> /etc/fail2ban/filter.d/postfix-sasl.conf "

i have this error message:

" -bash: /etc/fail2ban/filter.d/postfix-sasl.conf: Permission denied "

what i do wrong ? i'm super-user i don't understand the problem. Any help ? Sorry for my english.



From: NinjaUnmatched

This tutorial makes it so your home webserver can be available on the internet? Or do you have to change the IP address you are using to the external IP address with router changes like DMZ

From: igoinggray

When using these instructions and creating the jail.local and populating it with the prescribed contents, Fail2ban will not start.  If I remove the jail.local file or make it empty then Fail2ban starts just fine.  I've tried the 3 different sections one at a time and it still fails.  Any ideas?  

From: Mariusz J. Handke

Great writeup Till, much appreciate. Worked like a charm. Just one note for the Roundcube. When you click on webmail link  in the mailbox page it redirects to /webmail. I would extend "16. Install Roundcube Webmail" with additional alias in /etc/apache2/conf-enabled/roundcube.conf to have it working:

Alias /webmail /var/lib/roundcube


Also that link autofills the Roundcube's form, based on account id but the domain is stripped, and only user name / mailbox is passed. To work around it I have to configure below variable in Roundcube's config. Its fine if you have one domain but how to get that efficiently working in multi-domain environment? 




From: Mariusz J. Handke

Just noticed that I have pasted incorrect variable into my previous comment. It shall be:


From: Daniele

if u cannot login with root password ( or can login only how anonymous)  in mariadb or mysql, u must disable the plugin.

Follow this istruction,

shell$ sudo mysql -u root[mysql] use mysql;[mysql] update user set plugin='' where User='root';[mysql] flush privileges;[mysql] \q



From: Tom Brink

In the section "Edit /etc/fstab. Mine looks like this (I added ,usrjquota=quota.user,,jqfmt=vfsv0 to the partition with the mount point /):" there is a 0 at the end of the editted text but in the box below it is an o, which do I use?

From: CCoudsi

Anyone noticed the following errors in apache2 "error.log" similar to these, if yes how to fix it??

"[ssl:error] [pid 4802] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate!"

"[ssl:error] [pid 4802] AH02604: Unable to configure certificate for stapling"


From: Rodrigo F. Miniello

Error Fail2Ban:


root@srv1(1/95k)$journalctl -xe

-- Support:


-- A unidade fail2ban.service está sendo iniciada.

Jan 31 10:03:02 srv1 fail2ban-client[17713]: ERROR  No file(s) found for glob /var/log/mail.log

Jan 31 10:03:02 srv1 fail2ban-client[17713]: ERROR  Failed during configuration: Have not found any log file for

Jan 31 10:03:02 srv1 systemd[1]: fail2ban.service: Control process exited, code=exited status=255

Jan 31 10:03:02 srv1 systemd[1]: Failed to start Fail2Ban Service.

-- Subject: A unidade fail2ban.service falhou

-- Defined-By: systemd

-- Support:


-- A unidade fail2ban.service falhou.


-- O resultado é failed.



touch /var/log/mail.log

From: quiki

Solution for blank phpmyadmin page is to install:

apt install php-gettext

From: Kanicus

If you get an error restarting fail2ban, perhaps you need to create the mail.log file:

->>>>>>>>>>>>>>>>>>       touch /var/log/mail.log 

Hope this help

From: holger

I have a problem with mariaDB and logrotate:

I had the following message:

/etc/cron.daily/logrotate:^Gmysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: NO)'error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log 'run-parts: /etc/cron.daily/logrotate exited with return code 1

I tried to add the password for the root in the configurationfile /etc/mysql/debian.cnf but the error still exists.

What can i do?

From: Markus

For an Ubuntu 16.04 server, when you want the latest PHP 5.6 you can use this one:

From: Rene

Typing error:

sudo nano /etc/apache2/conf-available/httpoxy.conf


sudo nano /etc/apache2/conf-available/httproxy.conf


a2enconf httpoxy



a2enconf httproxy


From: till

No, it should not be httproxy. httpoxy is a http vulnerability and this config prevents it while a proxy is a software to forward requests and the config above is not a proxy.

From: Nikita

In point 8 you ask me to modify /etc/apache2/conf-available/httpoxy.conf  but the file is not there, did i make any mistake? 

From: till

This is a new file which you create.

From: dhufish

AFAIK module proxy_fcgi is also required for php fpm.

From: till

There is no module missing. ISPConfig uses mod_fastcgi for php-fpm and not mod-proxy-fcgi, mod_fascgi is installed as part of this tutorial, see chapter 8.2.

From: Tom Brink

Please review Step 16. It states "remove the # in front of the first 2 alias lines, add the two other "Alias" statements". There is only one "alias " statement and no others given. I use Ubuntu 15.10 instructions instead, is this correct?

From: WACOMalt

 Thank you very much for this well written tutorial. Saved me many hours!

From: TJ

Are you replacing AppArmor with chmod jails later or something? Assume someone has a FTPD or Apache remote code execution zero day. Nothing is stopping it's payload with your configuration besides basic posix security.

From: rr71

MariaDb Access Denied for root@localhost user, I ran into this a bunch of times using this process.  Here's a great post talking about how to solve this issue by guys much smarter than me.  My problem, was that once I ran ispconfig, it would no longer update databases or database users.  I could not login as root@localhost either. MariaDb folks changed the way to secure localhost only access using the local socket and blocking access via network. The link below explains it much better.

I've enjoyed HTF for years and supported you by buying the guides, and you guys rock. thanks!

From: Phil

Own filter rules for fail2ban should be named .local

From: Phil

 Well, if MariaDB shall listen on all adresses then it should monitored by fail2ban.

From: Luis

How I can configure the roundcube password plugins in this installation. You have additionals steps for this. Thanks in advance...

From: Markus

Last line of dmesg, after remounting


[ 4820.758854] EXT4-fs (xvda): re-mounted. Opts: usrjquota=quota.user,,jqfmt=vfsv0




root@XXXXX:~# quotacheck -avugm

quotacheck: Cannot stat() mounted device /dev/root: No such file or directory

quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


root@XXXXX:~# quotaon -avug

quotaon: Cannot stat() mounted device /dev/root: No such file or directory




Doesnt seem to work :/ 


Linux: 4.4.27-x86_64-jb1 #1 SMP Thu Oct 27 13:51:17 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux


I followed everything in your tutorial..

Do you know whats wrong?

From: till

The reason is either a typo in your fstab file or your base setup of the harddisk is different or you use a virtualisation system that does not allow Linux quota configuration. To get help with your problem, post in the forum.


Now I'm really curious...What's the reason why MariaDB is used, and not MySQL?Especially when I read the comments about some errors...And isn't it a misleading headline...? (o:

From: till

Most Linux distributions switched to MariaDB instead of MySQL when it comes to providing a MySQL compatible database and so we did here. There are no MariaDB specific issues that affect ISPConfig or the above setup, otherwise, we would not have switched to MariaDB as default. But if you don't like it, install MySQL 5.7 instead, it works the same way.


Thanks for the quick reply! (: - Oh okay... I just understood all the "complains" as it was MariaDB which caused the "problems", and it therefore didn't make any sense, since you switched to it. - But after I wrote my comment, I did a quick search between MariaDB and MySQL (which I of course should have done first) and saw the better performance compared to MySQL. - So I fully support your choise and I can tell that it works perfect here on my test-server! - So good work! (:

From: Trav

"and remove the # in front of the first 2 alias lines, add the two other "Alias" statements and add the line "AddType application/x-httpd-php .php" right after the "" line:"There's only one "Alias" linewhat are these "two" we're supposed to add that you speak of? and where are we supposed to add them? 

From: Marek

Perfect tutorial. Works great. Thank you for your great work, you are the best :)

From: Denver Prophit Jr.

Why are you instructing us to let mariadb listen on all interfaces? PCI requires DMZ for card holder data. Can you explain why it is necessary to listen on all interfaces for ispconfig?

From: till

Access to databases is configured by IP address in ISPCOnfig for each database. But this requires that MySQL listens on the external interface as access to MySQL with tools like MySQL Workbench is not possible otherwise. If you do not use any desktop tools or external services that connect to your MySQL server, then feel free to bind MySQL to localhost only. Just be aware that you can't configure access for other IP addresses then.

From: Tumbleweed

Hi all,

I have tried this for fun and it seems great!

Is anybody using this in a production? I was planning to download a VM and use it in a company that has 5-6 domains for email and web server. Would it work ok?

Also, I would have to modify the VM a little bit, adding more storage and RAM and so on...

From: till

Yes, you can use this for production. When you use the ready-made VM, then ensure that you change the passwords.

From: Joe



Have installed using the awesome tutorial - thanks so much. However i need some help configuring email. Roundcube is installed correclty, however all email sent to the server is rejected and bounced back (Recipient address rejected: Access denied) and no emails are leaving the server. 

Is there some ports not open? or perhaps something ive missed?


From: Nicolae

Hi. Help me pls.. how to install all these in home directory? Because i can't upload nothing with filezilla, in wordpress, for example i can't update plugins (

From: till

You must have chosen wrong website settings for the site or you uploaded wordpress as a wrong user like the root user. The php mode has to be php-fpm or php-fcgi and the suexec checkbox must be enabled. If you need further help, please post in the forum.

From: Joe


Thanks heaps for this tutorial, is great, i now have my server and sites running under this.

Only one bug im experiencing. My quotes for websites are not showing. Also, disk space limits for websites are not applying. Im running 16.04 on a Digital Ocean droplet. 

Not sure whats happening, would anybody know where to begin?