How to Install and Use Webmin on Ubuntu 24.04


Webmin is an open-source web-based application used to access and manage Linux servers from the web browser. It allows you to manage multiple servers, its users, memory, services, and applications like Apache, NGINX, PHP, and MySQL. In this guide, I will be exploring how to install and configure Webmin on a Linux server specifically Ubuntu, and how to make it accessible for remote machines.

Compatibility

  • Webmin is designed to manage any Unix-like server such as Linux; currently not available for Windows.
  • Webmin can be accessed from all modern web browsers.

 

Prerequisites

  • Ubuntu Server
  • User with sudo privileges
  • Apache or NGINX installed
  • A fully registered domain accessible from the internet with DNS A record

 

Installing Webmin on Ubuntu

To install Webmin on Ubuntu 24.04 Noble Numbat, follow the steps given below:

1. Download the setup-repos script.

sudo curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh

2. Run the setup-repos script.

sudo sh setup-repos.sh

The setup-repos script detects the operating system, downloads the GPG key using the respective package manager, and sets up the Webmin repository.

3. Install the Webmin.

sudo apt install --install-recommends webmin

Now, Webmin has successfully installed on Ubuntu.

4. Verify the Webmin status.

systemctl status webmin.service

The Webmin service is running without any errors.

 

Accessing Webmin

To access Webmin on a remote machine you have to allow port 10000 through the UFW firewall.

sudo ufw allow 10000

Now access the Webmin from a web browser using the server’s IP and 10000 port.

https://server:10000

The server IP can be obtained by running ifconfig or ip a commands.

Enter the username of the Ubuntu server and password to access the Webmin dashboard.

Note: While accessing Webmin from a web browser you will get a warning depending upon the browser saying security risk. The reason for this is that Webmin is equipped with a self-signed SSL certificate, which is the default certificate used by the Webmin application to establish secure connections. Browsers like Firefox, Chromium, Falkon, and Safari allow you to skip the warning and proceed with the Webmin login screen. After logging in, you can secure the Webmin by replacing the SSL certificate with a trusted one.

 

Securing the Webmin

Securing your Webmin server is crucial since it comes with a self-signed certificate. This certificate does not securely encrypt the communication between the Webmin server and your browser, leaving it exposed to hackers. In order to safeguard key information such as login credentials, it is crucial to have an SSL certificate for Webmin communication. Without it, hackers can easily intercept and steal your important data.

Note: Setting up SSL using Let’s Encrypt requires your server to be publicly accessible on port 80 for the certificate issuance and renewal process.

Let’s see how to set up the SSL for Webmin.

1. On the main dashboard find the System Hostname option and click on the hostname to set the hostname.

2. In the Hostname field, type the fully qualified domain name (FQDN) and click on the Save button.

3. Click on the Webmin and then Webmin Configuration.

Find the SSL Encryption option from the menu and click on it.

4. In the SSL Encryption option, click on the Let’s Encrypt tab. Fill in the Hostnames for the certificate field, and set the directory of the root folder. Finally, click on the Request Certificate.

After a few seconds, the SSL certificate will be generated. To use the new certification, restart the Webmin.

 

Using Webmin

Webmin makes it quite easy to manage Linux servers from a remote machine, thanks to a user-friendly graphical user interface. In this section, I will highlight some key server management features using Webmin.

Adding Users

1. To add a user, in the sidebar menu click on the System option and then on Users and Groups.

As you can see in the screenshot all the users including normal users and system users are listed.

2. Click Create a new user option, it will open a Create User page.

3. Fill in the fields of Username, Real name, and Password.

You can change other options according to requirements, such as user group, password expiry, and home directory.

4. Now, click on Create to add a new user.

A new user will be added.

Removing Users

1. To remove users, navigate to the System and then Users and Groups in the sidebar menu.

2. A user’s list will open, find the user, and click on the checkbox to select it.

3. Click on Delete Selected Users.

