keepcalculator

06 Numbers and Powers

Install Webmin on CentOS: Step-by-Step

Card No. 06·1393 · Updated · Standard formula, shown below

This guide walks you through installing Webmin, a web-based control panel for Linux servers, on CentOS. By the end, you’ll have a secure, browser-accessible interface to manage users, packages, services, and system configuration without touching the command line for everyday tasks. You’ll need a CentOS server (7, 8, or 9) with root or sudo access and a working internet connection.

What You’ll Need

  • A CentOS server (version 7, 8, or 9) with a static IP address or hostname.
  • Root access or a sudo user.
  • Internet connectivity to download packages.
  • Firewall rules allowing port 10000 (the default Webmin port).
  • Basic familiarity with SSH and the command line.

Step-by-Step

  1. Connect to your server via SSH: ssh root@your-server-ip or ssh your-user@your-server-ip and then use sudo -i to get root.
  2. Update your system to ensure all packages are current: dnf update -y (on CentOS 8/9) or yum update -y (on CentOS 7).
  3. Add the Webmin repository by creating a new repo file. Use your preferred editor, e.g., nano /etc/yum.repos.d/webmin.repo and paste the following content:
    [Webmin]
    name=Webmin Distribution Neutral
    baseurl=https://download.webmin.com/download/yum
    enabled=1
    gpgcheck=1
    gpgkey=https://download.webmin.com/jcameron-key.asc
        

    Save the file and exit.

  4. Import the GPG key (if not done automatically): rpm --import https://download.webmin.com/jcameron-key.asc
  5. Install Webmin using the package manager: dnf install webmin -y (or yum install webmin -y on CentOS 7). This will pull in dependencies and install Webmin.
  6. Verify the installation by checking the service status: systemctl status webmin. It should show as active (running). If not, start it with systemctl start webmin and enable it at boot with systemctl enable webmin.
  7. Configure the firewall to allow access on port 10000. If using firewalld (default on CentOS 8/9):
    firewall-cmd --permanent --add-port=10000/tcp
    firewall-cmd --reload
        

    On CentOS 7 with iptables, you might need to add a rule manually or use firewall-cmd if installed.

  8. Access Webmin by opening a web browser and navigating to https://your-server-ip:10000. You’ll see a security warning because the default SSL certificate is self-signed; proceed anyway.
  9. Log in using your root credentials or a sudo user (if you configured Webmin to allow sudo users). The first login may take a moment as Webmin loads modules.

Common Mistakes

  • Forgetting to open the firewall – the most common reason Webmin is unreachable. Double-check that port 10000 is open in both firewalld and any cloud security groups (e.g., AWS Security Group, Azure NSG).
  • Using HTTP instead of HTTPS – Webmin defaults to HTTPS on port 10000. Trying to access http://...:10000 will fail.
  • Ignoring the GPG key – if the key isn’t imported, the package manager may refuse to install. Always import it.
  • Running an outdated CentOS version – CentOS 6 and earlier are unsupported and may have dependency conflicts. Use CentOS 7 or later.
  • Not enabling the service – if you don’t run systemctl enable webmin, Webmin won’t start after a reboot.

Tips

  • Use a strong password for your root/sudo account since Webmin exposes system management over the network.
  • Restrict access by IP – in Webmin’s network configuration, you can limit which IP addresses can connect. This adds a layer of security.
  • Update Webmin regularly – use dnf update webmin or the built-in update manager in Webmin to keep it patched.
  • Back up your configuration – Webmin has a backup module that can save all settings to a file, which is useful before major changes.
  • Use a hostname – if your server has a hostname, use that instead of the IP to avoid certificate warnings (though self-signed still triggers them).

Troubleshooting

  • Webmin won’t start – check the logs: tail -f /var/webmin/miniserv.log or journalctl -u webmin. Common issues include port conflicts (if something else uses 10000) or missing Perl modules. Reinstall with dnf reinstall webmin to fix missing dependencies.
  • Can’t connect from browser – verify the service is listening: netstat -tulpn | grep 10000. If it’s not, start it. Then check firewall rules with firewall-cmd --list-all. Also test from another machine: telnet your-server-ip 10000.
  • SSL error in browser – this is expected with the default self-signed certificate. You can either proceed (advanced) or replace it with a Let’s Encrypt certificate via the Webmin UI under ‘Webmin > Webmin Configuration > SSL Encryption’.
  • Login fails – ensure you’re using the correct username (root or a sudo user). If you’re locked out, you can reset the password via SSH: passwd root. Also check that the account isn’t locked by Webmin’s failed-login protection; wait 5 minutes or restart Webmin.
  • Repository not found – if dnf install webmin fails, check the repo file for typos. Also, on CentOS 9, you may need to install epel-release first for some dependencies: dnf install epel-release -y.

Frequently Asked Questions

Is Webmin free to use?

Yes, Webmin is open-source and free, licensed under the BSD license.

Can I install Webmin on CentOS 9 Stream?

Yes, the steps above work on CentOS 9 Stream, but you may need to enable the EPEL repository for some dependencies.

Does Webmin replace SSH?

No, Webmin is a web-based alternative for many administrative tasks, but SSH is still needed for initial setup and for tasks that Webmin doesn’t cover.

How do I update Webmin?

Use dnf update webmin or the ‘Webmin > Webmin Updates’ section in the UI.

Can I change the default port 10000?

Yes, go to ‘Webmin > Webmin Configuration > Ports and Addresses’ and change the port. Remember to update the firewall accordingly.

Is Webmin secure enough for production?

It can be, if you use strong passwords, restrict access by IP, keep it updated, and consider using a reverse proxy with SSL. Avoid exposing it directly to the internet if possible.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →