Choose a different version or distribution
Before we begin talking about how to install Webmin on Ubuntu 20.04, let's briefly understand – What is Webmin?
Webmin is a powerful web-based system administration tool that simplifies the management of Linux servers. It provides a user-friendly interface to configure and control various aspects of the server, including network settings, user accounts, file systems, and more.
With Webmin, even users without advanced technical knowledge can easily perform essential administrative tasks. It supports multiple modules and plugins, allowing customization and integration with other software. Webmin is an indispensable tool for efficiently managing Linux servers, enhancing productivity, and ensuring smooth server operation.
In this tutorial, you will install and set up Webmin on your server and secure access to the user interface with a legitimate Let's Encrypt certificate. We will also address a few FAQs to install Webmin on Ubuntu 20.04.
Advantages of Webmin
- User-Friendly Interface: Webmin offers an intuitive web-based interface, making server management tasks accessible to users without extensive technical expertise.
- Comprehensive Server Control: It allows easy configuration and control of various server aspects, such as network settings, user accounts, and file systems.
- Time and Effort Savings: Webmin simplifies complex administrative tasks, saving valuable time and effort for system administrators.
- Customization and Integration: With support for modules and plugins, Webmin can be customized and integrated with other software to meet specific server management needs.
- Cross-Platform Compatibility: Webmin is compatible with various Linux distributions, making it a versatile tool for server administration across different environments.
Prerequisites to Install Webmin on Ubuntu 20.04
Before we begin, you will need the following:
- An Ubuntu 20.04 server is required.
- Apache installed by following the guide on How To Install the Apache Web Server on Ubuntu 20.04.
- A Fully-Qualified Domain Name (FQDN) that includes a DNS A record referring to your server's IP address.
Step 1 – Installing Webmin
First, if you haven't done so already, update your server's package index:
sudo apt update
The Webmin repository has to be added next so that we can use our package manager to install and update Webmin. This is achieved by including the repository in the
Open the file in the editor of your choice. In this instance, we will use
sudo nano /etc/apt/sources.list
Then, to add the new repository, add the following line to the bottom of the file:
. . .
deb http://download.webmin.com/download/repository sarge contrib
Save the document, then close the editor. If you used
nano, exit by pressing
The Webmin PGP key will then be added so that your system can trust the new repository. However, you need to install the
gnupg1 package, which is GNU's tool for secure data storage and communication, in order to achieve that.
After that, use
wget to download the Webmin PGP key and add it to the list of keys on your system:
wget -q -O- http://www.webmin.com/jcameron-key.asc | sudo apt-key add
Then, add the newly-trusted Webmin repository to the updated list of packages:
sudo apt update
Install Webmin next:
sudo apt install webmin
After the installation is complete, you will see the following output:
. . .
Webmin install complete. You can now login to
https://your_server:10000 as root with your
root password, or as any user who can use sudo.
Note: To allow Webmin past the firewall, you must run the following command if you installed and activated
ufw during the prerequisite step:
sudo ufw allow 10000
You might wish to set up your firewall so that only specific IP ranges are permitted access to this port for added security.
By adding a valid certificate, let us secure access to Webmin.
Step 2 – Using Let's Encrypt to Add a Valid Certificate
Although Webmin already has HTTPS enabled, it does so with a self-signed, untrusted certificate. Let us substitute it with a Let's Encrypt certificate.
Use your web browser to go to
your_domain with the domain name that points to your server's IP address.
A login screen will be shown to you. Use the non-root user you made while completing the requirements for this tutorial to log in.
The Webmin dashboard will be the first screen you see after logging in. The hostname of the server must be established before you can apply a valid certificate. As seen in the following figure, locate the System hostname field and click the link to the right.
By doing so, you will be directed to the Hostname and DNS Client page. Find the Hostname field and fill it with your Fully-Qualified Domain Name. To apply the setting, click the Save button at the bottom of the page.
After you have chosen your hostname, select Webmin Configuration from the Webmin dropdown menu in the left navigation bar.
Choose SSL Encryption from the list of icons on the Webmin Configuration page, and then select the Let's Encrypt tab.
You will instruct Webmin on how to obtain and renew your certificate on this page. Let's Encrypt certificates expire after three months, however, you can tell Webmin to try to renew the certificate automatically every month. We will set Webmin to place the verification file inside the folder
/var/www/your_domain. For certificate setup, follow these steps:
- Enter your FQDN in the Hostnames for certificate field.
- Select the Other Directory button and type the document root of your website when prompted for the Website root directory for the validation file. This will be
/var/www/your_domain, assuming you followed the mandatory Apache tutorial.
- Deselect the Only renew manually option in the Months between automatic renewal section by typing
1into the input box and selecting the radio button to the left of the input box.
Select the Request Certificate button. You will receive a confirmation page a few seconds later.
Click the Return to Webmin configuration button on the confirmation screen to begin using the new certificate. Scroll down and click the Restart Webmin option on that page. Wait around 30 seconds, then reload the website and log in again. Your browser should now display that the certificate is genuine.
Step 3 – Using Webmin
Now that you have established a secured working instance of Webmin. Let’s understand how it works.
The numerous modules available in Webmin can manage anything from the BIND DNS Server to adding users to the system. Let us start by learning how to create a new user before moving on to explore how to update your system’s packages using Webmin.
Managing Users and Groups
Let us look at how you may manage the users and groups on your server.
Click the Users and Groups link after selecting System from the left-sidebar dropdown menu. You may manage and add users and groups from here.
Let us create a new user named deploy so that you can use to host web applications. You can specify parameters for the user's shell, password expiry, and whether they are permitted to have a home directory when creating a user.
Click Create a new user at the top of the users table to add a new user. The Create User screen appears, allowing you to enter the username, password, groups, and other details. To create the user, adhere to the following instructions:
- Enter the Username with
- User ID should be set to Automatic.
- Add a descriptive name, like
Deployment userin the Real Name field.
- Select Automatic for Home Directory.
/bin/bashfrom the dropdown list for Shell.
- Select Normal Password under Password, then enter your preferred password.
- Select a New group with the same name as the user under Primary Group from the drop-down menu.
- Choose sudo from the All groups list for Secondary Group. If it is not automatically added to the In groups list, click the → button to add it.
Press Create when you have made your selections. It will create the deploy user in short order.
Let us explore how to update our system.
Webmin allows you to update all of your packages through its user interface. To update all of your packages, first, locate the Package updates field by clicking the Dashboard icon above the left-hand sidebar. If updates are available, you will notice a link with the number of updates listed.
To begin the update, click this link and then select Update selected packages. The server may need to be restarted, which you may easily do using the Webmin interface.
FAQs to Install Webmin on Ubuntu 20.04
Can I install Webmin on other Ubuntu versions?
Yes, Webmin can be installed on various Ubuntu versions, including 20.04, 18.04, and others. The installation steps may vary slightly, so it's recommended to refer to the official documentation for specific instructions.
How do I access Webmin after installation?
After installation, you can access Webmin by opening a web browser and entering
your-server-ip with the IP address of your Ubuntu server.
What are the default login credentials for Webmin?
You can log in to Webmin using the root user or any user with sudo privileges on your Ubuntu server. Enter the corresponding username and password to access the Webmin interface.
How can I secure my Webmin installation?
To enhance security, it is recommended to configure Webmin to use SSL/TLS encryption. You can follow the instructions in the Webmin documentation to generate and install an SSL certificate for secure access.
Can I manage multiple servers with Webmin?
Yes, Webmin supports managing multiple servers from a single interface. You can add additional servers in the
Webmin Configuration section and provide the necessary credentials to manage them.
Can I uninstall Webmin if needed?
Yes, you can uninstall Webmin by running
sudo apt remove webmin. Additionally, you can remove its configuration files using
sudo apt purge webmin.
Where can I find more information and documentation about Webmin?
You can find detailed information, documentation, and community support for Webmin on the official Webmin website at www.webmin.com.
Now you have a secure working instance of Webmin and you have used the interface to create a user and update packages. Many items that you would typically need to access through the console are now available through Webmin, and they are arranged in an intuitive manner. For instance, if Apache was installed, the configuration tab for it would be located under Servers, followed by Apache.
Learn more about managing your system with Webmin by navigating the interface or reading the Official Webmin Wiki.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them.