4. A confirmation option will open, click Delete Users and Home Directory.

Installing a Software Package

1. In the sidebar menu, click on System and then Software Packages.

2. Click Install a new package tab.

3. Check the Package from APT, and then type the package name in the textbox.

4. Proceed by clicking on the Install button to initialize the package installation process.

5. A screen with a confirmation prompt appears listing the package and its dependencies, click on Install Now.

Removing a Software Package

1. Click on System and then Software Packages in the sidebar menu.

2. In the Installed packages tab, type the package name in the Search for Package option and press Enter.

3. The Vim package and its dependencies will be listed. Click Select all, and then

Uninstall selected packages.

4. A prompt screen will appear, click on Delete them all.

Updating Software Packages

1. To update the packages, navigate to the System and then Software Package Updates.

2. A list of packages will appear that need to be updated. Click on Update selected packages.

Managing Repositories

1. To manage repositories, navigate to the System and then Software Package Updates.

2. Click on the Package Repositories tab.

3. Here you can enable, disable, and delete the repositories.

Changing Password

1. In the sidebar menu, click on System and then Change Passwords.

2. A list of all users will appear, click on the user.

3. Enter your password into both the New password and Repeat password fields, and then click on the Change button to confirm the password change.

A prompt screen will appear saying the password for user <username> has been changed.

Using Terminal

1. To use the terminal from the Webmin, interface, click on Tools and then on Terminal.

2. A terminal window will appear, where commands can be executed.

 

Installing Webmin Modules

Webmin offers many plugins and extensions to enhance basic functionality, called modules.

To install a Webmin module, see the following steps.

1. Visit the third-party modules site from the browser and choose a module.

2. Right-click on the module and copy the link address.

3. Go to Webmin, and then Webmin Configuration in the sidebar menu.

4. Click on Webmin Modules option.

5. Check and paste the copied link address in From HTTP or FTP URL and click on Install Module.

Or click on the World icon next to Third party module from option, and a list of all modules will appear. Select the module and click on Install Module.

 

Blocking Network to Access Webmin

To block a network or IP address to access the Webmin server, see the steps given below:

1. Open the Webmin configuration file.

sudo nano /etc/webmin/miniserv.conf

2. Type the deny= and IP address that you want to block.

3. To ensure that the recent changes are applied successfully restart the Webmin.

/etc/webmin/restart

This step is essential to finalize the adjustments and ensure proper functionality moving forward.

You can also allow specific IP addresses by using allow= directive in the Webmin configuration file.

 

Uninstalling Webmin from Ubuntu

To remove the Webmin from the Ubuntu server see the following steps.

1. Open the terminal and execute the uninstall script.

sudo /etc/webmin/uninstall.sh

2. A confirmation prompt will appear; type y and press Enter.

The Webmin has been uninstalled from Ubuntu.

Webmin Tips and Tricks

Some important tips for using Webmin are mentioned below:

1. To change the default port used by Webmin, locate, and open the Webmin configuration file in the Nano editor. Accessing and editing this configuration file allows you to specify a new port number according to your preferences or security requirements.

sudo nano /etc/webmin/miniserv/conf

Find port=10000 and change it to some other port address.

Execute the command given below to reload the Webmin services and apply the modifications made in the configuration file.

/etc/webmin/restart

2. You can also change the default theme of the Webmin user interface. Click on Webmin option, then on Change Language and Theme from the sidebar.

Check the personal choice and select the theme from the drop-down menu.

3. You can also upgrade the Webmin right from its dashboard. Go to Webmin Configuration, find the Upgrade Webmin option, and click on it. On the next screen, click on Upgrade Webmin button.

Conclusion

Webmin is a web-based tool used to access and manage Unix-like servers. It makes it easy to manage servers by eliminating the use of terminal commands. It can be installed on Ubuntu by adding its repository. To access it from a web browser, allow the default Webmin port from the UFW firewall.

Print Friendly, PDF & Email
Categories