Installing Webmin on CentOS Stream 9: Effortless Linux Server Administration via Web UI

CentOS tutorial - IT technology blog
CentOS tutorial - IT technology blog

Quick Start: Install Webmin in 3 Minutes

For those who want instant results. Just copy-paste these commands into your CentOS Stream 9 terminal. I’ve optimized these steps to get Webmin running immediately.

# 1. Update the system and install download tools
sudo dnf update -y
sudo dnf install wget tar -y

# 2. Set up the official Webmin Repository
wget https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
sudo sh setup-repos.sh

# 3. Install Webmin
sudo dnf install webmin -y

# 4. Open port 10000 on the Firewall
sudo firewall-cmd --add-port=10000/tcp --permanent
sudo firewall-cmd --reload

Installation complete! Now open your browser and navigate to: https://<Your-IP>:10000. Use the root account and your server password to log in.


What is Webmin? Why do SysAdmins still need it?

The Command Line Interface (CLI) is the soul of Linux. However, when you have to manage dozens of services simultaneously, typing commands can sometimes be slow. Webmin acts as an intuitive “control center.” It helps you create users, configure DNS, or set disk quotas with just a few clicks instead of remembering hundreds of file paths in /etc/.

Many often compare Webmin to Cockpit (which comes built-in with CentOS 9). In reality, Cockpit is great for monitoring resource graphs (CPU, RAM). But if you need to dive deep into configuring services like Postfix, BIND, or Samba with over 100 supported modules, Webmin remains the top choice.

Real-world experience: Last year, I had to migrate 10 servers to CentOS Stream in a short timeframe. Re-establishing complex permission rules for each department using vi or nano was extremely error-prone. Thanks to Webmin, I controlled all parameters and applied new configurations 40% faster, avoiding disastrous typos.

Detailed Steps for Installation and Repository Configuration

Although the Quick Start section helped you finish the installation, understanding the underlying process will help you troubleshoot better later on.

Step 1: Set up the Webmin Repository

Why not just download the .rpm file and install it directly? Adding the official repo allows the system to automatically receive security patches when you run dnf update. The setup-repos.sh script automatically adds the configuration file to /etc/yum.repos.d/ and imports the GPG key to ensure the packages haven’t been tampered with.

Step 2: Install via DNF

CentOS Stream 9 uses the dnf package manager. When executing sudo dnf install webmin, the system will automatically find and install the necessary Perl libraries. This is the foundation that allows Webmin to communicate with Linux system files.

Step 3: Check the Service

Webmin usually starts automatically after installation. You can confirm its status with the command:

sudo systemctl status webmin

If you see “active (running)” in green, you’re good to go. If not, enable it using sudo systemctl enable --now webmin.

Securing Webmin: Don’t Leave the Door Open for Hackers

Webmin holds supreme authority over the server. If login credentials are leaked, a hacker could wipe your data in seconds. Implement these 3 security steps immediately.

1. Change the Default Port

Port 10000 is a frequent target for automated scanning bots. You should change it to a non-standard port (e.g., 2405) under: Webmin -> Webmin Configuration -> Ports and Addresses. Don’t forget to update your Firewall so you don’t get locked out:

sudo firewall-cmd --add-port=2405/tcp --permanent
sudo firewall-cmd --remove-port=10000/tcp --permanent
sudo firewall-cmd --reload

2. Install SSL from Let’s Encrypt

Browsers will display an “Insecure Connection” error because Webmin uses a self-signed certificate. For a more professional setup, go to SSL Encryption -> Let’s Encrypt. Simply enter your domain and the web file path, and Webmin will automatically register and renew the SSL for you.

3. Enable Two-Factor Authentication (2FA)

This is an extremely secure final line of defense. Webmin has excellent support for Google Authenticator. Go to Two-Factor Authentication, scan the QR code on your phone, and you’re done. Even if your root password is leaked, the server remains safe because the hacker won’t have the OTP from your phone.

Performance Optimization Tips for Webmin

  • Smart File Management: The “File Manager” module allows you to drag and drop files directly from your computer to the server. No need to install FileZilla or WinSCP, keeping your machine light.
  • Visual Log Reading: Instead of typing tail -f /var/log/messages, use System Logs. This interface supports color highlighting, helping you spot errors much faster.
  • Schedule Backups: Use the Backup Configuration Files feature. I usually schedule configuration file backups to Google Drive or FTP every Sunday as a precaution.
  • Note on SELinux: If you encounter a “Permission Denied” error even when using root, there’s a high chance SELinux is blocking Webmin. Check the logs and grant permissions instead of disabling SELinux entirely to keep the system secure.

In conclusion, Webmin doesn’t completely replace the CLI, but it is a powerful right-hand tool for any SysAdmin. On CentOS Stream 9, this combination provides the perfect balance between system power and management convenience.

Share: