How To Install Virtualmin on Manjaro
Virtualmin stands as one of the most powerful open-source web hosting control panels available today, offering system administrators a robust solution for managing multiple websites, email accounts, DNS settings, and databases through a unified interface. When combined with Manjaro Linux, an Arch-based distribution known for its stability and cutting-edge features, you gain a flexible and powerful web hosting environment. This comprehensive guide walks you through the entire process of installing and configuring Virtualmin on Manjaro, from initial preparations to advanced optimization techniques.
Introduction to Virtualmin and Manjaro
Virtualmin is an open-source web hosting control panel built on top of Webmin that simplifies the complex tasks of managing web hosting environments. It provides an intuitive graphical interface for tasks that would otherwise require extensive command-line expertise, making server administration more accessible to users of all skill levels.
What is Virtualmin?
Virtualmin offers comprehensive tools for managing multiple virtual servers from a single dashboard. Its feature set includes:
- Domain and DNS management
- Email server configuration and administration
- Database creation and management
- Web application deployment
- SSL certificate management
- Backup and restoration tools
- User account management with granular permission controls
All these capabilities are presented through a browser-based interface, accessible from anywhere with proper authentication.
Why Choose Manjaro as Your Server Platform?
Manjaro Linux, derived from Arch Linux, brings several compelling advantages to server environments:
- Rolling release model ensuring you always have the latest software
- Access to the extensive Arch User Repository (AUR)
- Exceptional hardware compatibility
- User-friendly package management
- Strong community support
- Excellent performance with minimal resource overhead
The combination of Manjaro’s stability with Virtualmin’s comprehensive management features creates an ideal environment for both development servers and production deployments.
Key Benefits of This Integration
Implementing Virtualmin on Manjaro offers several distinct advantages:
- Simplified management of complex server tasks through an intuitive GUI
- Reduced administrative overhead through automation tools
- Enhanced security through integrated monitoring and management
- Efficient resource utilization with performance optimization tools
- Scalability to accommodate growing workloads and websites
Prerequisites for Installation
Before proceeding with the Virtualmin installation, ensuring your system meets all requirements will prevent potential complications and ensure optimal performance.
System Requirements
Virtualmin requires reasonably robust hardware to operate efficiently, especially when managing multiple virtual servers:
- Processor: Modern multi-core CPU (2+ cores recommended)
- Memory: Minimum 2GB RAM, though 4GB or more is strongly recommended
- Storage: At least 20GB free disk space for system files and basic operations
- Network: Stable internet connection with sufficient bandwidth
- Display: Not critical as management is done via web interface
Essential Preparations
Several critical preparations must be made before installation begins:
- Verify sudo privileges: Ensure your user account has sudo capabilities to execute administrative commands:
sudo whoami
If this returns your username, you have the necessary privileges.
- Update your system: Ensure Manjaro is fully updated before proceeding:
sudo pacman -Syu
- Set up a proper FQDN: Configure a fully qualified domain name for your server:
sudo hostnamectl set-hostname server.yourdomain.com
- Edit hosts file: Ensure your hostname resolves properly:
sudo nano /etc/hosts
Add a line with:
127.0.1.1 server.yourdomain.com server
Network Considerations
Proper network configuration is essential for Virtualmin to function correctly:
- Configure a static IP address to ensure consistent access
- Set up port forwarding for port 10000 if your server is behind a router
- Check that DNS resolution works properly for your domain
- Consider configuring IPv6 for future-proofing your setup
- Plan your SSL certificate strategy (Let’s Encrypt integration or manual certificates)
Step-by-Step Installation Guide
Following a methodical approach ensures a smooth Virtualmin installation process. These steps are designed to be followed sequentially for optimal results.
1. System Update
Begin by ensuring your Manjaro system is fully updated to prevent compatibility issues:
sudo pacman -Syu
After updates complete, reboot your system to ensure all changes take effect:
sudo reboot
This step is critical as it ensures you’re working with the latest kernel and security patches, avoiding potential conflicts during the installation process.
2. Dependency Installation
Virtualmin requires several packages to function properly. Install these core dependencies first:
sudo pacman -S apache mysql php php-apache perl net-tools bind-tools
Next, install the mail server components required by Virtualmin:
sudo pacman -S postfix dovecot
For security and anti-virus protection, install ClamAV:
sudo pacman -S clamav
Additional useful utilities:
sudo pacman -S unzip wget git rsync
3. LAMP Stack Setup
Virtualmin requires a functioning LAMP stack. While we’ve installed the components in the previous step, we need to configure and enable them:
# Enable and start Apache
sudo systemctl enable httpd
sudo systemctl start httpd
# Enable and start MySQL
sudo systemctl enable mysqld
sudo systemctl start mysqld
# Secure MySQL installation
sudo mysql_secure_installation
During the MySQL secure installation, follow the prompts to set a root password and remove test databases and anonymous users.
4. Download Installation Script
Retrieve the official Virtualmin installation script from the project’s repository:
wget http://software.virtualmin.com/gpl/scripts/install.sh
Verify the integrity of the downloaded script:
sha256sum install.sh
Compare this with the official checksum from the Virtualmin website to ensure the file hasn’t been tampered with.
5. Execute the Installation Script
Make the script executable and run it with elevated privileges:
chmod +x install.sh
sudo ./install.sh
During execution, the script will:
- Check system compatibility
- Install additional required packages
- Configure services for Virtualmin
- Set up initial security parameters
- Configure Apache, MySQL, and other components
The installation process may take 30-60 minutes depending on your system’s speed and internet connection. You’ll be prompted to make several choices during installation:
- Mail server configuration options
- DNS management preferences
- Database selection (MySQL is recommended for beginners)
- Initial admin password setting
6. Verify Installation
After the script completes, verify that all services are running correctly:
sudo systemctl status webmin
sudo systemctl status apache2
sudo systemctl status mysql
All these services should show as “active (running)”. If any service fails to start, consult the troubleshooting section later in this guide.
Post-Installation Configuration
After successful installation, configuring Virtualmin properly ensures optimal performance and security for your hosting environment.
First Login Procedure
Access the Virtualmin interface through your web browser:
- Open your browser and navigate to
https://your-server-ip:10000
orhttps://localhost:10000
if you’re on the same machine - You’ll likely encounter a security warning about the self-signed SSL certificate; add an exception to proceed
- Log in using your system’s root username and password
- Upon first login, Virtualmin will run a post-installation wizard to configure basic settings
Essential Dashboard Settings
Several initial configurations will optimize your Virtualmin setup:
- System Settings
- Set your server’s timezone correctly
- Configure email notifications for important events
- Set up automatic updates for security patches
- Network Configuration
- Verify network settings are correct
- Configure DNS resolvers if needed
- Set bandwidth monitoring thresholds
- Backup Configuration
- Define backup schedules
- Set backup retention policies
- Configure off-site backup locations for disaster recovery
Virtual Server Creation
Creating your first virtual server validates your installation:
- Navigate to “Create Virtual Server” in the left menu
- Enter domain details:
- Domain name (e.g., example.com)
- Description
- Administrator username and password
- Configure resources:
- Disk space quotas
- Bandwidth limitations
- Feature enabling (web, mail, DNS, etc.)
- Choose template settings
- Click “Create Server” to generate your first virtual host
After creation, Virtualmin automatically configures Apache, DNS, mail services, and databases for this domain, making it immediately functional.
Common Troubleshooting
Even with careful installation, issues may arise. Here are solutions to common problems encountered when setting up Virtualmin on Manjaro.
Port Conflicts
If Virtualmin cannot start due to port conflicts:
- Identify which service is using port 10000:
sudo ss -tulpn | grep ':10000'
- Either stop the conflicting service or reconfigure Webmin to use a different port:
sudo nano /etc/webmin/miniserv.conf
Change the “port=” line to an available port, then restart Webmin:
sudo systemctl restart webmin
Dependency Errors
If you encounter Perl module dependency errors:
- Note the missing module names from the error messages
- Install them using pacman and CPAN:
sudo pacman -S perl-[module-name]
If not available in pacman:
sudo cpan [Module::Name]
- Restart Webmin after installing dependencies:
sudo systemctl restart webmin
Service Failures
If services fail to start properly:
- Check the systemd journal for detailed error messages:
journalctl -u webmin -f journalctl -u apache2 -f journalctl -u mysql -f
- Verify firewall settings aren’t blocking necessary ports:
sudo ufw status # If using ufw, ensure port 10000 is allowed: sudo ufw allow 10000/tcp
- Check configuration file syntax:
sudo apachectl -t # Tests Apache config sudo named-checkconf # Tests BIND config
Security Hardening
Securing your Virtualmin installation is crucial for protecting both your server and client data.
Essential Protections
Implement these fundamental security measures:
- Two-Factor Authentication
- Navigate to Webmin → Webmin Configuration → Two-Factor Authentication
- Enable and configure either TOTP or FIDO U2F authentication
- IP Access Restrictions
- Limit admin access to specific IP addresses:
- Go to Webmin → Webmin Configuration → IP Access Control
- Add your trusted IP addresses and deny all others
- Fail2ban Integration
- Install and configure Fail2ban to protect against brute force attacks:
sudo pacman -S fail2ban sudo systemctl enable fail2ban sudo systemctl start fail2ban
- Create a jail for Webmin/Virtualmin:
sudo nano /etc/fail2ban/jail.d/webmin.conf
- Add the following:
[webmin-auth] enabled = true port = 10000 filter = webmin-auth logpath = /var/log/auth.log maxretry = 3 bantime = 600
- Install and configure Fail2ban to protect against brute force attacks:
Regular Maintenance
Establish these security routines:
- Automated Updates
- Configure automatic security updates:
sudo pacman -S pacman-contrib sudo systemctl enable paccache.timer sudo systemctl start paccache.timer
- Configure automatic security updates:
- Log Monitoring
- Install logwatch to receive daily log summaries:
sudo pacman -S logwatch sudo nano /etc/logwatch/conf/logwatch.conf
- Configure email settings for notifications
- Install logwatch to receive daily log summaries:
- Regular Security Audits
- Perform monthly security scans using Lynis:
sudo pacman -S lynis sudo lynis audit system
- Perform monthly security scans using Lynis:
Performance Optimization
Optimizing your Virtualmin installation ensures efficient resource usage and improved response times.
Resource Monitoring
Implement comprehensive monitoring:
- Virtualmin’s Built-in Monitoring
- Enable system statistics collection in System Settings
- Configure threshold alerts for CPU, memory, and disk space
- External Monitoring Tools
- Install additional monitoring tools:
sudo pacman -S htop iotop glances
- Configure Monit for service monitoring:
sudo pacman -S monit sudo systemctl enable monit sudo systemctl start monit
- Install additional monitoring tools:
Caching Strategies
Implement caching to improve performance:
- PHP OPcache
- Enable and configure PHP OPcache:
sudo nano /etc/php/php.ini
- Add or modify these settings:
opcache.enable=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1
- Enable and configure PHP OPcache:
- Web Server Caching
- Enable Apache caching modules:
sudo a2enmod cache cache_disk sudo systemctl restart apache2
- Enable Apache caching modules:
Database Optimization
Tune your database for better performance:
- MySQL Performance Tuning
- Create an optimized my.cnf:
sudo nano /etc/mysql/my.cnf
- Add these performance settings:
[mysqld] innodb_buffer_pool_size = 1G innodb_log_file_size = 256M innodb_flush_log_at_trx_commit = 2 query_cache_size = 64M query_cache_limit = 2M
- Create an optimized my.cnf:
- Regular Maintenance
- Schedule automated database optimization:
sudo nano /etc/cron.weekly/optimize-databases
- Add:
#!/bin/bash mysqlcheck -o --all-databases -u root -p'password'
- Make executable:
sudo chmod +x /etc/cron.weekly/optimize-databases
- Schedule automated database optimization:
Professional Best Practices
Adopting these professional practices ensures reliable, secure operations of your Virtualmin server.
Disaster Recovery
Implement a comprehensive backup strategy:
- Automated Backups
- Configure Virtualmin’s built-in backup system:
- Navigate to System Settings → Scheduled Backups
- Set up daily incremental and weekly full backups
- Store backups on separate physical media
- Configure Virtualmin’s built-in backup system:
- Off-site Replication
- Set up rsync to external storage:
sudo pacman -S rsync
- Create a backup script for off-site transfers:
sudo nano /usr/local/bin/offsite-backup.sh
- Schedule regular execution via cron
- Set up rsync to external storage:
Monitoring Tools
Implement proactive monitoring:
- Nagios Integration
- Install NRPE for Nagios monitoring:
sudo pacman -S nagios-nrpe
- Configure checks for critical services:
sudo nano /etc/nagios/nrpe.cfg
- Install NRPE for Nagios monitoring:
- Custom Monitoring Scripts
- Develop custom scripts for application-specific monitoring
- Store in
/usr/local/bin/
with appropriate permissions - Integrate with notification systems like email or messaging platforms
Congratulations! You have successfully installed Virtualmin. Thanks for using this tutorial for installing the Virtualmin web hosting control panel on your Manjaro Linux system. For additional help or useful information, we recommend you to check the official Virtualmin website.