How to Install and Use Webmin on Ubuntu Linux

Administering a server can be a daunting task. The good news is, there are plenty of tools available to make the job easier. One of these tools is Webmin. This tutorial shows how to install Webmin on an Ubuntu Linux server.

What Is Webmin?

Webmin is a web-based interface for system administration in Unix. It is similar to cPanel and Plesk but is free and open source. Use it to set up user accounts, Apache, DNS, file sharing and much more.

Webmin removes the need to manually edit Unix configuration files and lets you easily manage a system. This can save you a lot of time, especially if you are not familiar with the command line or need to provide web-based access to server administration for multiple users.

Webmin can also be used to monitor multiple servers from a single location. This is very handy if you are responsible for managing a large number of servers.

Adding Webmin Repository

Before we start, it is good to first update and upgrade the system.

sudo apt update && sudo apt -y upgrade

Next, install the dependencies for Webmin:

sudo apt install software-properties-common apt-transport-https wget -y.
Webmin Install Required Package

Add the Webmin repository to the system:

sudo wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64]  sarge contrib"

Finally, install Webmin with the command:

sudo apt install webmin -y
Webmin Ubuntu Install

Once the installation completes, run the systemctl commands to start and enable the Webmin service.

sudo systemctl start webmin
sudo systemctl enable webmin

Check the status of the Webmin service to ensure that it is up and running.

sudo systemctl status webmin

You will see an output similar to the following, which indicates that the service is up and running.

Webmin Ubuntu Check Status

The Webmin service listens on port 10000 by default. Run the ss command to check whether it is listening.

sudo ss -ltn | grep :10000

You will see an output similar to the following that indicates that the service is listening on port 10000.

Webmin Ubuntu Check Listen Port

Accessing the Webmin Web UI

To access the Webmin web interface, navigate to your server’s IP address followed by :10000 in your web browser:

http://your_server_ip:10000

The first time you access the Webmin interface you will see a warning as shown below, as the SSL certificate used by Webmin is self-signed.

Webmin Ubuntu Access Web Ui

We will fix that later. For now, you can safely ignore this message and click on the “Advanced” button.

Click “Accept the Risk and Continue” on the next page to access the Webmin login page.

Webmin Ubuntu Access Web Ui Accept Cert

You will see the login page as shown. Use the credentials for your root user and click “Sign in” to log in to Webmin.

Webmin Ubuntu Log In Web Ui

Remember, you must use the credentials for your root user. If you want to log in as a non-root user, you will have to edit the “/etc/webmin/config” file.

After logging in, you will see the Webmin dashboard, as shown below, where you can configure various aspects of your Ubuntu system from the Webmin web interface.

Webmin Ubuntu View Dashboard 3

Securing Webmin With SSL

  1. First, run the following command to install the Apache web server and the Let’s Encrypt Certbot tool. We are using certbot, a tool that automates the process of setting up SSL certificates to generate and renew Let’s Encrypt SSL certificates.
sudo apt install apache2 certbot python3-certbot-apache -y
Webmin Ubuntu Apache Certbot 1

Start and enable the apache service.

sudo systemctl start apache2
sudo systemctl enable apache2

Check the status of the apache service.

sudo systemctl status apache2
Webmin Ubuntu Apache Status

The best way to check whether the apache service is up and running is to request a web page from the server by visiting the server’s IP address in your web browser.

You will see the Apache2 Ubuntu Default Page, as shown below, signifying that the apache2 service is up and running successfully.

Webmin Ubuntu Apache Default Page

Tip: you can also learn how to configure Apache and PHP for a high traffic site.

Next up is configuring a hostname for our Webmin server. A hostname is a human-readable name used to identify a device on a network.

  1. Navigate back to the web browser where you accessed the Webmin web interface earlier.
  2. Select “Networking -> “Network Configuration -> Hostname and DNS Client.”
Webmin Ubuntu Configure Hostname 3
  1. On the next page, enter the FQDN of your server in the “Hostname” field. FQDN stands for Fully Qualified Domain Name, the complete domain name of a device. Keep other settings as is and click “Save” to save the configuration.
