
This article provides a how-to guide to deploy Virtualmin on AlmaLinux VPS.
What is Virtualmin?
Virtualmin is a powerful open-source web hosting control panel built on top of Webmin.
It supports:
- Multi-domain virtual hosting
- Apache or Nginx
- PHP versions & FPM
- MariaDB/MySQL & PostgreSQL
- DNS, email, FTP
- Letโs Encrypt SSL
- Backups & automation
- Cloud-Init & CLI installs
On AlmaLinux, Virtualmin is fully compatible and extremely stable.
โญ Prerequisites
| Requirement | Details |
|---|---|
| OS | AlmaLinux 8 or AlmaLinux 9 (minimal installation recommended) |
| User | Root or sudo user |
| RAM | Minimum 2 GB (4 GB+ recommended for email hosting) |
| Disk | 20 GB minimum |
| FQDN | Example: server.yourdomain.com |
| Ports | 22, 80, 443, and 10000 (Webmin UI) |
How to Deploy Virtualmin on AlmaLinux VPS
To deploy Virtualmin on AlmaLinux VPS, follow the steps below:
-
Update the System
sudo dnf update -y sudo dnf install epel-release nano firewalld -y
Reboot to ensure kernel updates apply:
sudo reboot
-
Set the Hostname
Virtualmin requires a Fully Qualified Domain Name (FQDN).
sudo hostnamectl set-hostname server.yourdomain.com
Add it to
/etc/hosts:sudo nano /etc/hosts
Add:
YOUR.SERVER.IP server.yourdomain.com server
-
Disable โCloud Linuxโ or Third-Party Repos (If Present)
Virtualmin requires stock repos.
Check for nonstandard repos:
dnf repolist
Disable anything you donโt recognize:
sudo dnf config-manager --set-disabled REPO-NAME
-
Install Required Utilities
sudo dnf install wget curl vim git unzip -y
-
Download the Official Virtualmin Installer
Virtualmin provides an auto-installer tailored for AlmaLinux.
wget https://software.virtualmin.com/gpl/scripts/install.sh chmod +x install.sh
-
Run the Virtualmin Installer
๐ฆ This installs Webmin, Virtualmin, Postfix, Dovecot, MariaDB, BIND, PHP-FPM, Apache or Nginx, firewall rules, SSL, and more.
Run the installer:
sudo ./install.sh
You will be asked:
- Install Virtualmin GPL or Pro? (Default is GPL)
- LAMP or LEMP? (Choose based on preference)
- DNS configuration? (Recommended: Yes)
Installer takes 10โ25 minutes depending on server speed.
-
Open Required Firewall Ports
If using firewalld:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --permanent --add-port=10000/tcp sudo firewall-cmd --reload
-
Login to Virtualmin

Login to virtualmin from browser Open a browser:
https://server.yourdomain.com:10000/
Login as:
- Username: root
- Password: root password
-
Complete the Post-Installation Wizard
Virtualmin will guide you through:
Recommended Wizard Choices
Option Recommended Value Database size Large system MariaDB optimization Yes Run email server? Yes (if needed) Run ClamAV/SpamAssassin? Yes if RAM โฅ 4 GB Accept IPv6? Yes Letโs Encrypt setup Yes -
Enable Letโs Encrypt SSL
Virtualmin can issue LE certificates for:
- Hostname
- All hosted domains
- FTP
- Webmail
- Admin panel
For server hostname:
Go to:
Webmin โ Webmin Configuration โ SSL Encryption โ Let's Encrypt
Check:
- Request certificate for hostname
- DNS must already resolve!
Click Request Certificate.
-
Create Your First Virtual Server (Website)
Go to:
Virtualmin โ Create Virtual Server
Fill in:
- Domain name
- Description
- Admin password
- Features (DNS, email, web, DB)
Click Create Server.
This automatically sets up:
- Apache/Nginx vhost
- PHP-FPM pool
- DNS zone
- Mailboxes
- FTP user
- LeSSL auto-renew
- MariaDB database
-
Switch Between Apache and Nginx (Optional)
Virtualmin defaults to Apache.
To use Nginx instead:
sudo dnf remove httpd -y sudo dnf install nginx -y sudo systemctl enable --now nginx
Then re-run installer with LEMP flag:
sudo ./install.sh --bundle LEMP
-
Install Multiple PHP Versions
Virtualmin supports multiple versions cleanly.
AlmaLinux 8:
sudo dnf module reset php -y sudo dnf module enable php:remi-8.3 -y sudo dnf install php php-fpm php-cli php-mysqlnd php-opcache php-xml php-zip -y
AlmaLinux 9:
Use Remi repo:
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm -y sudo dnf module enable php:remi-8.3 -y sudo dnf install php php-fpm php-mysqlnd -y
Virtualmin autoconfigures the pools.
-
Configure Automatic Backups
Go to:
Virtualmin โ Backup and Restore
Create:
- Daily full backup
- Weekly incremental
- Offsite storage: S3, SSH, FTP
Recommended schedule:
Full: weekly Incremental: daily Retention: 14โ30 days
-
Enable Fail2Ban (Recommended)
sudo dnf install fail2ban -y sudo systemctl enable --now fail2ban
Enable Webmin/Virtualmin protection:
sudo nano /etc/fail2ban/jail.local
Add:
[webmin-auth] enabled = true port = 10000 filter = webmin-auth logpath = /var/log/secure maxretry = 5
Restart:
sudo systemctl restart fail2ban
-
Set Up Email DKIM, SPF, DMARC
Virtualmin โ Email Settings โ DomainKeys Identified Mail
Enable for all domains.
Add the following DNS records:
SPF
v=spf1 mx ~all
DMARC
v=DMARC1; p=none; rua=mailto:postmaster@yourdomain.com
-
Setup Automatic Security Updates
sudo dnf install dnf-automatic -y sudo systemctl enable --now dnf-automatic.timer
-
Useful Troubleshooting Commands
Restart Webmin:
sudo systemctl restart webmin
Restart Virtualmin services:
sudo virtualmin check-config
View system logs:
journalctl -xe
-
Optional: Harden the Server (Security Enhancements)
Disable root login via SSH:
sudo nano /etc/ssh/sshd_config
Set:
PermitRootLogin no
Restart:
sudo systemctl restart sshd
Enable 2FA in Webmin:
Webmin โ Webmin Configuration โ Two-Factor Authentication
Use Google Authenticator or Authy.
๐ Virtualmin Deployment Complete
Your AlmaLinux VPS is now running a full-featured hosting panel with:
- DNS
- Databases
- Multi-PHP
- SSL automation
- Backups
- Security hardening
- Web-based administration
Conclusion
You now know how to deploy Virtualmin on AlmaLinux VPS.










