---
title: How to Install Virtualmin on Ubuntu 24.04
url: https://docs.vultr.com/how-to-install-virtualmin-on-ubuntu-24-04
description: Learn how to install Virtualmin on Ubuntu 24.04 with our step-by-step guide. Set up this powerful web hosting control panel quickly and efficiently.
publish_date: 2024-08-16T15:26:56.689238Z
last_updated: 2026-04-15T00:00:00.077250Z
author: Martin Sustak
header_image: https://docs.vultr.com/public/doc-assets/1897/8869165a-f6c7-4342-b287-616407c026ba.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, DNS configurations, 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 with advanced monitoring and alerting tools for server resources, performance, and website traffic.

This article explains how to install Virtualmin on a Ubuntu 24.04 server. You will create a new virtual host web application using Virtualmin and secure the website with a trusted Let's Encrypt TLS/SSL certificates.

## Prerequisites

* [Deploy a Ubuntu 24.04](https://console.vultr.com/deploy/) instance on Vultr with at least `2 GB` RAM and 2 CPU cores.
* 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 instance [using SSH](https://docs.vultr.com/how-to-use-ssh-with-vultr-servers/) as a non-root user with sudo privileges.
* [Update the server](https://docs.vultr.com/how-to-update-a-vultr-cloud-server#how-to-update-debian-&-ubuntu).
* Install a [2FA application such as Google Authenticator](https://docs.vultr.com/using-two-factor-authentication-to-login-to-vultr-control-panel#google-authenticator-and-compatible-apps) on your device.

## Install Virtualmin

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

1. Set your domain as the new server hostname. For example, `virtualmin.example.com`.

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

1. Download and run the Virtualmin installation script. The command below installs the open source (GPL) edition of Virtualmin with the LAMP stack.

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

    Enter :key_y: to proceed with the installation.

    Wait for at least 5 to 10 minutes for the installation to complete.

    ```
    [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://192.0.2.1: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/1897/47fbf43c-ef8d-4f3e-b722-bd22bacf4fc1.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/1897/84ed2a82-80fa-46ed-a502-b87e89dd588d.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/1897/61491fb5-8b52-44ca-a1af-edf50591581e.png)

### Enable 2-Factor Authentication

2-factor authentication (2FA) adds an extra layer of security to password-based authentication. 2FA allows you to generate a one-time code on your mobile device to use when logging in to Virtualmin to verify your identity. Follow the steps below to protect Virtualmin login with 2FA using the Google Authenticator application.

1. Scroll down on the left navigation bar and click your username at the bottom of the page.

    ![Secure Virtualmin using 2FA](https://docs.vultr.com/public/doc-assets/1897/97dd6124-b455-4890-9233-7be5ce29daee.png)

1. Expand the **Security and limits options** section.
1. Click **Enable Two-Factor For User**.

    ![Secure Virtualmin using 2FA](https://docs.vultr.com/public/doc-assets/1897/a888a99a-a239-4533-a1e2-73fae80faf07.png)

1. Click **Enroll For Two-Factor Authentication**.

    ![Secure Virtualmin using 2FA](https://docs.vultr.com/public/doc-assets/1897/0dee215e-7baa-475a-9369-e01895f7633d.png)

1. Scan the displayed QR code on the page with your authenticator application.
1. Scroll down on the left navigation bar to log out of Virtualmin.

    ![Secure Virtualmin using 2FA](https://docs.vultr.com/public/doc-assets/1897/c047da1f-a6df-405d-ac48-6e3f95fdd352.png)

1. Log in with your non-root user credentials to test 2FA.

    ![Configuring Virtualmin using the Web Interface](https://docs.vultr.com/public/doc-assets/1897/76e8f232-723d-455d-9771-f877478f7eff.png)

1. Verify that Virtualmin requires the 2FA token to log in.
1. Enter the 2FA token from the app.

    ![Secure Virtualmin using 2FA](https://docs.vultr.com/public/doc-assets/1897/91130eb3-ef7e-465b-b977-d804f2bc81f8.png)

1. Press **Verify** to log in to the Virtualmin web administration interface.

## Conclusion

You have installed Virtualmin using the automatic installation script. You have learned to use the control panel to perform server operations and secure it by integrating 2-factor authentication. You have also created a new website, the web interface with automatic HTTPS setup through Let's Encrypt. You have also closed unnecessary ports for unused services and learned to use the Virtualmin firewall. For more information about Virtualmin, visit the [official documentation](https://www.virtualmin.com/docs/).