Webmin Ubuntu Configure Fqdn 3
  1. Still on the Webmin web interface, click on “Webmin  -> Webmin Configuration -> SSL Encryption.”
Webmin Ubuntu Configure Ssl 3
  1. Select the Let’s Encrypt tab and configure the following:
  • Hostnames for certificate: enter the FQDN of your Webmin server. This is the same hostname that we configured earlier.
  • Website root directory for validation file: select the “Other directory” option and enter “/var/www/html” in the input field. This is the root directory of our Apache web server.
  • Months between automatic renewal: enter 1 in the input field, which will cause the SSL certificate to be automatically renewed one month before it expires.

Keep other settings as is and click “Request Certificate” to generate the SSL certificate from Let’s Encrypt.

Webmin Ubuntu Generate Ssl 3

You will see a message that says the certificate has been successfully generated as shown.

Webmin Ubuntu Generate Ssl Success
  1. Now that the SSL certificate has been generated, we will test it to make sure it is working properly. On a new browser tab, visit the URL https://your_server_ip:10000. You will see the same Webmin login page as before, but this time it will be served over a secure HTTPS connection.

You can also check the secure connection of the SSL certificate by clicking on the lock icon next to the URL as shown.

Webmin Ubuntu Generate Ssl Secure

Create a New User With Webmin

One of the most basic tasks that an admin needs to do is create new user accounts. With Webmin, this can be easily accomplished from the web interface.

By default, only the root user has administrative privileges on Ubuntu, so only the root user can install new software, create new users, and modify system settings.

It is considered best practice to avoid using the root user for daily tasks. Instead, create a new user with sudo privileges and use that account for your daily tasks.

  1. Navigate to “System -> Users and Groups -> Create a new user.”
Webmin Ubuntu Crate New User
  1. Configure the following basic settings for the user account:
  • Username: enter a username for the new user. You can enter any name you want, but it must not be the same as any existing username. The name should be 1 to 32 characters long and can only contain letters, numbers, periods (.), underscores (_), and dashes (-).
  • Real name: optionally, enter the user’s real name, which can be useful for identifying the user later on.
Webmin Ubuntu Create New User 1
  1. Click “Create” at the bottom to create the user.
Webmin Ubuntu Create New User 02

Once the user has been created, you will see your newly-created user in the list of users, as shown below.

Webmin Ubuntu List New User

Install a New Package in Webmin

Another important task performed using Webmin is installing a new software package on your system. The web UI helps you find, install, and remove software packages on your system with ease.

  1. Navigate to “System -> Software Packages.”
  2. In the “Package from APT” field, type in the name of the package you want to install in the search box and click on “Install.” In this case, we are installing the “net-tools” package.
Webmin Ubuntu Install Package
  1. On the next screen, click “Install Now” to confirm the installation.
Webmin Ubuntu Install Package Confirm

Once the package is installed, you will see an output similar to the one below.

Webmin Ubuntu Install Package Success

Frequently Asked Questions

What should I do if I have lost my root password and cannot log in to the server?

You can easily reset your root password with the command: /usr/libexec/webmin/changepass.pl /etc/webmin admin password123

This command changes the password for the admin user to “password123.” Replace “admin” with your actual root username.

Why do I still get the « not secure warning » in my browser when I try to access Webmin after configuring SSL?

Ensure that you go to in your browser and not http://your_domain:10000. The extra “s” in https is important, as it tells the browser to use a secure connection.

How can I uninstall Webmin from my server?

To uninstall Webmin, run the command /etc/webmin/uninstall.sh to remove all traces of Webmin from your server.

Image credit: Webmin. All screenshots by Nicholas Xuan Nguyen.

Nicholas Xuan Nguyen
Nicholas Xuan Nguyen

I am a big fan of Linux and open source software. I have been using Linux for over a decade and I absolutely love it. I am also a big fan of writing. In my spare time, I enjoy reading, playing video games.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox