The Perfect Server - Debian 10 (Buster) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1

This tutorial shows how to prepare a Debian 10 server (with Apache2, BIND, Dovecot) for the installation of ISPConfig 3.1, and how to install ISPConfig. The web hosting control panel ISPConfig 3 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 Apache (instead of nginx), BIND, and Dovecot.

1 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. Before proceeding further you need to have a minimal installation of Debian 10. This might be a Debian minimal image from your Hosting provider or you use the Minimal Debian Server tutorial to set up the base system.

All commands below are run as root user. Either log in as root user directly or log in as your normal user and then use the command

su -

to become root user on your server before you proceed. IMPORTANT: You must use 'su -' and not just 'su', otherwise your PATH variable is set wrong by Debian.

2 Install the SSH server (Optional)

If you did not install the OpenSSH server during the system installation, you can do it now:

apt-get install ssh openssh-server

From now on you can use an SSH client such as PuTTY and connect from your workstation to your Debian 9 server and follow the remaining steps from this tutorial.

3 Install a shell text editor (Optional)

We will use nano text editor in this tutorial. Some users prefer the classic vi editor, therefore we will install both editors here. The default vi program has some strange behavior on Debian and Ubuntu; to fix this, we install vim-nox:

apt-get install nano vim-nox

If vi is your favorite editor, then replace nano with vi in the following commands to edit files.

4 Configure the Hostname

The hostname of your server should be a subdomain like "". Do not use a domain name without subdomain part like "" as hostname as this will cause problems later with your mail setup. First, you should check the hostname in /etc/hosts and change it when necessary. The line should be: "IP Address - space - full hostname incl. domain - space - subdomain part". For our hostname, the file shall look like this:

nano /etc/hosts       localhost.localdomain   localhost     server1

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Then edit the /etc/hostname file:

nano /etc/hostname

It shall contain only the subdomain part, in our case:


Finally, reboot the server to apply the change:

systemctl reboot

Log in again and check if the hostname is correct now with these commands:

hostname -f

The output shall be like this:

[email protected]:/tmp# hostname
[email protected]:/tmp# hostname -f

5 Update your Debian Installation

First, make sure that your /etc/apt/sources.list contains the buster/updates repository (this makes sure you always get the newest security updates), and that the contrib and non-free repositories are enabled as some required packages are not in the main repository.

nano /etc/apt/sources.list
deb buster main contrib non-free
deb-src buster main contrib non-free

deb buster/updates main contrib non-free
deb-src buster/updates main contrib non-free


apt-get update

To update the apt package database

apt-get upgrade

and to install the latest updates (if there are any).

6. 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.

7 Synchronize the System Clock

It is a good idea to synchronize the system clock with an NTP (network time protocol) server over the Internet. Simply run

apt-get -y install ntp

and your system time will always be in sync.

8 Install Postfix, Dovecot, MariaDB, rkhunter, and Binutils

We can install Postfix, Dovecot, MariaDB as MySQL alternative, rkhunter, and Binutils with a single command:

apt-get -y 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: <--

To secure the MariaDB installation and to disable the test database, run this command:


Answer the questions as follows:

Change the root password? [Y/n] <-- y
New password: <-- Enter a new MariaDB root password
Re-enter new password: <-- Repeat the MariaDB root password
Remove anonymous users? [Y/n] <-- y
Disallow root login remotely? [Y/n] <-- y
Remove test database and access to it? [Y/n] <-- y
Reload privilege tables now? [Y/n] <-- y

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

nano /etc/postfix/

Uncomment the submission and smtps sections as follows and add lines where necessary so that this section of the file looks exactly like the one below. IMPORTANT: Remove the # in front of the lines that start with smtps and submission too and not just from the -o lines after these lines!

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=
# -o smtpd_relay_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=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING [...]

Restart Postfix afterwards:

systemctl restart postfix

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 = by adding a # in front of it.

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           =


Set the password authentication method in MariaDB to native so we can use PHPMyAdmin later to connect as root user:

echo "update mysql.user set plugin = 'mysql_native_password' where user='root';" | mysql -u root

Edit the file /etc/mysql/debian.cnf and set the MYSQL / MariaDB root password there twice in the rows that start with the word password.

nano /etc/mysql/debian.cnf

The MySQL root password that needs to be added is shown in red. In this example, the password is "howtoforge".

# Automatically generated for Debian scripts. DO NOT TOUCH!
host = localhost
user = root
password = howtoforge
socket = /var/run/mysqld/mysqld.sock
host = localhost
user = root
password = howtoforge
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

To prevent the error 'Error in accept: Too many open files' we will set higher open file limits for MariaDB now.

Open the file /etc/security/limits.conf with an editor:

nano /etc/security/limits.conf

and add these lines at the end of the file.

mysql soft nofile 65535
mysql hard nofile 65535

Next, create a new directory /etc/systemd/system/mysql.service.d/ with the mkdir command.

mkdir -p /etc/systemd/system/mysql.service.d/

and add a new file inside:

nano /etc/systemd/system/mysql.service.d/limits.conf

paste the following lines into that file:


Save the file and close the nano editor.

Then we reload systemd and restart MariaDB:

systemctl daemon-reload
systemctl restart mariadb

Now check that networking is enabled. Run

netstat -tap | grep mysql

The output should look like this:

[email protected]:/home/administrator# netstat -tap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 16623/mysqld

9 Install Amavisd-new, SpamAssassin, and ClamAV

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

apt-get install amavisd-new spamassassin clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full unrar lrzip 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 libdbd-mysql-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:

systemctl stop spamassassin
systemctl disable spamassassin

10 Install Apache Web Server and PHP

Apache2, PHP, FCGI, suExec, Pear, and mcrypt can be installed as follows:

apt-get -y install apache2 apache2-doc apache2-utils libapache2-mod-php php7.3 php7.3-common php7.3-gd php7.3-mysql php7.3-imap php7.3-cli php7.3-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt  imagemagick libruby libapache2-mod-python php7.3-curl php7.3-intl php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl memcached php-memcache php-imagick php-gettext php7.3-zip php7.3-mbstring memcached libapache2-mod-passenger php7.3-soap php7.3-fpm php7.3-opcache php-apcu libapache2-reload-perl

Then run the following command to enable the Apache modules suexec, rewrite, ssl, actions, and include (plus dav, dav_fs, and auth_digest if you want to use WebDAV):

a2enmod suexec rewrite ssl actions include dav_fs dav auth_digest cgi headers actions proxy_fcgi alias

To ensure that the server cannot be attacked through the HTTPOXY vulnerability, we will disable the HTTP_PROXY header in apache globally by adding the configuration file /etc/apache2/conf-available/httpoxy.conf.

Note: The vulnerability is named httpoxy (without 'r') and therefore the file where we add the config to prevent it is named httpoxy.conf and not httproxy.conf, so there is no 'r' missing in the filename.

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

Paste the following content to the file:

<IfModule mod_headers.c>
    RequestHeader unset Proxy early

And enable the module by running:

a2enconf httpoxy
systemctl restart apache2

11 Install Let's Encrypt

ISPConfig 3.1 has support for the free SSL Certificate authority Let's encrypt. The Let's Encrypt function allows you to create free SSL certificates for your website from within ISPConfig.

Now we will add support for Let's encrypt.

cd /usr/local/bin
chmod a+x certbot-auto
./certbot-auto --install-only

There are no further steps required than installing LE. The website SSL certificates are created by ISPConfig when you add the web sites.

12 Install Mailman

ISPConfig allows you to manage (create/modify/delete) Mailman mailing lists. If you want to make use of this feature, install Mailman as follows:

apt-get install mailman

Select at least one language, e.g.:

Languages to support: <-- en (English)
Missing site list <-- Ok

Before we can start Mailman, a first mailing list called mailman must be created:

newlist mailman
[email protected]:~# newlist mailman
Enter the email of the person running the list: <-- admin email address, e.g. [email protected]
Initial mailman password: <-- admin password for the mailman list
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner... <-- ENTER

[email protected]:~#

Open /etc/aliases afterwards...

nano /etc/aliases

... and add the following lines:

## mailman mailing list
mailman:              "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin:        "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces:      "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:      "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join:         "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave:        "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner:        "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request:      "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe:    "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:  "|/var/lib/mailman/mail/mailman unsubscribe mailman"



and restart Postfix:

systemctl restart postfix

Finally, we must enable the Mailman Apache configuration:

ln -s /etc/mailman/apache.conf /etc/apache2/conf-enabled/mailman.conf

This defines the alias /cgi-bin/mailman/ for all Apache vhosts, which means you can access the Mailman admin interface for a list at, and the web page for users of a mailing list can be found at

Under you can find the mailing list archives.

Restart Apache afterwards:

systemctl restart apache2

Then start the Mailman daemon:

systemctl restart mailman

13 Install PureFTPd and Quota

PureFTPd and quota can be installed with the following command:

apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool

Create the dhparam file for pure-ftpd:

openssl dhparam -out /etc/ssl/private/pure-ftpd-dhparams.pem 2048

Edit the file /etc/default/pure-ftpd-common...

nano /etc/default/pure-ftpd-common

... and make sure that the start mode is set to standalone and set VIRTUALCHROOT=true:


Now we configure PureFTPd to allow FTP and TLS sessions. FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure.

If you want to allow FTP and TLS sessions, run

echo 1 > /etc/pure-ftpd/conf/TLS

In order to use TLS, we must create an SSL certificate. I create it in /etc/ssl/private/, therefore I create that directory first:

