How to Install and Set Up Virtualmin on Ubuntu Server (Step-by-Step Guide)

Step-by-step setup of Virtualmin on Ubuntu server with terminal and dashboard view

If you’re managing websites or web applications on an Ubuntu server, Virtualmin is a powerful, open-source control panel that can make your life easier. It gives you a user-friendly interface to manage web hosting, domains, databases, SSL, email, and more – all from a browser.

This guide walks you through installing Virtualmin on a fresh Ubuntu server (20.04, 22.04, or later) in a secure, clean, and production-ready way.

๐Ÿš€ Why Choose Virtualmin?

  • Full-featured control panel with browser-based UI
  • Supports Apache, Nginx, PHP, MySQL/MariaDB, and more
  • Built-in SSL, email, DNS, FTP management
  • Ideal for hosting multiple websites securely on one server

โš™๏ธ System Requirements

Before getting started:

  • Fresh Ubuntu 20.04 or 22.04 LTS server (no LAMP stack preinstalled)
  • Root SSH access to the server
  • At least 2 GB RAM and 1 CPU (4 GB+ recommended)
  • Fully qualified domain name (FQDN) pointed to the serverโ€™s IP

๐Ÿ” Update & Prepare Server

Run the following commands:

sudo apt update && sudo apt upgrade -y
sudo hostnamectl set-hostname your.hostname.com

Replace your.hostname.com with your FQDN.

๐Ÿงฐ Install Virtualmin (Automated Script)

Download and run the official install script:

wget https://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh

The script will walk you through several setup steps.

  • Choose the default configuration unless you know otherwise.
  • Once completed, Virtualmin will be available at:
https://your.hostname.com:10000

Log in using your root username and password.

๐Ÿ–ฅ๏ธ Post-Installation Setup

  1. Open https://your.hostname.com:10000 in your browser.
  2. Accept SSL warning (self-signed certificate).
  3. Login as root.
  4. Follow the post-install wizard to configure:
    • MySQL/MariaDB root password
    • Virus scanning (optional)
    • PHP versions
    • Email configuration

๐Ÿ”’ Secure Your Server

  • Add a Let’s Encrypt SSL certificate via Virtualmin UI
  • Create a new sudo user and disable root SSH login
  • Use a firewall (UFW):
sudo ufw allow 10000/tcp
sudo ufw enable

๐ŸŒ Add Your First Website (Virtual Server)

  1. Go to Create Virtual Server
  2. Enter domain (e.g. example.com)
  3. Configure email, SSL, DNS as needed
  4. Deploy files under /home/example/public_html

โœ… Verify Setup

Visit your domain in a browser. If everything is configured correctly, youโ€™ll see the default index page or your uploaded content.

๐Ÿง  Final Thoughts

Virtualmin is a great alternative to cPanel, especially for developers and sysadmins who want flexibility, open-source power, and cost savings. With just a few steps, you now have a fully functional hosting panel on your Ubuntu server.

Let it handle the heavy lifting so you can focus on launching apps and websites.


Leave a Reply

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