Log inSign up

Host many domains on one VPS with Virtualmin

Set a fully qualified host name, download virtualmin-install.sh from the Virtualmin project and run it with sudo on a freshly installed server. It installs Webmin, Apache (or Nginx with --bundle LEMP), PHP, MariaDB, BIND and Postfix, then you finish a short wizard at https://198.51.100.24:10000. Each website becomes a virtual server with its own Unix user, home folder, database and certificate.

Topic: Control panels · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

What is the difference between Virtualmin and Webmin?

Virtualmin is a module set that runs inside Webmin and adds domain based hosting. Webmin manages the machine; Virtualmin manages the things you host on it. Creating a virtual server for example.net creates a Unix account, a home directory with public_html, a web server virtual host, a PHP pool, an optional database, a DNS zone and mail boxes in one step. Owners of each domain can log in to a limited view that only shows their own sites.

Two editions exist. The GPL edition is free and covers everything in this guide. A Pro edition is sold under a license with extra features such as additional reporting and resource limits; you can start with GPL and upgrade later without reinstalling. For a lighter system panel without hosting features, see the Webmin guide.

Why does Virtualmin need a fresh server?

The installer rewrites the configuration of Apache, PHP, Postfix, BIND and the database server. On a server that already runs any of those, it can overwrite your settings or fail halfway. Deploy a new instance, or reinstall the current one from the Settings tab as shown in reinstalling an image, then run the installer before adding anything else. Supported images on our side are Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9 and AlmaLinux 9.

Size the plan for the full stack. With ClamAV virus scanning and SpamAssassin enabled, plan on at least 2 GB of RAM, and 4 GB is more comfortable once a few PHP sites run. Disable the virus scanner in the wizard if memory is tight, or add a swap file as a safety net.

How do I prepare the host name?

Virtualmin expects a fully qualified domain name for the server itself, separate from the sites you will host. Pick something like host.example.net, create an A record pointing to 198.51.100.24, and set it on the server:

sudo hostnamectl set-hostname host.example.net
echo "198.51.100.24 host.example.net host" | sudo tee -a /etc/hosts
hostname -f

The last line must print the full name. The host name guide explains the details, and the DNS records tutorial shows the A and AAAA records.

How do I run the Virtualmin installer?

Download the script, look through it, then start it as root through sudo. The default bundle installs Apache; add --bundle LEMP if you prefer Nginx. The --minimal flag skips mail filtering and a few other heavy parts, which suits small plans.

curl -o virtualmin-install.sh https://download.virtualmin.com/virtualmin-install.sh
less virtualmin-install.sh

# Apache stack
sudo sh virtualmin-install.sh

# or Nginx stack with fewer extras
sudo sh virtualmin-install.sh --bundle LEMP --minimal

The run takes several minutes and ends with the panel address. Afterwards confirm the main services are up:

sudo systemctl status webmin --no-pager
sudo virtualmin check-config
sudo ss -tlnp | grep -E ":(80|443|10000)\b"

What should I choose in the post install wizard?

Sign in at port 10000 as root or your sudo user and the wizard starts by itself. Sensible answers for a single VPS:

  • Preload libraries: no on 2 GB, yes when memory is generous, it only speeds up the panel.
  • Virus scanning: off unless you host mail for others and have RAM to spare.
  • Spam filtering: on if you will receive mail here.
  • Database servers: MariaDB or MySQL as your apps need, PostgreSQL only if required.
  • Primary nameserver: keep DNS at your registrar unless you plan to run your own name servers.
  • Password storage: hashed only.

Finish with the re-check button so Virtualmin validates the whole configuration.

How do I add a website with HTTPS?

Click Create Virtual Server, enter example.net, an administration password and the features you need, then save. Upload files over SFTP into /home/example/public_html or install an app through the script installers list. Once the DNS records point to the server, open Server Configuration, SSL Certificate, and request a Let's Encrypt certificate for the domain and its www name. Virtualmin renews it automatically.

The same can be done from the shell, which is handy for scripting:

sudo virtualmin create-domain --domain example.net --pass "ChangeMe123" --default-features
sudo virtualmin list-domains
sudo virtualmin generate-letsencrypt-cert --domain example.net

Which ports must the firewall allow?

Open only what you use. A web host without mail needs SSH, HTTP, HTTPS and the panel. Add mail and DNS ports only if you run those services here. Check which firewall the installer configured, since recent versions set one up for you:

# Ubuntu and Debian
sudo ufw status
sudo ufw allow 80,443/tcp
sudo ufw allow from 203.0.113.7 to any port 10000 proto tcp

# Rocky Linux and AlmaLinux
sudo firewall-cmd --list-all
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --reload

Port 20000 belongs to Usermin, the mailbox and user self-service panel; open it only if users need it.

How do I send mail from Virtualmin reliably?

Route outgoing mail through an authenticated SMTP relay on port 587. Direct delivery on port 25 may not be open on your server, so ask support with a ticket before planning to deliver mail directly, and request reverse DNS for your host name the same way. A relay keeps Postfix working regardless:

sudo postconf -e "relayhost = [smtp.example.net]:587"
sudo postconf -e "smtp_sasl_auth_enable = yes"
sudo postconf -e "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd"
sudo postconf -e "smtp_sasl_security_options = noanonymous"
sudo postconf -e "smtp_tls_security_level = encrypt"
echo "[smtp.example.net]:587 relayuser:relaypassword" | sudo tee /etc/postfix/sasl_passwd
sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo systemctl reload postfix

Send a test with echo test | mail -s relay-test you@example.net and watch sudo journalctl -u postfix -f. The SMTP relay guide and SPF, DKIM and DMARC guide cover the DNS side.

How do I update and back up Virtualmin?

Virtualmin packages come from its own repository, so sudo apt update && sudo apt upgrade or sudo dnf upgrade keeps the panel and stack current. For data, Backup and Restore, Scheduled Backups can write a nightly archive of every virtual server (files, databases, mail and settings) to a local folder or to another machine over SSH. Keep at least one copy off the server, and combine it with our optional daily backups add-on for whole disk recovery.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4full stack with spam filtering and a few PHP sites2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A1-2minimal install with mail filtering off1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months

Questions about Virtualmin web hosting panel

Can I install Virtualmin on a server that already runs websites?

It is not recommended. The installer changes web, mail and DNS configuration. Move the sites to a freshly deployed server that has Virtualmin from the start, then switch DNS.

Apache or Nginx, which bundle should I pick?

Apache supports per directory .htaccess files that many PHP apps expect. Nginx uses less memory per connection. Choose before installing, because switching later means reconfiguring every domain.

Do I need the Pro license?

No. The GPL edition hosts domains, databases, mail and certificates. The licensed Pro edition adds extra management features; check the Virtualmin site for its current terms.

Why does the installer complain about the host name?

It needs a fully qualified name such as host.example.net that resolves to the server. Set it with hostnamectl, add it to /etc/hosts and run the installer again.

Can clients log in to manage their own site?

Yes. Each virtual server has its own administration login that sees only its domains, mail boxes and databases, on the same port 10000 address.

How do I see why a domain is not served?

Run sudo virtualmin validate-domains --domain example.net --all-features, then check the web server error log under the domain home folder in logs/.