mkdir -p /etc/ssl/private/

Afterwards, we can generate the SSL certificate as follows:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.
Locality Name (eg, city) []: <-- Enter your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, YOUR name) []: <-- Enter the Fully Qualified Domain Name of the system (e.g. "").
Email Address []: <-- Enter your Email Address.

Change the permissions of the SSL certificate:

chmod 600 /etc/ssl/private/pure-ftpd.pem

Then restart PureFTPd:

systemctl restart pure-ftpd-mysql

Edit /etc/fstab. Mine looks like this (I added ,usrjquota=quota.user,,jqfmt=vfsv0 to the partition with the mount point /):

nano /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=45576b38-39e8-4994-b8c1-ea4870e2e614 / ext4 errors=remount-ro,usrjquota=quota.user,,jqfmt=vfsv0 0 1
# swap was on /dev/sda5 during installation
UUID=8bea0d1e-ec37-4b20-9976-4b7daaa3eb69 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

To enable quota, run these commands:

mount -o remount /
quotacheck -avugm
quotaon -avug

14 Install BIND DNS Server

BIND can be installed as follows:

apt-get install bind9 dnsutils

 If your server is a virtual machine, then it is highly recommended to install the haveged daemon to get a higher entropy for DNSSEC signing. You can install haveged on nonvirtual servers as well, it should not hurt.

apt-get install haveged

An explanation on that topic can be found here.

15 Install Webalizer and AWStats

Webalizer and AWStats can be installed as follows:

apt-get install webalizer awstats geoip-database libclass-dbi-mysql-perl libtimedate-perl

Open /etc/cron.d/awstats afterwards...

nano /etc/cron.d/awstats

... and comment out everything in that file:


#*/10 * * * * www-data [ -x /usr/share/awstats/tools/ ] && /usr/share/awstats/tools/

# Generate static reports:
#10 03 * * * www-data [ -x /usr/share/awstats/tools/ ] && /usr/share/awstats/tools/

16 Install Jailkit

Jailkit is needed only if you want to chroot SSH users. It can be installed as follows:

apt-get install build-essential autoconf automake libtool flex bison debhelper binutils
cd /tmp
tar xvfz jailkit-2.20.tar.gz
cd jailkit-2.20
echo 5 > debian/compat
./debian/rules binary

You can now install the Jailkit .deb package as follows:

cd ..
dpkg -i jailkit_2.20-1_*.deb
rm -rf jailkit-2.20*

17 Install fail2ban and UFW Firewall

This is optional but recommended, because the ISPConfig monitor tries to show the log:

apt-get install fail2ban

To make fail2ban monitor PureFTPd and Dovecot, create the file /etc/fail2ban/jail.local:

nano /etc/fail2ban/jail.local

And add the following configuration to it.

enabled = true
port = ftp
filter = pure-ftpd
logpath = /var/log/syslog
maxretry = 3

enabled = true
filter = dovecot
logpath = /var/log/mail.log
maxretry = 5

enabled = true
port = smtp
filter = postfix[mode=auth]
logpath = /var/log/mail.log
maxretry = 3

Restart fail2ban afterwards:

systemctl restart fail2ban

To install the UFW firewall, run this apt command:

apt-get install ufw

18 Install PHPMyAdmin Database Administration Tool

Since Debian 10, PHPMyAdmin is not available as .deb package anymore. Therefore we will install it from source.

Create folders for PHPMyadmin:

mkdir /usr/share/phpmyadmin
mkdir /etc/phpmyadmin
mkdir -p /var/lib/phpmyadmin/tmp
chown -R www-data:www-data /var/lib/phpmyadmin
touch /etc/phpmyadmin/htpasswd.setup

Go to the /tmp directory and download the PHPMyAdmin sources:

cd /tmp

Unpack the downloaded archive file and move the files to the /usr/share/phpmyadmin folder and clean up the /tmp directory.

tar xfz phpMyAdmin-
mv phpMyAdmin-* /usr/share/phpmyadmin/
rm phpMyAdmin-
rm -rf phpMyAdmin-

Create a new config file for PHPMyaAdmin based on the provided sample file:

cp /usr/share/phpmyadmin/  /usr/share/phpmyadmin/

Open the config file with nano editor:

nano /usr/share/phpmyadmin/

Set a secure password (blowfish secret) which must be 32 chars long:

$cfg['blowfish_secret'] = 'bD3e6wva9fnd93jVsb7SDgeiBCd452Dh'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

Don't use my example blowfish secret, set your own one!

Then add a line to set the directory which PHPMyAdmin shall use to store temporary files:

$cfg['TempDir'] = '/var/lib/phpmyadmin/tmp';

Next, we create the Apache configuration file for PHPMyAdmin by opening a new file in nano editor:

nano /etc/apache2/conf-available/phpmyadmin.conf

Paste the following config into the file and save it.

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php7.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .


# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
Require valid-user

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All

Activate the configuration and restart Apache.

a2enconf phpmyadmin
systemctl restart apache2

In the next step, we will configure the phpMyadmin configuration store (database).

Log into MariaDB as root user:

mysql -u root -p

In the MariaDB shell, create a new database for PHPMyAdmin:

MariaDB [(none)]> CREATE DATABASE phpmyadmin;

Then create a new user:

MariaDB [(none)]> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'mypassword';

Replace the word mypassword with a secure password of your choice in the commands above and below, use the same password both times. Then grant the user access to this database and reload database permissions.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
MariaDB [(none)]> EXIT;

Finally, load the SQL tables into the database:

mysql -u root -p phpmyadmin < /usr/share/phpmyadmin/sql/create_tables.sql

Enter the MariaDB root password on request.

All we have to do now is to set the phpmyadmin user details in the configuration file. Open the file in nano editor again:

nano /usr/share/phpmyadmin/

Scroll down until you see the lines below and edit them:

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'mypassword';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

I've marked the lines in red which I've edited. Replace mypassword with the password that you've chosen for the phpmyadmin user. Note that the // in front of the lines have been removed as well!

19 Install RoundCube Webmail (optional)

In this chapter, we will install the RoundCube webmail client. First, we have to create the database for Roundcube manually as there is currently an issue in the RoundCube Debian installer which causes it to fail to create the database automatically. Run this command to create the database:

echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf

Then install RoundCube with this command:

apt-get install roundcube roundcube-core roundcube-mysql roundcube-plugins

The installer will ask the following questions:

Configure database for roundcube with dbconfig.common? <-- yes
MySQL application password for roundcube: <-- press enter

Then edit the RoundCube /etc/roundcube/ file and adjust a few settings:

nano /etc/roundcube/

Set the default_host and smtp_server to localhost.

$config['default_host'] = 'localhost';
$config['smtp_server'] = 'localhost';

Then edit the Apache roundcube configuration file /etc/apache2/conf-enabled/roundcube.conf:

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

And add an alias line for the apache /webmail alias and one for /roundcube, you can add the line right at the beginning of the file. NOTE: Do not use /mail as alias or the ispconfig email module will stop working!

Alias /roundcube /var/lib/roundcube
Alias /webmail /var/lib/roundcube

Then reload Apache:

systemctl reload apache2

Now you can access RoundCube as follows:
(after you have installed ISPConfig, see the next chapter)

There exist some plugins to integrate RoundCube Webmail with ISPConfig, have a look here for the ISPConfig RoundCube plugin installation instructions.

20 Download ISPConfig 3

To install ISPConfig 3 from the latest released version, do this:

cd /tmp
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/

20.2 Download a pre-release version of the next 3.1 release

If you like to try out the pre-release of an upcoming 3.1 stable version, download it with this command. This stable branch versions are the last stable release plus the changes for the next stable version:

cd /tmp
wget -O ISPConfig-3.1-dev.tar.gz
tar xfz ISPConfig-3.1-dev.tar.gz
cd ispconfig3-stable-3.1*
cd install

21 Install ISPConfig

The next step is to run the ISPConfig installer.

php -q install.php

This will start the ISPConfig 3 installer. The installer will configure all services like Postfix, Dovecot, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not necessary.

# php -q install.php

_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |

>> Initial configuration
Operating System: Debian 10.0 (Buster) or compatible
Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with <ENTER>.
Tap in "quit" (without the quotes) to stop the installer.

Select language (en,de) [en]: <-- Hit Enter
Installation mode (standard,expert) [standard]: <-- Hit Enter
Full qualified hostname (FQDN) of the server, eg server1.domain.tld []: <-- Hit Enter
MySQL server hostname [localhost]: <-- Hit Enter
MySQL server port [3306]: <-- Hit Enter
MySQL root username [root]: <-- Hit Enter
MySQL root password []: <-- Enter your MySQL root password
MySQL database to create [dbispconfig]: <-- Hit Enter
MySQL charset [utf8]: <-- Hit Enter
Configuring Postgrey
Configuring Postfix
Generating a 4096 bit RSA private key
writing new private key to 'smtpd.key'
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case:
Email Address []: <-- Hit Enter
Configuring Mailman
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring BIND
Configuring Jailkit
Configuring Pureftpd
Configuring Apache
Configuring vlogger
[INFO] service Metronome XMPP Server not detected
Configuring Ubuntu Firewall
Configuring Fail2ban
[INFO] service OpenVZ not detected
Configuring Apps vhost
Installing ISPConfig
ISPConfig Port [8080]:
Admin password [admin]:
Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- Hit Enter
Generating RSA private key, 4096 bit long modulus
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the  state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case:
Email Address []: <-- Hit Enter
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- Hit Enter
An optional company name []: <-- Hit Enter
writing RSA key

Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Detect IP addresses
Restarting services ...
Installation completed.

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterwards you can access ISPConfig 3 under http(s):// or http(s):// ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):

