How to install ISPConfig 3 on Ubuntu 16.04
ISPConfig is an open source hosting control panel which is very fast, secure and stable. It is used by many system admins to manage their servers via a web-based interface instead of using the command line. It comes with support for many services including Apache, Nginx, MySQL, Bind, Postfix, Dovecot, Courier, PureFTPD etc. and it is used for easy website administration, creating email accounts and FTP users, creating MySQL databases, setting up cron jobs, DNS administration and more. In this tutorial, we will show you how to install ISPConfig 3 on a Linux VPS running Ubuntu 16.04 as an operating system.
First of all, connect to your server via SSH and upgrade the system software to the latest version. You can use the following commands for that purpose:
sudo apt-get update sudo apt-get upgrade
Also, make sure that Apparmor is not running on your server. You can disable it and remove it completely from your server by using the commands below:
sudo systemctl stop apparmor.service sudo apt-get remove apparmor apparmor-utils
Next, we need to install some required packages. Go ahead and install the following packages:
Some of these packages may be required for special configurations, but we will install them in any case.
During the installation, you will need to answer some basic questions. When installing the Postfix service you will be asked to select configuration. Select
Internet Site. Next, as system mail name enter your server hostname. If you are asked to select a web server, select A
Also, you will be asked to enter MySQL application password for phpMyadmin and MySQL application password for Roundcube. You can enter a strong password of your choice.
Once the installation of the required packages is completed, it is time to configure the software. Let’s start with Apache. Enable the following Apache and PHP modules:
sudo a2enmod rewrite ssl cgi include actions suexec dav_fs dav auth_digest alias sudo phpenmod mcrypt
Then, restart the Apache service for the changes to take effect:
sudo systemctl restart apache2.service
Another service that needs to be configured is pure-ftpd. Since you will have to provide the users with FTP access to your Ubuntu VPS so they can upload and download files, you need to configure chroot environment. That way, the users will not have access to the rest of the system. Edit the
/etc/default/pure-ftpd-common file and change the value for
VIRTUALCHROOT from false to true.
sudo nano /etc/default/pure-ftpd-common VIRTUALCHROOT=true
You can also set up an SSL certificate in order to secure your FTP service.
Restart the service for the changes to take effect:
sudo systemctl restart pure-ftpd-mysql.service
Next we can configure Posfix and Mailman. Edit the Postfix master configuration file:
sudo nano /etc/postfix/master.cf
Basically, we will need to uncomment a few lines in the configuration file and append
-o smtpd_client_restrictions=permit_sasl_authenticated,reject under the
smtps sections. The file should look like the following:
submission inet n - y - - 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 - y - - 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
Save and close the file. Then we can create a new list for Mailman.
sudo newlist mailman
You will be asked to enter an email of the person that runs the list as well as a password. The script will provide you with output of aliases which should be added to the
sudo nano /etc/aliases
The file should be similar like the following:
# Required aliases postmaster: root MAILER-DAEMON: postmaster # Common aliases abuse: postmaster spam: postmaster # Other aliases clamav: root 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"
Save and close the file. Initialize the alias database and restart the services.
sudo newaliases sudo systemctl restart mailman.service sudo systemctl restart postfix.service
Additionally, you need to stop and disable SpamAssassin.
sudo systemctl stop spamassassin.service sudo systemctl disable spamassassin.service
Next, remove the
sudo rm -f /etc/cron.d/awstats
Finally, lets install ISPConfig. Download the latest release and install it by using the following commands:
cd /tmp sudo wget -O ispconfig.tar.gz https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1 sudo tar xfz ispconfig.tar.gz cd ispconfig3*/install/ sudo php -q install.php
Answer the questions to complete the installation and then access the ISPConfig hosting control panel at:
You need to replace
IP-ADDRESS with your server IP address. Alternatively, you can use a domain name that points to your server IP address. To log in you need to use
admin as username and the password you set up during the installation process. Once you log in you should see something like the following.
Of course, you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install ISPConfig for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons or simply leave a reply below. Thanks.