Virtualmin is an open source hosting control panel built on top of Webmin. It turns a single server into a complete hosting platform: each domain becomes a "virtual server" with its own Linux user, website, PHP configuration, MariaDB databases, mailboxes and DNS zone. In this tutorial you will install Virtualmin GPL on a fresh Ubuntu 24.04 server with the official installer, complete the post-install wizard and create a first virtual server with a Let's Encrypt certificate.
Prerequisites
To follow this guide you need:
- A freshly installed server running Ubuntu 24.04 LTS, for example a CubePath VPS. The installer also supports Debian 12 and 13 and Rocky Linux or AlmaLinux 8, 9 and 10. It must be a clean system: do not install Apache, Nginx, MariaDB or Postfix beforehand.
- At least 2 GB of RAM (the installer adds swap if memory is low) and 20 GB of disk. 4 GB is more comfortable if you enable ClamAV and SpamAssassin.
- A user with
sudoprivileges. - A fully qualified hostname for the server, for example
host.your_domain, with a DNS A record pointing toyour_server_ip. It must be different from the domains you will host. - A domain to host,
your_domainin this guide, with its A record pointing to the same IP.
Step 1 - Setting a fully qualified hostname
The installer refuses to continue without a fully qualified domain name, and it uses the hostname to request a Let's Encrypt certificate for the panel. Set it now:
sudo hostnamectl set-hostname host.your_domain
Add the name to /etc/hosts so it resolves locally:
sudo nano /etc/hosts
127.0.0.1 localhost
your_server_ip host.your_domain host
Verify:
hostname -f
host.your_domain
Step 2 - Running the Virtualmin installer
Virtualmin is installed with a script that adds the Virtualmin and Webmin repositories and installs and configures the whole stack. Download it and read it before running it as root:
curl -fsSL -o virtualmin-install.sh https://download.virtualmin.com/virtualmin-install
less virtualmin-install.sh
The script accepts a few options. The most useful ones are:
| Option | Effect |
|---|---|
--bundle LAMP | Apache, MariaDB and PHP (default) |
--bundle LEMP | Nginx, MariaDB and PHP |
--type mini | Minimal install without mail filtering, ClamAV and some extras, for small servers |
--hostname host.your_domain | Force the hostname during installation |
Run the default LAMP installation:
sudo sh virtualmin-install.sh --bundle LAMP
The installer lists the supported systems and asks for confirmation. Type y. It then updates the system, installs the packages and runs the configuration phase, which takes 5 to 15 minutes. When it finishes, it shows where to log in:
Installation Complete!
If there were no errors above, Virtualmin is ready to be configured
at https://host.your_domain:10000.
NoteThe installer removes UFW and configures firewalld with the ports Virtualmin needs (SSH, HTTP, HTTPS, mail, DNS, FTP and 10000 for the panel). Manage the firewall with
firewall-cmdor from the panel from now on, not withufw.
Check that the panel service is running and the firewall allows its port:
sudo systemctl status webmin --no-pager
sudo firewall-cmd --list-all
● webmin.service - Webmin server daemon
Active: active (running) since Thu 2026-09-25 11:03:18 UTC; 2min ago
...
public (active)
services: dhcpv6-client dns ftp http https imap imaps pop3 pop3s smtp smtps ssh
ports: 10000-10100/tcp 20000/tcp 49152-65535/tcp
The exact list of services and ports depends on the installer version; what matters is that 10000 is included.
Step 3 - Logging in and completing the post-install wizard
Virtualmin authenticates with system accounts. On Ubuntu cloud images the root account often has no password, so set one if you have not done so:
sudo passwd root
Open https://host.your_domain:10000 and log in as root. If the Let's Encrypt request for the hostname succeeded during installation, the certificate is valid. Otherwise the browser warns about a self-signed certificate; accept it for now and check the DNS record of the hostname.
The first time you log in, Virtualmin opens the Post-Installation Wizard. Walk through it:
- Memory use: choose whether to preload Virtualmin libraries. Say no on servers with 2 GB of RAM or less.
- Virus scanning: enable ClamAV only if you have the memory for it (it uses around 1 GB).
- Spam filtering: enable SpamAssassin if the server will receive email.
- Database servers: enable MariaDB. PostgreSQL is optional.
- MariaDB password: set a strong root password for MariaDB.
- DNS zones: enter a primary nameserver hostname if this server will host DNS; otherwise skip the check.
- Password storage: keep the default of storing hashed passwords.
- SSL key directory: keep the default per-domain directory.
When the wizard finishes, click Re-check and refresh configuration on the dashboard. Virtualmin validates the stack and reports any problem it finds, such as a hostname that does not resolve.
Step 4 - Creating your first virtual server
A virtual server bundles everything a domain needs. In the left menu, make sure the Virtualmin tab is selected, then click Create Virtual Server and fill in:
- Domain name:
your_domain - Administration password: a strong password for this domain's owner, who can also log in to the panel with limited rights.
- Enabled features: keep the defaults (DNS, Apache website, SSL website, mail, MariaDB database, Webmin login).
Click Create Server. Virtualmin shows every action it performs: it creates the Linux user (named after the first part of the domain by default), its home directory under /home, the Apache virtual host, the DNS zone, the mail domain and a database.
You can do the same from the command line with the virtualmin tool, which is handy for automation:
sudo virtualmin create-domain --domain example2.your_domain --pass 'your_strong_password' --default-features
List the virtual servers to verify:
sudo virtualmin list-domains
Domain Username Description
------------------------------ -------------------- --------------------
your_domain your
example2.your_domain example2
Open http://your_domain in a browser. You should see the default Virtualmin placeholder page, served from /home/<username>/public_html.
Step 5 - Requesting a Let's Encrypt certificate
Each virtual server can have its own free certificate. In the panel, select the domain in the drop-down at the top of the left menu, then go to Manage Virtual Server > Setup SSL Certificate > SSL Providers. Choose Let's Encrypt, keep the domain names that are listed (with and without www) and click Request Certificate.
From the command line:
sudo virtualmin generate-letsencrypt-cert --domain your_domain
The request only succeeds if the DNS records of the listed names point to this server. Virtualmin renews the certificate automatically before it expires. Check the result:
curl -sI https://your_domain | head -n 1
HTTP/2 200
Step 6 - Managing the hosting account
From the virtual server's menu you now have everything needed to run the site:
- Edit Databases: create extra MariaDB databases and users for the domain.
- Edit Users: add mailboxes and FTP users. Mail clients connect with the full address as the username.
- Web Configuration > PHP Options: choose the PHP version and execution mode for the domain.
- File Manager or SFTP with the domain's user: upload your application to
public_html.
To let the domain owner manage their own site, share the panel URL and the administration password you set in Step 4. They will only see their own virtual server.
Step 7 - Keeping Virtualmin updated
Virtualmin, Webmin and all the stack packages come from apt repositories, so normal system updates keep everything current:
sudo apt update
sudo apt upgrade
The dashboard also shows a Package updates counter. Run System Settings > Re-Check Configuration after major upgrades.
Troubleshooting
- The installer stops with a hostname error:
hostname -fmust return a name with at least one dot, and it must not be one of the domains you plan to host. Fix it as in Step 1 and run the installer again. - Cannot reach port 10000: check
sudo firewall-cmd --list-alland any firewall configured in front of the server. Make sure you usehttps://, nothttp://. - Let's Encrypt request fails: the domain's A record does not point to this server yet, or port 80 is blocked. Check with
dig +short your_domain. - Login fails as root: set the root password with
sudo passwd root. The panel does not accept SSH keys.
Conclusion
You installed Virtualmin GPL on Ubuntu 24.04, completed the post-install wizard and created a virtual server with its own website, database, mail and a Let's Encrypt certificate. Next, configure backups under Backup and Restore > Scheduled Backups to a remote destination, set up SPF and DKIM for the mail domains, and review which features you actually need so you can disable unused services and free memory.