ISPConfig Login on Debian 10

ISPConfig Dashboard on Debian 10

The system is now ready to be used.

22 Virtual Machine Image Download of this Tutorial

This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox. The virtual machine image uses the following login details:

SSH / Shell Login

Username: administrator
Password: howtoforge

Username: root
Password: howtoforge

ISPConfig Login

Username: admin
Password: admin

MySQL Login

Username: root
Password: howtoforge

The IP of the VM is, it can be changed in the file /etc/network/interfaces. Please change all the above passwords to secure the virtual machine. 

Share this page:

Suggested articles

191 Comment(s)

Add comment


By: Nestor at: 2019-07-09 00:16:12

Hi. I tried to install according to the guide and I get two errors. 1 / I can not install roundcube, since I miss error when creating the bd and it does not let me continue. 2 / I can not install ISPConfig, since it marks me the following error:  The patch command is missing. Install patch command and start installation again... Will it be that ISPConfig does not accept php 7.3.4? or will it be necessary to configure AppAmor? Every idea is well-received. Thank you.

By: till at: 2019-07-09 06:52:13

Just follow the tutorial from beginning to end, there are no additional steps required. If you get an error that the patch command is missing, then you left out a part of the guide, in this case probably the jailkit installation. Redo all steps and do not leave something out to get a fully working system. You can also install patch manually with apt, but as other things are probably missing as well, it's better to go through all steps again and ensure that you did not left out a single command. Regarding RoundCuce, this error happens when you did not configure MariaDB in the way that is described in the tutorial. Redo all steps from MariaDB installation chapter and ensure that you modified all the config files in the exact way that's described in the tutorial.

By: Mat at: 2019-07-09 07:26:10

Hi Till,

thanks for the tutorial update for Debian 10 - do plan also an update for the nginx perfect server for Debian 10 ? ;))


One little question - at postfix

is there submission inet n - - - - smtpd & smtps inet n - - - - smtp

correct - had there something changed from Debian 9 to Debian 10 ?

It was in the old tutorials always submission inet n - y - - smtpd & smtps inet n - y - - smtpd


Thanks in advance,



By: till at: 2019-07-09 07:34:04

I've used the new defaults that postfix on Debian 10 ships with and just uncommented the required lines. The mail system works fine in my tests, so I guess the new postfix defaults should be ok. Regarding nginx tutorial, yes, that's next on my ISPConfig tutorial todo list.

By: Mat at: 2019-07-09 08:11:31

Ahh ok interessting - i have done also a fresh install of debian 10 (now more times because i test different new features, if it works together) with a new image from my hoster, last one is from last friday - there is still the old setting inside at postfix.I will give also the new one a try.

your tutorials always work without any issue - perfect thanks so much for your great work here!

By: Neptun at: 2019-07-09 19:54:47

is it possible with your perfect server debian 10 tutorial to use maria db 10.4 which is since June stable too - instead of maria db 10.3 ?or would be there any issue ?

maybe you could kindly add it to the nginx perfect server tutorial for debian 10, if possible - just an idea/request

By: till at: 2019-07-09 19:57:56

I will use the packages that ship with Debian 10, and that's 10.3 at the moment. I can't say if 10.4 will work as I have not tested it.

By: Matt at: 2019-07-09 15:23:59

Very thorough. Looking forward to the nginx version

By: 18TommyBoy at: 2019-07-10 10:24:26

ISP login error:




(at end I click NO secure connection)

By: till at: 2019-07-10 10:30:38

And that's the reason for the problem, you should have chosen yes there as shown in the tutorial above. Run the uninstall.php script which is in the same folder which contains install.php to uninstall ISPConfig, then reinstall it and use the options shown in the tutorial.

By: DARK9Y8 at: 2019-07-10 18:57:41

I think we can change this portion

cd /usr/local/binwget chmod a+x certbot-auto ./certbot-auto --install-only


apt install certbot

easy :D

By: till at: 2019-07-10 19:41:48

It is intended to not install certbot with apt as I want to install the latest certbot version and not the one from Debian repositories. Using the one from Debian has proven to cause problems in the past because it will probably become outdated soon again.

By: sapro at: 2019-07-12 05:56:26

Short change at jail.local for #17: Install fail2ban:

In section "[postfix-sasl]" the filter has canged to "filter = postfix[mode=auth]"

By: till at: 2019-07-16 08:30:18

Thanks! I fixed that in the tutorial.

By: sapro at: 2019-07-12 06:03:16

At step #8: (Install Dovecot) I add in /etc/dovecot/dovecot.conf the line:

"ssl_dh = </etc/dovecot/dh.pem" after "ssl_protocols" and create the dh.pem-File in /etc/dovecot with

openssl dhparam -out /etc/dovecot/dh.pem 4096

Now dovecot work's fine for me :-)

By: Jose at: 2019-07-12 17:41:57

Hi, Please, could you explain the correct way to get wildcard certificates, for example as for a server with wordpress (domain) and nexcloud (cloud.domain), the way I do it works but it's confusing. 

By: till at: 2019-07-13 07:07:49

You can enter your wildcard SSL cert on the ssl tab of the website, there is no difference to a non-wildcard cert. But that's not related to the topic of this installation tutorial. If you have questions on how to use ISPConfig, then please ask in the ISPConfig support forum here:

By: Peter at: 2019-07-13 09:25:47


When i go to PHP My Admin , user cant create new databases.

No privileges.

By: till at: 2019-07-13 10:18:09

You have to login as MySQL root user to create new databases, only the root user has the privileges for this. Normally you would create databases from within ISPConfig and not phpmyadmin.

By: Maurizio Marini at: 2019-07-13 13:28:17

I did:

systemctl daemon-reload; systemctl restart mariadb

But stil I get

Warning: The unit file, source configuration file or drop-ins of mariadb.service changed on disk. Run 'systemctl daemon-reload' to reload units.

nevertheless I redo

systemctl daemon-reload

more and more

By: till at: 2019-07-13 13:30:42

You can probably ignore that and proceed with the installation.

By: max123kl at: 2019-07-14 07:35:32

PHPMyAdmin is included in Debian-SID as a package again. A few weeks ago I already tested a server with Debian-10 (with debian-buster-DI-rc1-amd64-netinst.iso), unfortunately without the help of the new, great tutorial. As a workaround for the missing buster package I installed the version from SID. As far as I can see this works fine. In order to get future updates I have adapted the files /etc/apt/sources.list and /etc/apt/preferences as needed.

By: Kai at: 2019-07-15 12:07:43

reboot and shutdown commands are now handled by systemctl, so you have to use "systemctl reboot" or "systemctl shutdown", opposed to the commands shown in this guide. But: thank you for being that fast in providing this guide!

By: till at: 2019-07-15 12:14:13

Thank you for the notice. I've changed it in the base install guide but forgot to alter it in the perfect server guide.

By: radim_h at: 2019-07-15 12:53:37

With this way of instalaltion  ./certbot-auto --install-only Will certbot get updated in future ?

By: till at: 2019-07-15 12:58:48

Yes, just run the command 'certbot-auto' and it will update certbot to the latest version.

By: roffe at: 2019-07-15 17:49:56

  mysql said: ERROR 1049 (42000): Unknown database 'roundcube'

problems instaling what to do


By: till at: 2019-07-15 17:58:37

Possible reasons: you answered with 'no' instead of 'yes' to the question 'Configure database for roundcube with dbconfig.common?' during roundcube installation or you made a mistake during mysql installation in chapter 8 by e.g. setting a wrong password in /etc/mysql/debian.cnf file.

By: F4lcon at: 2019-07-15 19:31:19

The same issue here, I set up correct root password in debian.cnf, tried 'yes' to the question you mentioned, dpkg-reconfigure roundcube-core, dpkg-reconfigure phpmyadmin/unstable and the dbconfig-common always ends with:

mysql said: ERROR 1049 (42000): Unknown database 'roundcube' (or 'phpmyadmin' etc...)

Tried to create db and user from shell, it is working fine as long as I run dpkg-reconfigure. Here is the output:


Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.

dbconfig-common: writing config to /etc/dbconfig-common/roundcube.conf

Replacing config file /etc/dbconfig-common/roundcube.conf with new version

roundcube already exists and has privileges on roundcube.

dbconfig-common: dumping mysql database roundcube to /var/tmp/roundcube.roundcube.2019-07-15-21.06.mysql.GABffs.

dbconfig-common: dropping old mysql database roundcube.

dropping database roundcube: success.

verifying database roundcube was dropped: success.

creating database roundcube: failed.

error encountered creating database:

mysql said: ERROR 1049 (42000): Unknown database 'roundcube'


Any idea? Thanks

By: till at: 2019-07-16 05:42:09

I cannot reproduce that here, might be a problem with the MariaDB password in the debian.cnf file, this can be a bit tricky when you use special chars in the password. Please make a post here to get further help:

By: F4lcon at: 2019-07-16 07:03:52

Unfortunately it's the same with a simple password, I will make a new post soon.

By: MaT at: 2019-07-16 07:10:45


i can also confirm same issue - everything 100% correct insert in the config files - but not possible to install roundcube without manual creating of the user & databases at mariadb/mqsql - after this - correct install without error (i had always debian 10 nginx install)

i have tried it in different ways - sometimes it works with only database - but 100% success is with both created

By: till at: 2019-07-16 07:15:26

