Installing Virtualmin on a Debian server can be a game-changer for managing web hosting, domains, and server configurations. However, it’s not uncommon to encounter roadblocks during the process, especially with network and configuration issues. In this guide, we’ll walk you through the real-time challenges and solutions we faced while setting up Virtualmin on Debian. This includes step-by-step instructions, troubleshooting tips, and actionable solutions.


What is Virtualmin?

Virtualmin is a powerful, open-source web hosting control panel built on top of Webmin. It simplifies server management tasks like managing domains, databases, emails, and DNS. Whether you’re a beginner or a seasoned server administrator, Virtualmin is an excellent choice for hosting websites efficiently.


Prerequisites

Before diving into the installation, ensure the following:

  1. A Debian-based server (e.g., Debian 11 or 12).
  2. Root access to the server.
  3. A stable internet connection.

Step-by-Step Installation Guide

Here’s how to install Virtualmin seamlessly:

1. Update and Upgrade Your System

Begin by updating your server to ensure all packages are current:

bash
apt update && apt upgrade -y

2. Download the Virtualmin Install Script

Fetch the installation script from Virtualmin’s repository:

bash
wget http://software.virtualmin.com/gpl/scripts/install.sh

3. Make the Script Executable

Change the script’s permissions to make it executable:

bash
chmod +x install.sh

4. Run the Installation Script

Execute the installer:

bash
./install.sh

The script will automate the process, installing Webmin, Virtualmin, and other essential components like Apache, MySQL, and PHP.

5. Access Virtualmin

Once installed, access Virtualmin in your browser:

  • Navigate to: https://your-server-ip:10000
  • Log in using your root credentials.

Real-Time Issues and Solutions

Issue 1: DNS Resolution Fails

Problem: The server couldn’t resolve domain names, resulting in Temporary failure resolving errors.

Solution:

  1. Manually configure DNS servers:
    bash
    nano /etc/resolv.conf

    Add:

    plaintext
    nameserver 8.8.8.8
    nameserver 8.8.4.4
  2. Restart networking:
    bash
    systemctl restart networking

Issue 2: Networking Service Fails

Problem: Restarting the networking service caused errors like Cannot find device "ens19".

Solution:

  1. Verify network interfaces:
    bash
    ip a
  2. Remove references to non-existent interfaces (ens19):
    bash
    nano /etc/network/interfaces

    Comment out or remove the faulty configuration.

  3. Restart the networking service:
    bash
    systemctl restart networking

Issue 3: Multiple Default Gateways

Problem: The routing table had multiple default gateways, causing connectivity issues.

Solution:

  1. Check the routing table:
    bash
    ip route
  2. Remove incorrect gateways:
    bash
    ip route del default via <incorrect-gateway-ip>
  3. Add the correct gateway:
    bash
    ip route add default via <correct-gateway-ip> dev <interface>

Issue 4: Virtualmin Script Download Fails

Problem: The server couldn’t resolve software.virtualmin.com.

Solution:

  1. Fix DNS as described above.
  2. Retry the download:
    bash
    wget http://software.virtualmin.com/gpl/scripts/install.sh

Post-Installation Steps

Once Virtualmin is installed:

  1. Run the Setup Wizard: Virtualmin will guide you through configuring memory limits, DNS, and email settings.
  2. Secure the Installation: Use Let’s Encrypt to secure the interface:
    • Navigate to Server Configuration > SSL Certificate.
    • Enable SSL using Let’s Encrypt.
  3. Test the Installation:
    • Create a test virtual server to ensure everything works.

Key Takeaways

  • Networking issues, such as DNS failures and multiple gateways, are common during server setups but can be resolved with precise troubleshooting.
  • Properly configured network interfaces and gateways are critical for a successful Virtualmin installation.
  • Virtualmin simplifies server management, but securing the installation is crucial for production environments.

Conclusion

Setting up Virtualmin on Debian is a straightforward process, but as we’ve seen, real-time troubleshooting skills are invaluable when unexpected issues arise. By following this guide, you can not only install Virtualmin but also resolve common networking and configuration problems.

Ready to optimize your server with Virtualmin? Follow this guide and start managing your web hosting like a pro!

Trusted by some of the biggest brands

We’re Waiting To Help You

Get in touch with us today and let’s start transforming your business from the ground up.