---
title: How to Install Virtualmin on Debian 12
url: https://docs.vultr.com/how-to-install-virtualmin-on-debian-12
description: Learn how to install Virtualmin on Debian 12 with our step-by-step guide. Set up this powerful web hosting control panel quickly and efficiently.
publish_date: 2024-08-16T15:27:21.806479Z
last_updated: 2025-04-01T00:00:00Z
author: Hitesh Jethva
header_image: https://docs.vultr.com/public/doc-assets/1898/0b2d57f0-13a4-411d-aad9-16009037f74d.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

Virtualmin is an open-source flexible web hosting control panel designed for Linux and UNIX systems. It allows you to manage multiple domains, email accounts, databases, and applications using a single web-based interface. Virtualmin supports various web server, databases, and mail server applications to securely deliver services using virtual servers.

This article explains how to install and secure Virtualmin on a Debian 12 server.

## Prerequisites

Before you begin:

* Deploy [Debian 12](https://www.vultr.com/servers/debian/) instance on Vultr.
* Create a [domain name A record pointing to the server IP address](https://docs.vultr.com/introduction-to-vultr-dns/#2__Create_DNS_Records). For example, `virtualmin.example.com`.
* Access the server using SSH.
* Create a non-root account with sudo privileges and switch to the account.

## Install Virtualmin

Virtualmin is not available in the default package repositories on Debian 12. Follow the steps below to download the latest installation script and install Virtualmin on your server.

1. Enter your domain as the new hostname on your server. Replace `virtualmin.example.com` with your actual domain.

    ```console
    $ sudo hostnamectl set-hostname virtualmin.example.com
    ```

1. View the active server hostname to verify your changes.

    ```console
    $ sudo hostname -f
    ```

    Output:

    ```
    virtualmin.example.com
    ```

1. Download the latest Virtualmin installation script.

    ```console
    $ wget http://software.virtualmin.com/gpl/scripts/install.sh
    ```

1. Enable execute permissions on the script.

    ```console
    $ sudo chmod +x install.sh
    ```

1. Run the installation script and use the default LAMP package.

    ```console
    $ sudo ./install.sh
    ```

    Enter :key_y: and press :key_enter: when prompted to verify your package information to install Virtualmin.

    ```
    [INFO] Log will be written to: /root/virtualmin-install.log

      Welcome to the Virtualmin GPL installer, version 7.4.0

      ................      
      
      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) 
    ```

    Wait between `5` to `10` minutes for the Virtualmin installation process to complete on your server. Your output should look like the one below when successful.

    ```
     ✔ 
    [17/21] Configuring Upgrade                                                 ▒▒ ✔ 
    [18/21] Configuring Usermin                                                 ▒▒ ✔ 
    [19/21] Configuring Webmin                                                  ▒▒ ✔ 
    [20/21] Configuring Fail2banFirewalld                                       ▒▒ ✔ 
    [21/21] Configuring Virtualmin                                              ▒▒ ✔ 
    ▣▣▣ Cleaning up

    [SUCCESS] Installation Complete!
    [SUCCESS] If there were no errors above, Virtualmin should be ready
    [SUCCESS] to configure at https://virtualmin.example.com:10000 (or https://139.84.239.226:10000).
    ```

## Secure Virtualmin

Follow the steps below to generate trusted Let's Encrypt SSL certificates and secure all network connections to the Virtualmin web administration interface.

1. Stop the Apache service to ensure Certbot can bind to port `80`.

    ```console
    $ sudo systemctl stop apache2
    ```

1. Install the Certbot package Let's Encrypt client to manage your SSL certificates.

    ```console
    $ sudo apt install certbot
    ```

1. Request a new SSL certificate using your domain. Replace `virtualmin.example.com` and `virtualmin@example.com` with your actual details.

    ```console
    $ sudo certbot certonly --standalone -d virtualmin.example.com -m virtualmin@example.com --agree-tos
    ```

    Enter :key_U: and press the :key_enter: when prompted key to update the default SSL key type to ECDSA and apply changes to the `/etc/webmin/miniserv.conf` configuration file.

    ```
    Saving debug log to /var/log/letsencrypt/letsencrypt.log

    An RSA certificate named virtualmin.example.com already exists. Do you want to
    update its key type to ECDSA?

    (U)pdate key type/(K)eep existing key type: 
    ```

    Your output should look like the one below when the SSL certificate request is successful.

    ```
    Renewing an existing certificate for virtualmin.example.com

    Successfully received certificate.
    Certificate is saved at: /etc/letsencrypt/live/virtualmin.example.com/fullchain.pem
    Key is saved at:         /etc/letsencrypt/live/virtualmin.example.com/privkey.pem
    This certificate expires on 2024-10-15.
    These files will be updated when the certificate renews.
    Certbot has set up a scheduled task to automatically renew this certificate in the background.

    If you like Certbot, please consider supporting our work by:
     * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
     * Donating to EFF:                    https://eff.org/donate-le

1. Restart the Webmin service to apply your configuration changes.

    ```console
    $ sudo systemctl restart webmin
    ```

1. Start the Apache service.

    ```console
    $ sudo systemctl start apache2
    ```

## Set Up Firewall Rules

Virtualmin uses the `firewalld` utility to manage firewall processes on your server. Follow the steps below to allow all necessary Virtualmin ports and other services through the firewall.

1. View the `firewalld` service status and verify that it's running.

    ```console
    $ sudo systemctl status firewalld
    ```

    Output:

    ```
    ● firewalld.service - firewalld - dynamic firewall daemon
         Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; preset: enabled)
         Active: active (running) since Wed 2024-07-17 04:31:35 UTC; 35min ago
           Docs: man:firewalld(1)
       Main PID: 36516 (firewalld)
          Tasks: 2 (limit: 2299)
         Memory: 40.8M
            CPU: 4.132s
         CGroup: /system.slice/firewalld.service
                 └─36516 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid
    ```

1. View all allowed ports in the firewall configuration.

    ```console
    $ sudo firewall-cmd --zone=public --list-ports
    ```

    Output:

    ```
    20/tcp 2222/tcp 10000-10100/tcp 20000/tcp 49152-65535/tcp
    ```

1. View all allowed services.

    ```console
    $ sudo firewall-cmd --zone=public --list-services
    ```

    Output:

    ```
    dhcpv6-client dns dns-over-tls ftp http https imap imaps mdns pop3 pop3s smtp smtp-submission smtps ssh
    ```

## Access Virtualmin

Virtualmin runs on the default TCP port `10000` by default. Follow the steos below to access the Virtualmin web administration interface and create a new virtual server.

1. Access your domain on port `10000` to open the Virtualmin control panel interface.

    ```
    https://virtualmin.example.com:10000
    ```

    Enter your sudo user account details to log in to the Virtualmin interface.

    ![Virtualmin login page](https://docs.vultr.com/public/doc-assets/1898/baa766ce-b3d3-4816-9f59-abb26edfa47f.png)

1. Click **Next** within the **Post-Installation Wizard** to set up any additional configurations on your server.

    ![Virtualmin post-installation](https://docs.vultr.com/public/doc-assets/1898/49cf90df-be89-4230-ad9c-b2b46479b0bc.png)

1. Find and click **Dashboard** on the left navigation bar to access the system performance page.

    ![Virtualmin dashboard](https://docs.vultr.com/public/doc-assets/1898/19cd4a21-6c9c-43b9-a2b5-95699d99870d.png)

## Conclusion

You have installed Virtualmin on your Debian 12 server and secured the web administration control panel with Let's Encrypt SSL certificates. You can use Virtualmin to manage your web hosting environment and create virtual servers to deliver web applications or services. For more information and configuration options, please visit the [Virtualmin documentation](https://www.virtualmin.com/docs/).