I'll set up a new server here today to test it again. We should continue to investigate this in the forum as it would clutter the tutorial comments otherwise.

By: till at: 2019-07-16 08:31:42

This seems to be an issue in the Debian Roundcube installer as it does not even try to create the database, it created the database user through which implies that the root login works. I've added a command to the tutorial to create the database manually before RoundCube is installed.

By: SamTzu at: 2019-08-11 18:24:21

On my LXC container I had to set the MySQL root password first before I could run any MySQL related command on this tutorial.

mysql -u root

mysql> use mysql;mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("newpass");mysql> flush privileges;mysql> quit

By: Sergey at: 2019-07-16 13:15:07

Debian 10 with Nginx + php-fpm please :)

By: Roffe at: 2019-07-18 06:43:59

Hi I have installed debian buster and roundcube but how do i get plugins to work have look at this ISPConfig 3 Roundcube Plugin on Debian 9 (Stretch) but don't know if it works with debian 10 (Buster)

By: till at: 2019-07-18 06:48:41

Install them and then you know if they work with PHP 7.3. I have not tested them. Or contact their author and ask him.

By: ffab at: 2019-07-20 12:58:01

this is great. works perfectly !

could you consider explain using a valid let's encrypt cert for ispconfig admin interface


By: Jose at: 2019-07-21 04:52:32

I used this works like a charm

By: Michal at: 2019-07-20 18:55:20


Do anyone have issue with "Update Packagelist"?

I'm getting information: "No packages to read in"

I run this update on 3 servers and i have this same issue.

By: thctlo at: 2019-07-20 22:47:58

Hai, Thanks for this update again, great! 

Is it an option to replace phpmyadmin with adminer or phpliteadmin from debian itself, i preffer to have minimal source packages and same for certbot. 

Or are there then things going wrong with ispconfig? 

I want that because of the security updates. 


By: till at: 2019-07-21 08:53:20

PHPMyadmin is not required for ISPConfig, so feel free to replace it or leave it out. Regarding certbot, you can use the certbot package from Debian but Debian will not keep it up to date and this will cause you issues in a few months or years. We have seen these problems in Debian 9. That's why we recommend to not use the Debian package for Certbot, better get the latest Certbot version and keep it up to date with certbot-auto.

By: thctlo at: 2019-07-22 15:16:47

Hai Till, thank you for you reply, most welkom. 

I did a few runs for the install and I have some corrections/additions to the above setup. 

7) ntp, not needed to install see : timedatectl  is save a bit space and packages to install/maintain. 

8) Dovecot :  # fix is very simple:   

adduser dovecot dovecot

That was all i did and the error is gone in my logs. 

Extra Add dovecot DH params. 

openssl dhparam -out /etc/ssl/private/dovecot-dhparams.pem 2048

chown root:dovecot /etc/ssl/private/dovecot-dhparams.pem

chmod 640 /etc/ssl/private/dovecot-dhparams.pem

# and add the DH parameter to the config. 

sed -i '/ssl_key = <\/etc\/postfix\/smtpd.key/a ssl_dh\ =\ <\/etc\/ssl\/private\/dovecot-dhparams.pem' /etc/dovecot/dovecot.conf

systemctl restart dovecot

Mysql limits : nano /etc/security/limits.d/mariadb.conf 

Try not to touch the system defaults.

# creating systemd overrides. ( incl a few buster fixes.) 

# useing edit.. systemctl daemon-reload is automaticly done for you.

systemctl edit mysql.service




# The Fixes for buster. systemctl edit fail2ban.serviceAdd: 


# and a wrong path in the  /usr/lib/tmpfiles.d/fail2ban-tmpfiles.conf

Run : sed -i 's/\/var\/run\/fail2ban/\/run\/fail2ban/g' /usr/lib/tmpfiles.d/fail2ban-tmpfiles.conf


systemctl edit dovecot.serviceAdd:[Service]PIDFile=/run/dovecot/


systemctl edit memcached.service[Service]PIDFile=/run/memcached/

If you install jailkit build software with : apt-get install -y --autoremove build-essential autoconf automake libtool flex bison debhelper binutils  

And everything installed, is always removed with : apt-get remove -y --autoremove build-essential autoconf automake libtool flex bison debhelper binutils 

9) Missing a few packages, the corrected needed list. 

apt-get install -y amavisd-new spamassassin clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full lrzip 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 libdbd-mysql-perl postgrey unrar-free unp lz4 liblz4-tool unp

Add step 11) I did use the debian certbot version, that works fine for now, when buster-backports are up, certbot will be available there with the lastest version. 

Then im switching to the backported version. 

And after the install, Thanks @Jose  for the link. above for 

I made a few changes for that and a modfied version can be found here: 

This assums you use mail.domain.tld for all mail related services. 

You need to setup 2 ! vhost for this to make it work. 


By: Neptun at: 2019-07-24 14:34:01

Hi Till,

do you have maybe any news for the Perfect Server Debian 10 / NGINX tutorial together with IspConfig ?

Would be great - thanks 

By: melaku at: 2019-07-25 17:10:28

 This is an amazing tutorial. thanks for sharing your knowledge. 

let me ask you, i have a free domain name "" from freenom. but i am confused how to link my domain name in the above tutorial. shall i use my dhcp assigned ip address as a static ip or where is the corresponding ip address for my domain? please help  

By: Alexander at: 2019-07-27 06:53:29

When entering a command:echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf shows an error ...ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)Log into MariaDB as root user:mysql -u root -pIn the MariaDB shell, create a new database fo roundcube.MariaDB [(none)]> CREATE DATABASE roundcube;

By: till at: 2019-07-27 07:11:17

This means you did not set the correct root password in the file /etc/mysql/debian.cnf.

By: Jawad Abidi at: 2019-12-09 23:20:02

I have some problem, the password in /etc/mysql/debian.cnf is correct.

I have copy the password in this file, and i past it in the password box after typing mysql -u -p command and i have get connected.

By: deimos at: 2019-11-16 00:59:40

 Sorry is not possible to use create db roundcube with:echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)The correct root password is in /etc/mysql/debian.cnf Think better way is: mysql -u root -p MariaDB [(none)]> CREATE DATABASE roundcube;MariaDB [(none)]> EXIT;

By: till at: 2019-11-16 08:33:22

The command works fine, I use it regularly when installing new Debian 10 servers. If the command did not work for you, then you did not set the correct database details in the file /etc/mysql/debian.cnf as described in this tutorial.

By: Annahri at: 2019-07-28 09:21:22

Hi. What a great guide. Can I rewrite this to another language and post it to my blog?

Thanks in advance!

By: till at: 2019-07-28 10:48:04

No, I'm sorry. Republishing and translation of HowtoForge tutorials is not permitted.

By: ganewbie at: 2019-08-05 12:38:32

 Hi Till, Great tutorial as usual.

In case somebody sees the same error.In our setup, we got the following error in "Step # 9"

E: Package 'unrar' has no installation candidate

We swapped unrar with unrar-free and continued the installation.

Thanks for the great efforts,

By: ganewbie at: 2019-08-05 15:52:49

 Hi Till, Great tutorial as usual.

In case somebody sees the same error.In our setup, we got the following error in "Step # 9"

E: Package 'unrar' has no installation candidate

We swapped unrar with unrar-free and continued the installation.

Thanks for the great efforts,

By: Dee at: 2019-08-10 02:56:51

I am getting an error at:


dpkg-reconfigure dash


The result is:


dpkg-reconfigure: command not found


