sodcalculator

10 Tech How-To

Install and Use Webmin on Ubuntu Linux

Guide 10-22415 · Updated · Step by step

To install Webmin on Ubuntu, you add the official Webmin repository, install the package with apt, and then access the web interface at https://your-server-ip:10000. This guide walks through the entire process, from adding the repository to configuring your first tasks, and covers common issues and security tips.

What Is Webmin?

Webmin is a web-based control panel for Unix-like systems, including Ubuntu. It lets you manage many system administration tasks through a browser instead of the command line: creating user accounts, configuring Apache or Nginx, setting up DNS, managing firewall rules, installing software, and monitoring system resources. It reads and edits the same configuration files you would edit manually, so changes made in Webmin are reflected in the underlying system.

Webmin is written in Perl and runs as a daemon (webmin) that listens on port 10000 by default. It uses HTTPS with a self-signed SSL certificate, which is why your browser will show a warning the first time you connect. You can replace the certificate with a trusted one later if desired.

Prerequisites

Before installing Webmin, ensure your Ubuntu system is up to date and has the necessary tools:

  • A user account with sudo privileges.
  • Access to the internet to download packages.
  • A firewall that allows HTTPS traffic on port 10000 (if you have a firewall enabled).

Webmin supports all current Ubuntu LTS releases (20.04, 22.04, 24.04) and most non-LTS releases. The installation steps are the same for all of them.

Step-by-Step Installation

The recommended method is to use the official Webmin repository. This ensures you receive updates automatically via apt.

  1. Update your package list:
    sudo apt update
  2. Install required dependencies:
    sudo apt install gnupg apt-transport-https wget
  3. Add the Webmin repository key:
    wget -q -O- https://www.webmin.com/jcameron-key.asc | sudo gpg --dearmor -o /usr/share/keyrings/webmin.gpg
  4. Add the repository to your sources list:
    Create a new file /etc/apt/sources.list.d/webmin.list with the following content:
    deb [signed-by=/usr/share/keyrings/webmin.gpg] https://download.webmin.com/download/repository sarge contrib
  5. Update again:
    sudo apt update
  6. Install Webmin:
    sudo apt install webmin

Once the installation completes, Webmin will start automatically. You can verify it is running with:

systemctl status webmin

If it is not running, start it with sudo systemctl start webmin and enable it on boot with sudo systemctl enable webmin.

Accessing the Web Interface

Open your web browser and navigate to https://your-server-ip:10000. Replace your-server-ip with the actual IP address of your Ubuntu machine. If you are accessing from the same machine, you can use https://localhost:10000.

Your browser will warn you about the self-signed certificate. This is expected. Click through the warning (in Chrome, click “Advanced” then “Proceed”; in Firefox, click “Advanced” then “Accept the Risk”).

You will then see a login screen. Use the root user credentials, or if root login is disabled (which is common on Ubuntu), use your sudo user’s username and password. Webmin uses the system’s PAM authentication, so any user in the sudo group can log in.

Common Configuration Tasks

Once logged in, you’ll see the Webmin dashboard with a menu on the left. Here are some common tasks you can perform:

  • Update software: Go to Dashboard and click “Refresh” to see available updates. You can install them directly from the interface.
  • Create a user: Navigate to System > Users and Groups. Click “Create a new user” and fill in the details. This is equivalent to useradd.
  • Manage firewall: Go to Networking > Linux Firewall. You can add rules to allow or block ports. For example, to allow SSH, add a rule for port 22.
  • Configure Apache: If Apache is installed, you’ll see a Servers > Apache Webserver section. You can edit virtual hosts, enable modules, and view logs.
  • Schedule cron jobs: Under System > Scheduled Cron Jobs, you can create new cron jobs with a GUI, specifying the command and schedule.

Security Considerations

Webmin is a powerful tool, so securing it is important. Here are key steps:

  • Change the default port: In Webmin, go to Webmin > Webmin Configuration > Ports and Addresses. Set the “Listen on port” to a non-standard port (e.g., 12345). This reduces automated scans.
  • Restrict access by IP: In the same section, you can specify “Listen only on IPs” to limit access to specific IP addresses.
  • Use a strong password: Ensure your system user passwords are strong. Webmin uses system authentication, so enforce password policies.
  • Enable two-factor authentication: Webmin supports TOTP (Google Authenticator). Go to Webmin > Webmin Configuration > Authentication and enable “Two-factor authentication”.
  • Keep Webmin updated: Regularly run sudo apt update && sudo apt upgrade to get security patches.

Also, consider using a reverse proxy (like Nginx) with a valid SSL certificate to access Webmin over HTTPS on port 443. This hides the Webmin port and provides a trusted certificate.

Troubleshooting Common Issues

Here are a few problems you might encounter and how to fix them:

  • Cannot connect to port 10000: Check if the webmin service is running (systemctl status webmin). Ensure your firewall allows incoming connections on port 10000. For UFW, run sudo ufw allow 10000/tcp.
  • Login fails: If you are using a non-root user, make sure that user is in the sudo group. You can check with groups username. If not, add them with sudo usermod -aG sudo username.
  • Webmin doesn’t start after upgrade: Sometimes an upgrade may leave the service in a bad state. Restart it with sudo systemctl restart webmin. If that fails, check the logs at /var/log/webmin/miniserv.log.
  • SSL certificate warning: This is normal. To get a trusted certificate, you can use Let’s Encrypt with a domain name pointing to your server. Webmin has a module for that under Webmin > Webmin Configuration > SSL Encryption.

Frequently Asked Questions

Is Webmin free?

Yes, Webmin is open source and free to use. It is licensed under the BSD license. There is also a commercial version called Virtualmin, which adds hosting management features, but Webmin itself is free.

Can I install Webmin on Ubuntu without a GUI?

Absolutely. Webmin is entirely web-based; the server does not need a graphical desktop. You can install it on a headless Ubuntu server and manage it from any browser on your local network or the internet.

Does Webmin work with Ubuntu 24.04?

Yes, Webmin supports Ubuntu 24.04. The official repository includes packages for all current LTS releases. If you encounter issues, make sure you are using the latest version of Webmin.

How do I uninstall Webmin?

To remove Webmin, run sudo apt remove webmin. If you also want to remove the repository, delete the file /etc/apt/sources.list.d/webmin.list and the key file /usr/share/keyrings/webmin.gpg.

Is Webmin safe to use on a production server?

Webmin is widely used in production, but it should be secured properly. Use strong authentication, restrict access by IP, and keep it updated. Avoid exposing it directly to the internet without a firewall or VPN.

Can I use Webmin to manage Docker containers?

Webmin has a Docker module that allows you to manage containers, images, and networks. You can install it from the “Modules” section in Webmin. It provides a graphical interface for common Docker operations.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →