Introduction
Setting up your own ISPConfig 3 multiserver environment can elevate your self-hosting game, providing greater control and flexibility over your web and email services. In this comprehensive guide, you’ll learn how to install ISPConfig using dedicated servers, ensuring redundancy with a DNS mirror. Whether you’re a seasoned user or new to self hosting, this tutorial has something valuable for you.
Setting Up a Self-Hosted ISPConfig 3 Multiserver Environment
Preliminary Considerations
Before diving into the configuration, it’s essential to define the specific hosts we’ll set up in this guide:
Host Name | FQDN | IP Address |
---|---|---|
master | panel.example.com | 10.0.64.12 |
web01 | web01.example.com | 10.0.64.13 |
mx1 | mx1.example.com | 10.0.64.14 |
ns1 | ns1.example.com | 10.0.64.15 |
ns2 | ns2.example.com | 10.0.64.16 |
webmail | webmail.example.com | 10.0.64.17 |
Make sure you substitute these dummy values with your actual domain names and IP addresses.
Step 1: Prepare Your Server
Before starting with the installation of your ISPConfig master server, configure your DNS records:
- Create an ‘A’ record for each server pointing to its public IP. For example, the ‘A’ record for
panel.example.com
should point to 11.22.33.44. - Ensure all servers have public IPs assigned.
Step 2: Install ISPConfig on the Master Server
Log in as root or switch to the root user using:
bash
su –
Note: Use su -
and not su
to avoid PATH issues.
Configuring Hostnames
Edit the hostname and hosts file to ensure proper server communication.
bash
nano /etc/hosts
Ensure your /etc/hosts
file has the following format:
IP Address – space – full hostname incl. domain
Example:
10.0.64.12 panel.example.com panel
Edit the /etc/hostname
file:
bash
nano /etc/hostname
It should only contain the subdomain part, such as panel
.
Reboot the server:
bash
systemctl reboot
After logging back in, verify the hostname:
bash
hostname
hostname -f
The expected output:
panel
panel.example.com
Run the Autoinstaller
Use the ISPConfig autoinstaller:
bash
wget -O – https://get.ispconfig.org | sh -s — –no-mail –no-dns –use-php=system
You’ll be prompted to confirm the installation; type ‘yes’ to proceed. Note down your ISPConfig admin and MySQL root passwords displayed at the end of the installation.
Step 3: Configure Remote MySQL Users for Slave Servers
Now, log in to MySQL to set up permissions for other servers:
bash
mysql -u root -p
Create user records for each slave server:
sql
CREATE USER ‘root’@’10.0.64.13’ IDENTIFIED BY ‘myrootpassword’;
GRANT ALL PRIVILEGES ON . TO ‘root’@’10.0.64.13’ WITH GRANT OPTION;
Repeat this process for each server. Remember to replace IP addresses and passwords as needed. Exit MySQL with:
sql
EXIT;
Step 4: Set Up the Firewall
Log in to the ISPConfig UI, go to System -> Firewall
, and add the necessary firewall rules. Open the following TCP ports for the master server:
- TCP: 22, 80, 443, 8080, 8081
You must also open port 3306 for MySQL, but restrict it to your local network:
bash
ufw allow from 10.0.64.0/24 to any port 3306 proto tcp
Conclusion
Your ISPConfig master server is now fully set up and ready for use. Next, you can proceed to install and configure your web server. By self-hosting with ISPConfig, you achieve not only autonomy but also learn valuable skills in managing your own hosting environment.
FAQ
Question 1: What are the benefits of self hosting?
Answer 1: Self hosting provides control over your data, customized server settings, and the ability to optimize for specific use cases without dependency on third-party services.
Question 2: Can I add more servers later?
Answer 2: Yes, you can easily expand your multiserver setup by adding additional servers of any type for various services.
Question 3: Is ISPConfig compatible with other operating systems?
Answer 3: While this guide focuses on Debian and Ubuntu, ISPConfig can also work with other Linux distributions, though some steps may vary. Always check compatibility in the official documentation.
Unique Tip
Consider automating your backups using scripts or integrated tools with ISPConfig to ensure data integrity and ease recovery in case of a server failure.