So I change the command to (added space after dpkg:


dpkg -reconfigure dash


The result is as follows:


dpkg: error: conflicting actions -e (--control) and -r (--remove)

Type dpkg --help for help about installing and deinstalling packages [*]; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files;



By: till at: 2019-08-10 07:55:01

The command is "dpkg-reconfigure dash" as mentioned in the tutorial and this command should be available on any Debian 10 system by default. Ensure that you logged in as root user or that you used 'su -' to become root.

By: Falsig at: 2019-10-18 05:26:20

For some reasons, /usr/sbin is not in root's path.export PATH=$PATH:/usr/sbin does the trick here, I had the same issue ;)

By: till at: 2019-10-18 14:42:31

Please read chapter 1 of the tutorial and what I've written about 'su -' there. If you use su - and not su, then /usr/sbin is in the path.

By: philip at: 2019-08-11 09:56:50

First thanks for the tutorial!

This doesn't enable http2 which is I think pretty worthwhile on any website. http2 doesn't work with mpm_prefork. I needed to finish with:

a2dismod php7.3

a2dismod mpm_prefork

a2enmod mpm_event

a2enmod http2


I'm not sure what to change but I guess removing libapache2-mod-php from the install and then adding

a2dismod mpm_prefork

a2enmod mpm_event http2

By: till at: 2019-08-11 14:32:30

You can either have mod_php support (which is used by this guide) or http/2. If you enable http/2, mod_php will not be available anymore. So don't try to switch a site in ISPConfig to mod_php on your setup.

By: SamTzu at: 2019-08-11 18:07:21

MariaDB/MySQL: Could not access mysql console with password "mysql -u root -p". Only without password. "mysql -u root".LXC container: Had to enable "nesting=1" Proxmox/LXC/Options/Features to get MariaDB/MySQL to run on Debian 10 (Buster).

By: SamTzu at: 2019-08-11 18:08:08

Thanx Till.

By: Fabrice at: 2019-08-24 08:23:49

Thank you for this tuto.

I didn't find the way to use Postfix with the server, do you know a good tutorial for that?



By: till at: 2019-08-24 11:24:16

Postfix is fully installed and configured ready to be used when you followed this tutorial, there is no further tutorial needed. Just add an email domain and mailbox in ispconfig, that's all. If you need further help, please post in the ISPConfig forum here at howtoforge.

By: Mark at: 2019-09-08 09:54:13

Hi Till,

I have followed every step of this great tutorial, but I have problems sending and receiving emails. 

When ispconfig was just installed, the first thing I did was to create a website. I have registered the same domain that the server, so the server has the domain (hostname) and I created the website in ispconfig. Then I went to the "Emails" section of ispconfig and added the domain, and then added the mailbox [email protected]

Then I went to webmail from the button next to the mailbox and entered roundcube. I have tried to send an email to my personal gmail and within a few seconds I receive an error email.

This is the mail system at host'm sorry to have to inform you that your message could notbe 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 candelete your own text from the attached returned message.                   The mail system<[email protected]>: host[2a00:1450:400c:c00::1a] said: 550-5.7.1    [2a01:4f8:c2c:ba4f::1] Our system has detected that this message does    550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and    550-5.7.1 authentication. Please review 550-5.7.1 for more information 550    5.7.1 . a14si8675561wmg.44 - gsmtp (in reply to end of DATA command) Reporting-MTA: dns; server1.myweb.comX-Postfix-Queue-ID: 1CF1121249X-Postfix-Sender: rfc822; [email protected]: Sun,  8 Sep 2019 11:29:57 +0200 (CEST)Final-Recipient: rfc822; [email protected]: rfc822;[email protected]: failedStatus: 5.7.1Remote-MTA: dns; smtp; 550-5.7.1 [2a01:4f8:c2c:ba4f::1] Our system has detected    that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding    PTR records and 550-5.7.1 authentication. Please review 550-5.7.1 for more information 550    5.7.1 . a14si8675561wmg.44 - gsmtp

In the error message I have pasted here before, obviously I replaced my real domain for "myweb" and my personal gmail email for "mypersonalemail" for privacy.

Could you help me? I bought the ispconfig manual, but I don't know the best way to set up an email for a domain.

I have to tell you that as the use of ispconfig, it will be personal, I have not created any client, or any reseller.

Thank you Till!

By: till at: 2019-09-09 05:57:15

Hi Mark, please post your support question in the iSPConfig forum so we can help you figure out what the problem with your mail server setup is:

By: Bakha at: 2019-08-28 17:50:34

I have a problem with pureftpd when create users ftp not working (can not connect)

fix it please or please double-check the commands

By: till at: 2019-08-28 18:00:00

Tested it today, the tutorial is working öperfectly, nothing to be changed.  Your problem is not related to an issue in this tutorial. When you can't connect to FTP then you either did not follow the tutorial closely or you have closed the FTP ports in an external firewall or used a wrong IP or hostname to connect or something similar. Please post in the ISPConfig forum here at howtoforge if you need further help to find out what's wrong with your server.

By: Hendrik57 at: 2019-12-16 01:31:18

Perhaps things are changed with Debian 10 distibution.

I've got the same errors. Https and Https work, but ftp not. And I copied all lines to avoid mistyping on a new Debian 10 install (14 dec 2019 download)

With a deactivated UFW, only ports 80 and 443 respond. Port 21 is closed.

Activating UFW makes all ports close, including 80 and 443.

After I did:

ufw allow ftp

ufw allow sftp

ufw allow http

ufw allow https

I could login and sites on 80 and 443 work with Letsencrypt certificate on the website.

I could login with FTP, but it seems to hang in getting the folderlist. Login was succesfull.

By: Fenna at: 2019-08-29 10:52:36

Thx for another update on this concept of seting up a server system. Been using these tutorials for years and always happy with the result. This incarnation is no different :)

By: Fabrice at: 2019-08-30 20:09:47

Hi All,

After the installation on Debian10, I can't send an email thru php (Wordpress).

Command mail doesn't exist.

I put SMTP information in ISPConfig for roundcube (works for roundcube)




By: Eric at: 2019-09-01 02:23:53

Hi,I tried the install, great work.  However, I did skip some steps and modified a few.



By: Nick at: 2019-09-09 12:11:44

Hi Till

Perfect servers through perfect tutorials. However I have a big stone in my shoe and its called Amavis crap. I have 4 separate hardware HP servers all running beautifully however amavis crashes on all 4 of them at irregular intervals and has to be restarted every now and then even at boot. This piece of crap software would keep all the emails hostage to its wellbeing and have to keep an eye on it every hour to make sure it doesnt crash. Please advise work-around pls.

By: Nick at: 2019-09-10 08:39:02

I have upgraded from stretch to Buster and have faced a lot of ssl dovecot problems which I uninstalled and reinstalled however ISPConfig does not seem to be able to update user mail and other records. Do I need to reinstall ISPConfig or follow any of the above steps again?

By: till at: 2019-09-10 09:21:26

Do not uninstall ispconfig as you would not be able to install it again without loosing all config. Follow the above guide to ensure all packages are installed and then run an ispconfig update with reconfigure services = yes. If you need further help, post in the ISPConfig support forum here at howtoforge.

By: Eric at: 2019-09-13 22:53:52

That is 'pma' ?  Is this a user name you created?

By: Leighton Walters at: 2019-09-16 03:00:30

This tutorial is quite straightforward and error-free. I was able to complete it without any errors in one attempt. Five stars!

By: Anahata at: 2019-09-17 09:38:14

I completed the installation, but when I visit the control panel, Firefox refuses to connect because it doesn't trust a self-signed certificate, and won't allow an exception because of HSTS. Chrome does the same.

The only thing I did different was to set the password to something more secure than 'admin' during the install, but I don't expect that to be a problem.

I uninstalled and re-installed ispconfig, with the same result.

By: till at: 2019-09-17 09:59:46

The warning that you see is caused by the self-signed SSL certificate, that#s ok and not an installation issue, you can simply accept the warning in the browser to proceed. Or you install another SSL cert for ISPConfig if you have already one for the hostname of the server or you install one from Let's encrypt:

By: Anahata at: 2019-09-17 12:15:53

No, the browser won't let me "accept the warning" and continue because of HSTS. Even if I tell Firefox to 'forget' the site (which should clear the HSTS setting) it's the same. I've commented out the apache2 ispconfig.vhost settings relating to Strict Tranport Security and Content Security Policy and that hasn't helped either.

The instructions you linked to, for LetsEncrypt, seem to assume I have a working ISPConfig panel, which I don't. I'll try the shell commands to symlink the Letscrypt certificate data to /usr/local/ispconfig/interface/ssl, but I've already tried that once and it didn't work.


By: till at: 2019-09-17 13:19:58

Accepting the error message usually works, I install this setup several times a week using self-signed certificates and I'm always able to accept the self signed cert in all major browsers, so your problem is not this setup and not the settings of the ispconfig vhost. Your problem is probably the domain that you use for the server hostname, if you used that domain or subdomain before and used it with hsts, then your browser will block it if you reuse it with another cert now, no matter of the settings in ispconfig vhost. If you can't login by ssl, disable ssl in the vhost, login by http, create the LE based vhost and follow the guide that I posted the link to and then enable ssl in the vhost again.

By: Anahata at: 2019-09-17 15:52:38

Thank you - you are absolutely right, the browser has visited the main domain and other subdomains with HSTS and after I cleared all its memory of them, I was able to reach the ISPconfig panel.

By: Bertrand at: 2019-09-18 04:32:09

Great tutorial ! thank you, it just misses the package patch to launch the install of ISPConfig

By: till at: 2019-09-18 05:23:21

The patch package is installed if you followed all steps. You probably left a step out (most likely jailkit) if patch was missing on your system.

By: Jawad at: 2019-09-19 00:25:30

Hello, thank you for support

I can send email using roundcube, but i cant recive it from external.

i sent it only from internal sending from [email protected] to [email protected] for example.

thank you 

By: Jeff BRyner at: 2019-09-25 02:30:47

Good install, all went well. One "Feature" Id like to control is that if you go to the IP address of the server it bypasses any available site on the ISPConfig system and dumps to a default page served by Apache. Is there any way to control this or eliminate it?

By: till at: 2019-09-25 08:21:33

That's the way an apache web server is working, so that's not ISPConfig specific. You have to use either * or the Ip for all sites that use the same IP in DNS, don't mix it. If you don't want to use IP addresses in apache, delete the IP under System > Server IP.

By: Paolo at: 2019-09-25 09:25:26

Reading the howto it seems that Mailman 2.x is used.. Is it possible to upgrade to Mailman 3.x or Ispconfig needs some module rewriting before using the latest version?

By: Jawad at: 2019-09-30 00:51:44


Please, I install ISPConfig according this guide, All is ok, but i have 2 Address IP, I add the 2nd IP in  /etc/network/interfaces before installation, and the ISPConfig has detect the both IP. but i want to make all website work with 2 ip. for my principal domain I make dns as :

NS1 : with IPv4(1)

NS2 : with IPv4(2)

NS3 : with IPv6

by default whene i put (in the browser) the 1st IPv4, i get my website, but if i put 2nd IPv4 i get Apache2 Debian Default Page.

Please, how to make the 2nd IPv4 as secondary IP for all website.

Thank you

By: till at: 2019-09-30 05:28:31

Choose * in the IPv4 field for all sites instead of the first or second IP address.

By: Jawad at: 2019-09-30 19:20:04

Thank you Mr TILL

I change it, but allways show default apache page for the 2nd IP

By: Mike Conom at: 2019-10-01 11:17:23

Hi,Can you tell me what is better for hostnameI have a vps server as

