How to Install Virtualmin on Debian 12

Virtualmin can replace cPanel as your web hosting control panel. This guide will walk you through the process of installing Virtualmin on a Debian 12 VPS provided by UltaHost. By following these steps, you’ll have a fully functional Virtualmin setup to manage your web hosting environment efficiently.

Prerequisites

Before we begin, ensure you have the following:

  1. A VPS running Debian 12 (UltaHost offers suitable options)
  2. Root access to your VPS
  3. A domain to access Virtualmin
  4. Basic knowledge of Linux command line

How to Install Virtualmin on Debian 12 with UltaHost VPS

Step 1. Signup with UltaHost VPS

UltaHost VPS Hosting

Virtualmin supports the latest Debian 12 and Ubuntu 24.04 LTS. For this guide, we’ll focus on Debian 12.

When selecting a VPS from UltaHost, keep in mind the following requirements:

  • Minimum 2 GB RAM (4 GB recommended for optimal performance)
  • At least 20 GB of disk space
  • A clean, freshly installed Debian 12 system

Check out my step-by-step guide on setting up VPS on UltaHost.

Step 2. Connecting to Your VPS

To begin the installation process, you’ll need to connect to your VPS using SSH. Use the following command, replacing `your_server_ip` with the IP address provided by UltaHost:

ssh root@your_server_ip

Enter your root password when prompted.

You can also use a free SSH client like Bitvise.

Bitvise Interface

Step 3. Updating Server Packages

Before installing Virtualmin, it’s crucial to update your server’s package list and upgrade existing packages. Run the following commands:

apt update
apt upgrade -y

This ensures your system is up-to-date and ready for the Virtualmin installation.

Step 4. Installing Virtualmin

Now that your system is prepared, let’s install Virtualmin:

Download the Virtualmin installation script:

sudo sh -c "$(curl -fsSL https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh)" -- --bundle LAMP

The installation process may take 10-30 minutes, depending on your server’s performance and internet connection speed.

UltaHost Virtualmin Command Line

The selected package bundle is LAMP and the size of install is
full. It will require up to 2 GB of disk space.

Exit and re-run this script with –help flag to see available options.

Continue? (y/n)

Choose y when prompted.

Installing Virtualmin

Step 5. Post-Installation Configuration

After the installation completes, you’ll need to configure some settings:

Access Virtualmin through your web browser by navigating to https://your_server_ip:10000

Log in using your root credentials

Follow the post-installation wizard, which will guide you through:

  1. Memory use
  2. ClamAV for antivirus protection
  3. SpamAssassin for spam filtering
  4. Database servers
  5. Set database password
  6. DNS configuration
  7. Password storage
  8. MariaDB database size
  9. SSL key directory

Step 6. Creating a Custom Subdomain for Virtualmin Access

For easier management, create a custom subdomain to access Virtualmin:

Go to Webmin > Networking > Network Configuration.

Set your hostname and DNS servers (it should be your server IP).

Then apply configuration.

Hostname Virtualmin

Next, we will set the subdomain on Virtualmin.

  1. In Virtualmin, go to Create Virtual Server.
  2. Enter a subdomain (e.g., `cp.yourdomain.com`)
  3. Set the Administration password.
  4. Uncheck Accept mail for domain.
  5. Configure the necessary DNS settings.
  6. Set up an SSL certificate for this subdomain as described in the next step.

Step 7. Setting Up SSL Certificates

To secure your Virtualmin installation, set up SSL certificates using Let’s Encrypt:

1. In the Virtualmin interface, go to Manage Virtual Server > Setup SSL Certificate.
2. Select Let’s Encrypt as the provider.
3. Enter your domain or subdomain.

Create Virtual Server Virtualmin

4. Set an A record for the subdomain in your domain registrar.

Set A record for subdomain Virtualmin

5. Click Request Certificate.

Set SSL Certification for Subdomain in Virtualmin

Now you can access Virtualmin using your custom subdomain, making it more convenient and professional.

Virtualmin Access Uisng Subdomain

Future Use: With Virtualmin set up, you can easily install and manage various web applications like WordPress and Joomla.

Watch on YouTube

Conclusion

You’ve successfully installed and configured Virtualmin on your Debian 12 VPS from UltaHost. This powerful control panel will help you manage your web hosting environment efficiently. Remember to keep your system and Virtualmin updated regularly for optimal performance and security.

For more advanced configurations and troubleshooting, refer to the official Virtualmin documentation or seek support from the Virtualmin community forums.

If you have any questions, just comment them down.

Leave a Reply

Your email address will not be published. Required fields are marked *