nano /etc/hosts localhost.localdomain localhost 51.xx.xx.xx server1or 51.xx.xx.xx server1


Then edit the /etc/hostname file:


nano /etc/hostname


It shall contain only the subdomain part, in our case:



Thanks in advance



By: till at: 2019-10-01 11:26:54

Don't add vpsxxxx to the name, it might lead other mail servers to treat your server differently. If you run just one server, you can even just use "server.yourdomain.tld" as server name. of if its mainly a mail server "mail.yourdomain.tld" or something similar. I would avoid words like vps or too many numbers in the name, besides that, you are free to choose whatever subdomain you want. Just take care to use the name consistantly and that it really exists in dns and points to your server IP.

By: Mike Conom at: 2019-10-01 11:48:54

As i understand the best way is

nano /etc/hosts localhost.localdomain localhost

51.xx.xx.xx server


nano /etc/hostname


By: Jawad at: 2019-10-03 00:14:54


Please How can i configure mariadb to use ssl connection?

THank you

By: Dan at: 2019-10-06 07:34:10

So i did exactly everything noted here (doing this on my pi4) and it refuses to connect via the IP or hostname? ideas?

By: schmidtchen_ at: 2019-10-14 14:32:47

Great work.

Maybe "Require all denied" is better then

Order Deny,Allow Deny from All

By: Jesse Norell at: 2019-10-23 23:17:33

In the phpmyadmin section, it needs to set the ownership/permissions on

chown root:www-data /usr/share/phpmyadmin/

chmod 750 /usr/share/phpmyadmin/

By: Jakob Oberascher at: 2019-10-27 14:10:24

hi, first off a big thx for the all-in-one guidance. made it to the ispconfig dashboard, however, havent ingested the 300page manual yet. wondering, am i ok to install webmin for a little GUI help around the server, or will it conflict with ispconfig, and it does have all the webmin functionality covered in ispconfig anyways ...?

By: till at: 2019-10-27 14:50:53

Using Webmin on an ISPConfig server is fine as long as you don't use it to edit config files managed by ISPConfig like website vhost files.

By: Dustin at: 2019-11-03 14:49:37

I installed this on a Raspberry PI running Raspbian Buster....

To make quotas work on the pi I had to issue this command, otherwise it thought /dev/root was no such file or directory:

ln -s /dev/mmcblk0p2 /dev/root


To make cerbot install I had to comment out the line in /etc/pip.conf that says:


otherwise it said the hashes didn't match

after installing cerbot I uncommented it


The rest appears to have work as expected, excellent tutorial!!! Thanks!

By: Will at: 2019-11-05 07:29:02

Great write up but have a few issues. I have been trying to build this for 9 days, 16 reformats and over 100 Monster energy. Keep getting ssl certificate errors. Everything fine in http but not https. Certificates will not show on either. What am I doing wrong?

Also the certbot code you have listed is bad(most likely outdated) and unrar needs to be changed to unrar-free as it is also outdated. Clamav is having some issues installing dir too.

Everything else seems to install and work fine. Thank you for the time you put in to working on these!

By: till at: 2019-11-05 14:26:43

The certbot code is fine. Please see here for your certbot issues If you have further issues in using certbot, please use the forum.

By: Steve at: 2019-11-09 14:23:58

All up and running except for roundcube not parsing the .php just displays the index page as text. Not seeing anyone else mentioning this but have checked and rechecked all the configs, any pointers? All sites etc are parsing php correctly.

By: Jorge Fernando at: 2019-11-15 15:19:29

Hi, the webdav directory is not the web directory of the site, how to correct this?

By: till at: 2019-11-15 15:47:32

That's intended as webdav is implemnted as file storage option and runs as a different user, so you won't be able to write to the web dir anyway. If you want to access the web directory, use ftp/ftps.

By: Svilen Arsov at: 2019-11-18 10:47:59

Database User: When I Add database user: (with mysql8 not mariadb)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('mypassword') as `crypted` LIMIT 0,1' at line 1Please help. Thanks in advance!

By: till at: 2019-11-18 11:05:19

MySQL 8 is not fully compatible with older MySQL versions or MariaDB which makes it fail with Software that is not specifically developed for MySQL 8, MySQL 8 is not supported by ISPConfig yet. Please install MariaDB as described in the tutorial.

By: Jesse Norell at: 2019-11-25 18:06:48

A note on upgrading from stretch, I have updated 3 mail systems now and each of them have had an empty /etc/dovecot/dh.pem file afterwards which had to be created manually.  Likely the install vs. update differs somehow there or everyone would have that issue.

By: till at: 2019-11-26 06:59:02

Hi Jesse, did you run an ISPConfig update with reconfigure services = yes after the update? The ISPConfig updater should create the file during update if it does not exist. If this did not happen, please file a bug report so we can check that.

By: mcisar at: 2019-11-30 23:23:51

Can metronome be installed on this Debian tutorial similarly to the steps in the Ubuntu tutorial (step 7.1)... or is there a technical reason Metronome was omitted here?

By: Jose at: 2019-12-03 13:04:53

Just finishing....



>> Initial configuration  


The patch command is missing. Install patch command and start installation [email protected]:/tmp/ispconfig3_install/install# 


I really followed all the steps...

By: Jose at: 2019-12-03 13:20:07

I can't believe it... just at the end...


[email protected]:/tmp# tar xfz ISPConfig-3-stable.tar.gz.1

[email protected]:/tmp# cd ispconfig3_install/install/

[email protected]:/tmp/ispconfig3_install/install# php -q install.php




 _____ ___________   _____              __ _         ____

|_   _/  ___| ___ \ /  __ \            / _(_)       /__  \

  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /

  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |

 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \

 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/

                                              __/ |





>> Initial configuration  


The patch command is missing. Install patch command and start installation [email protected]:/tmp/ispconfig3_install/install# 

By: till at: 2019-12-03 13:29:54

There is nothing missing in the guide, patch command is installed as dependency of one of the chapters which compile software, probably you left out a step like installing jailkit. You can fix your problem by installing patch with:


apt-get install patch


and then run the command to install ISPConfig again.

By: Jose at: 2019-12-03 13:36:16

True. I missed the jailkit step.


Thanks for solving.

By: Fernando Kosh at: 2019-12-03 19:58:24

All works, except when installing roundCube. I need to install the patch before to proced.

Thanks, Till Brehm!

By: DirtyTodd at: 2019-12-14 07:27:59


I have installed the Perfect Server, now what changes are required at my domain registrar and Server Side so that I can Login at


and what Nameserver should I provide to my client so that they can use them at their domain registar


Ranjeet Malik

By: DirtyTodd at: 2019-12-14 07:30:01

Also is there any guide for multiserver setup with debian 10, I will pay for purchasing the ISPConfig Guide again I already procured but that is having the same with debian 8 (Debian 8 doen't support roundcibe any more)


By: Kamel Harchaoui at: 2019-12-17 03:33:36

I cannot access Roundcube withe only with Http://Ip../webmail. What did I missed?

By: till at: 2019-12-17 08:08:13

When you can reach webmail on the IP only, then the domain that you used is probably not pointing to the right server in DNS (yet).

By: Jose at: 2019-12-17 14:03:52

It works like a charm y a HP microserver proliant gen8... lookig forward to the nginx version. I'd pay for it.

By: till at: 2019-12-17 14:11:39
By: Jose at: 2019-12-17 15:00:34


By: harchaoui at: 2019-12-19 13:07:55

Ich habe so gut wie möglich genau das gemacht wie Sie, FreelanceTEK und GoDaddy beschrieben haben, um ISPConfig, Webseite und DNS einzurichten, zum Schluss bekomme ich dauernd. „System.Net.Sockets.SocketException Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat“. Was habe falsch gemacht? (ist was zusätzlich zu beachten mit windows 10 pro im gegensatz zu Win 7) Danke im voraus!

By: Kevin at: 2019-12-20 07:22:48

apt-get -y install ntp

and your system time will always be in sync.


Instead of installing ntp, why not add a NTP server to /etc/systemd/timesyncd.conf for the built in time-sync?


echo "" >> /etc/systemd/timesyncd.conf



By: Bog at: 2019-12-23 21:04:20

a have question, what's do

PHP Warning:  chown(): Unable to find uid for ispconfig in /tmp/ispconfig3-stable-3.1-db6af21d44ed42fc45800619ed55559e07e0449c/install/lib/installer_base.lib.php on line 2696PHP Warning:  chgrp(): Unable to find gid for ispconfig in /tmp/ispconfig3-stable-3.1-db6af21d44ed42fc45800619ed55559e07e0449c/install/lib/installer_base.lib.php on line 2697chown: b??dny u?ytkownik: „ispconfig:ispconfig”

By: Bilal at: 2019-12-29 05:20:38

Hi i followed all the steps, it took about 30 mns, i have now ispconfig3 installed and it works fine.

Thank you man :)

By: Hendrik57 at: 2019-12-30 00:29:09

I installed a fresk Debian Buster. Followed all instructions for Apache2.

However, Apache and ISPConfig worked only after I had logged in. It took me quit a while to find out that this had nothing to do with dbus and the Apache2 settings to start on boot.

I discovered that in the network configuration, the [connection] part, a permission was set to me as user. Normally this line says: "permissions=" withoud anything afterwarts. I have no idea when this 'user restriction' is added by the Buster installation, but perhaps more users walk against this issue.

Now I have to solve the 'relay not permitted' issue for the mail modules.

Thanks for the clear instructions here!

By: GaryS at: 2019-12-31 23:15:10

After getting caught on the debian 10 changes (SU -) I have to congratulate you on the accuracy, thanks. Now if you only updated for a multiserver with deb10 as well....

By: Bitflux at: 2020-01-05 14:53:25

Hi Till

The install worked flawlessly. Thanks for the great work.


By: jentilak at: 2020-01-07 10:12:30

Hi, it works almost pretty nice. The only thing i can´t achieve is the incoming mails. I tried many thing but still can´t get working to receive emails.

I opened ports, changed dns's, created mx lines, and nothing works for me.


Any help is welcome.


Thanks for the manual. All the rest works fine: Nextcloud server, worpress and other stuff are running like a charm.

By: Mohsen at: 2020-01-09 04:53:13

Thank you so much for your precise information.

By: Philippe Oliveira at: 2020-01-16 11:42:09

Hello how are you...


Excellent tutorial, plus I have a doubt ... checked all your perfect server tutorials, the perfect server with ubuntu and debian. I checked that with ubuntu you installed hhvm ... my doubts and the following i have 3 wordpress sites and I want to use ispconfig... what do you recommend me use HHVM with apache or HHVM Nginx or not use hhvm?



My sites have a lot of simultaneous access at the same time at certain times.


Example my sites have 4 to 10 hits at the same time (a little low), more when I do some email marketing campaign, users access the website and as soon as the email arrives in your inbox, then there are times when my website hits 200 to 300 users  conmultaneos, could you indicate me a configuration?



And which web server and better configure nginx hhvm or apache hhvm or just nginx or just apache? and SO ubuntu or debian?


My server and a 16GB and 8 Xeon cpus


Thanks and congratulations for the tutorial

By: till at: 2020-01-16 12:12:04

HHVM shall not be installed anymore, HHVM dropped support for PHP, that's why it is not part of this tutorial. If your site has a lot of traffic, use the nginx tutorial and not apache:

By: Bagus at: 2020-01-24 13:28:18

Hi till,

I noticed on the section 10 "Install Apache Web Server and PHP"

"memcached" has been listed twice, is this intentional?

PS: I also noticed it in other guide / variant of this guide.



By: till at: 2020-01-24 13:40:13

It's not intentional, you can remove one instance. But it does not hurt that it's there, apt deduplicates it anyway.

By: Bagus at: 2020-01-24 14:00:57

Thank you for clarifying.

By: David at: 2020-01-25 20:50:04

thanks for this great guide! I messed something up with jailkit and I don't know how to fix it. I decided to go with the latest version of jailkit 20.21 instead of the one provided in the guide. The installation seemed to be fine, except it wasn't working so I read about it and noticed "jk_addjailuser utility has been removed"  In the changelog so I thought, maybe Ispconfig uses this function and that's why it's not working with a newer version so I tried to remove it and install the one provided in the guide instead, but no clients are able to ssh still.. I don't know how to troubleshoot, please help if anywone knows.. Everything else is smooth..

By: till at: 2020-01-26 08:09:48

Make a support request in the ISPConfig forum here at howtoforge for your installation issue.

By: Werth at: 2020-01-25 21:09:35

Thanks for the tutorial! Everything works fine but postfix.I tried different settings in, sadly without success!

Any idea how to solve the problem?



By: till at: 2020-01-26 08:10:09

Make a support request in the ISPConfig forum at howtoforge for your installation issue.

By: Rayman at: 2020-02-14 12:15:46

Thank you so much for this tutorial! It works! :)

By: Felipe at: 2020-02-18 20:57:59

hey please, has some directive to put on ispconfig, becouse, the footer of my website, dont appear...but the instalation, its ok.

By: felipe at: 2020-02-24 20:04:19

please, how to login on roundcube? so... thank you

By: till at: 2020-02-24 20:06:12

Create a mailbox in ISPConfig and then use the email address and password of that mailbox for the RoundCube login. If you have further questions, please post in the forum.

By: edge at: 2020-02-27 15:47:05

Small note.For some reason amavis did not start properly after a reboot on my Debian 10 system causing mail not to work! Problem was that ClamAV starts slowly and takes a long time to start causing it to exceed systemd default timeout setting and considered as failed to start.To solve this the timeout needs to be increased
1) Create new directory (might already exist): For CentOS: /etc/systemd/system/[email protected]/For Debian and Ubuntu: /etc/systemd/system/clamav-daemon.service.d/ 2) Create the file in the above directory named "override.conf" with the following in it:[Service]TimeoutSec = 600
3) Reload the daemon like so: "systemctl daemon-reload"

With a bit of luck amavis will now startup after a reboot.

By: edge at: 2020-02-27 21:23:46

the formate of my post got lost in the above post. Lets try again.

1) Create new directory (might already exist):

For CentOS: /etc/systemd/system/[email protected]/

For Debian and Ubuntu: /etc/systemd/system/clamav-daemon.service.d/

2) Create the file in the above directory named "override.conf" with the following in it:


TimeoutSec = 600

3) Reload the daemon like so: "systemctl daemon-reload"

By: Daniel at: 2020-03-01 15:03:19

Neue Stable ISPConfig v. 3.1 bringt mehr Module mit(Rspamd+OpenVZ+Metronome XMPP Server)

Vlt. kommt ja demnächst mal ein neues Tut. OpenVZ ist ja ein großer Sprung.

Vlt. kann man dann gleich mal ein zeitgemäßes Tut mit HTTP2 und Multiple PHP-Version bringen.



Configuring MailmanConfiguring DovecotCreating new DHParams file, this takes several minutes. Do not interrupt the script.Configuring SpamassassinConfiguring Amavisd[INFO] service Rspamd not detectedConfiguring GetmailConfiguring JailkitConfiguring PureftpdConfiguring BINDConfiguring ApacheConfiguring vlogger[INFO] service OpenVZ not detectedConfiguring Ubuntu Firewall[INFO] service Metronome XMPP Server not detectedConfiguring Fail2banConfiguring Apps vhostInstalling ISPConfig

By: spazio at: 2020-03-02 21:31:15


Out of the box the phpmyadmin section wasn't working for me on debian buster 10! I had to move the config file

From where it was in the docs: Here is the command:

Create a new config file for PHPMyaAdmin based on the provided sample file:

cp /usr/share/phpmyadmin/  /usr/share/phpmyadmin/

To /etc/phpmyadmin/

Then the gui came up!

Any comments on where the debian buster 10 the phpmyadmin config file is supposed to be?


By: VINCENT at: 2020-03-11 15:36:12


Does the Let's Encript autoinstall on the domain (check box option in ISPconfig) need to have the DNS Server of the domain on this same server ?

Because I left the DNS configuration on the DNS server of my registrar.Should we add a field in DNS field ? 

Maybe ? maybe not ? So in fact... The problem is : I move my Wordpress on my new VPS with ISP config French install and My Wordpress site leave me the famous "blank page"…

Error.log : PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client0/web2/web/wp-config.php' (include_path='.:/usr/share/php') in /var/www/clients/client0/web2/web/wp-load.php on line 37

By: till at: 2020-03-11 19:10:06

No. And the error you posted is not related to SSL at all. The WordPress file /var/www/clients/client0/web2/web/wp-config.php is missing.

By: markelino at: 2020-03-14 23:51:32

An issue with OVA - not sure of concern. Shall we change manually to /bin/bash?

Step 6 mentions it should be /bin/bash whereas in OVA image its 

# ls -lqa sh

lrwxrwxrwx 1 root root 4 Jun 19  2019 sh -> dash

By: Hugh at: 2020-03-28 14:15:33

I have some really low traffic sites that I'd like to host and manage.  Would this tutorial work on a Raspberry Pi 4 (4GB) running Raspbian?

By: Thomas at: 2020-04-01 13:29:31

I love these guides. I have used them many times. never had any problems.

however, Debian 10 gives me some headaches.

in the file /etc/mysql/debian.cnf  i have the correct root password for MariaDB.

but i keep getting the error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).

I have reinstalled and tried again a total of 4 times now. I can't figure this one out.

also, it is kind of irritating that the path in not including sbin so we get error

dpkg-reconfigure: command not found

and we have to "export PATH=$PATH:/usr/sbin" I know it is not your fault but a hint in the text would be nice ;-).


anyways  any idea how to proceed with the mariaDB error ?   i cant figure it out.   and no  it is not the wrong password in the file.



By: Thomas at: 2020-04-01 18:12:03

So i tried again.


did everything the same way again exept the "#" in the end of the mysql/MarisDB root password, and it worked.


Please someone explain ??

By: djbill at: 2020-04-12 12:50:39

Thanks for the guide.

By: Karim Salem at: 2020-04-13 20:54:40

Hello Till,

I succeded in the installation thanks to your perfect manual on a raspberry pi (2).[2nd attempt]

However the admin/admin credentials for ISPCONFIG are not working. I get the wrong username/password error.

Is there some way to reset the password?



By: till at: 2020-04-14 08:03:32

The password is not 'admin', the installer showed you the generated password at the end of the installation. You can reset the password like this:

By: unknoweb at: 2020-04-17 02:08:44


thx for tutorial but where is the virtual machine link ?

By: till at: 2020-04-17 05:19:43

In the navigation bar at the right side of the page, near the top. There is a big red download icon and below that icon, there is the download link. If you don't see the navigation bar at the right, then check if you have an ad blocker enabled, some of them remove parts of the nav bar.

By: Dewayne at: 2020-04-23 00:51:42

First of all thanks for the perfect server guide.

I have a hosted VPS with a company and my hostname is and IP I have followed the guide fully but I have a problem with mail and mailman. When i type in the address I get error message cant find server. When I try the IP address I get a Error 404 - not found. Can you help me with this issue.

Thank you for your help


By: Klemens at: 2020-04-23 14:34:01

Trying to download the PHPMyAdmin sources (wget, I get the following response:

--2020-04-23 07:31:54-- Resolving ( Connecting to (||:443... failed: No route to host.

Please advise. Thank you.

By: Elenora at: 2020-05-01 01:53:27

Hi I have followed this guide and everything seems to be working.

I installed all the components except: Postfix, Dovecot, Amavisd-new, SpamAssassin, and ClamAV, Mailman, Webalizer and AWStats, Jailkit, fail2ban and UFW Firewall, RoundCube.In addition I put Postgresql12 + php7.3-pgsql + postgis + pgadmin4 and Apache Tomcat 9, because I need to work with geographic data.I pointed two domains to the server. When Apache restarts everything seems to be working fine, but after a short time the sites open very slowly or don't open. I haven't seen any errors on apache's error.log. All services are active.

Meanwhile, thank you for your guide.

By: rafal at: 2020-05-04 11:07:25

RoundCube without https ??

By: Raphael at: 2020-05-05 02:01:39


I've tried the installation and everithing work fine except that I did setup a password in the Alias by mistake


Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []: <-- Hit EnterAn optional company name []: <-- Hit Enter

The ispconfig admin works but the browser shows the site is not secured.

How can I resolve that? 

By: Mark at: 2020-05-09 07:40:58

Hi, thanks for the brilliant guide. If we're installing on a server with multiple mount points, could you confirm which need the quotas in fstab? It looks like your guide was based on a single partition server. Are the quotas needed in /home or /var?

By: nicolas38 at: 2020-05-10 11:09:20

Hello,I used this tutorial several times on an OVH dedicated server.For 2 days, the installation of the ssl in ISPCONFIG no longer works.There is no error in the apache log file and not in the Let's Encrypt log file.I do not understand this malfunction.Thanks for help

By: Gilbert at: 2020-05-18 17:02:44

Great thanks for your job to help us. Is there a method to migrate 'a perfect server' from Debian 9 to Debian 10 - ISPConfig - Apache .... By keeping the sites and the data but reinstalling everything? Thank you Gilbert

By: till at: 2020-05-19 06:23:29

The steps to upgrade to Debian 10 are:


1) Do a Debian dist upgrade to upgrade the OS from Debian 9 to 10.

2) Go trough the Debian 10 perfect server guide and run the install commands, this will install missing packages.

3) Do an ISPConfig update with 'reconfigure services = yes'.

4) Adjust the PHP settings and paths in ISPConfig under System > Server config to match the ones from Debian 10.

By: ??????? at: 2020-05-25 02:26:17

Hi, I have already follow all the steps, and it was perfect worked. But I met an issue when I turn off my ISPconfig server and start again, it seem the service failed such posifx , bind9 and apache (meant that all services were inactive) .etc. Any advise is well-received. Thank in advance.



By: Ben at: 2020-05-29 21:34:29

Wow, what a breeze! One single run-through, amazing! Just one bump in the road, in step 19 I had to "-u root -p" to 

echo "CREATE DATABASE roundcube;" | mysql --defaults-file=/etc/mysql/debian.cnf

By: Marek at: 2020-06-08 13:23:07

Super tutorial!

I don't want to install ISPConfig but I want to be able to send and receive mail. How can you add users to RoundCube for example '[email protected]' with the password 'my_secret_password'.

Which packages do I need to install if I will not use ISPConfig?

I would be very grateful for your help.

Yours sincerely


By: till at: 2020-06-08 13:25:10

This will not work without ISPConfig as ispconfig is the part that sets up the whole mail server config and database and mailboxes etc.

By: gps-au at: 2020-06-25 09:23:05

Intersting...Today I did a new image of this.. Netstat didn't work... Then realised we never installed net-tools ??I cross-check your minimal instructions and it was there, but not here ??

By: Luis Francisco Ludovico at: 2020-07-15 12:36:00


I am a happy server administrator who has historically configured used ISPConfig with no problems.

For 2 years now, I have been implementing different servers through an Ubuntu 18.04 server and multiple containers using LXD / LXC.

So currently I have multiple containers running Ubuntu 16.04, Ubuntu 18.04 and Debian 8 following the instructions "THE PERFECT SERVER".


The current problem.

I have been trying to configure a container with Debian 10 with "Apache" for a week and when executing the documentation step by step, the only problem I had was with the MariaDB service, which forced me to configure the execution of the container with the parameter: security.nesting: "true "

Now once the configuration is finished, I can not authenticate an FTP user, both with Filezilla and with other clients, from Windows 10 or Ubuntu 20.04 as a desktop client.

To eliminate doubts, I made the same configuration on a virtualized machine with Virtualbox on my Laptop and the FTP connection worked wonders.

Before writing this comment, perform multiple searches on Google without getting information to guide me with a possible solution.

Just a clarification: on the Virtualbox machine, I had to execute the command "su -" as it appears in the step-by-step instructions. In a container installation, the entire installation is done with the root user and "su -" generates a "mesg: ttyname failed: No such device" error

Any help or guide that allows me to solve this problem I will be very grateful.

Thanks in Advance!

Luis Ludovico

By: Fenna at: 2020-07-30 11:47:02

Thx for this guide (for me the 4th itteration of the perfect server). All worked fine, although i installed Mysql instead of Mariadb because of application requirements


By: Sam Gaw at: 2020-08-14 15:56:57

I followed the tutorial to the letter and everything is working perfectly. However could you tell why everytime I try to do anything like add a user, a site or a DNS record. I can see the CPU shoot to 100% on a single core. I can see it is /usr/bin/mysqld that is using this single core. Is there a config file I need to edit to get mysqld to use more than the single core?

Many thanks for the tutorial.

By: Jorge at: 2020-08-16 16:33:55

I tried following the tutorial to the letter but have been unable to install. I will try for the 3rd time in a few minutes.

Would it be possible for you to include some extra steps so we can test if the recent changes worked well? It will help me narrow down where the problem could be. For exemple: im able to use ip address and can see the "apache2 debian default page", so i know apache2 installed correctly, but i cant see it with the domain, even though i know the domain is pointing well towards the server. Having something like this in every step would be worth gold.

By: till at: 2020-08-16 17:33:20

@Jorge: It's unlikely that you have an installation problem, so a reinstall won't help in your case. Make a post in the ispconfig forum here at howtoforge instead, describe your problem and which exacts settings you have chosen for that website so we can help you to correct the settings.

By: usmir at: 2020-08-26 08:35:03

Installation went ok, installed also multiple PHP version. Issue I have that old thread ispconfig not write anything to disk, not creating client directory, not writng debug log. Follow this howto without success. it's download htf-common-issues.php but no reports. Bought manual, did not help out. Any hint what else to try? Best regards

By: till at: 2020-08-26 08:40:14

@usmir: make a post in the ISPConfig installation forum and describe your problem there and post the result of the report script.

By: Norbert at: 2020-10-05 19:48:19


This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox...

Where can I download this virtual machine?


By: till at: 2020-10-06 07:50:16

The download link is in the navigation bar on the right side of the page, near the top, below the big red download icon.

By: Sebastian at: 2020-10-07 12:53:55



I have a problem with receiving and sending email. I did the installation twice and the problem occurs. I am not getting any information about the problem in the logs. Domains set up correctly

By: till at: 2020-10-08 10:04:26

@Sebastian: Please make a post in the ISPConfig support forum here at and describe your problem in detail, so we can help you to debug the server config issue.

By: rudy de haas at: 2020-10-09 16:47:30


I'm upgrading to debian 10 on a new machine and followed your instructions to the letter (I'm lazy, and your instructions were great-- many thanks!) except for not installing ispconfig.

However, roundcube reports an smtp access error. I have long used thunderbird and it reports: "Sending of the message failed. The certificate is not trusted because it is self-signed. The configuration related to must be corrected."

The "fixes" found on the web relate to older versions of thunderbird and don't fit the current release.

Any ideas?


By: till at: 2020-10-09 17:27:54

@rudy: Please make a post in the ISPConfig support forum here at and describe your problem in detail, so we can help you to debug the server config issue.

By: rudydehaas at: 2020-10-09 20:34:00


I started an acct on the forums and tried to post the question there - but it refused on the grounds that my question has an embedded link. It doesn't - but it does have refs to domains etc so understandable, but still wrong. Any chance you can move it for me?


By: Phillipp at: 2020-10-19 22:23:37

Hey Till,

thanks for the work, im currently running ispconfig 3.0 on a wheezy debian. I plan to install a brand new buster, and install a fresh copy of ispconfig and then purchase the migration tool to move my data to this new server.

A few questions:

1) does the migration tool alter dns-zone A records if the A records is the same IP as the source machine?

2) will this tutorial work with ispconfig 3.2 ? or should I install 3.1 first and then follow the tutorial to update to 3.2?

3) Reason im switching is, i want to switch to rspamd from amavisd because i have domain names which are over 20 years old and im getting way too much mail spam, and im hoping to get this under control with rspamd and im affraid to run any updates on my debian wheezy.

Thanks in advance!

By: till at: 2020-10-20 08:24:37

Hello Phillipp, you can install ISPConfig 3.2 right away using this guide. I'll update the text in the next days to reflect that its compatible with 3.1 and 3.2. The migration Tool asks if it shall alter IP addresses or not, so you have the choice.