How to install Webmin on Ubuntu 20.04 simple and detailed

by xthemes content creator
13 minutes read

Webmin is a control panel that helps you manage your Linux server through a web browser-like interface. With Webmin you can manage user accounts, configure DNS settings and change and update packages on the fly. The following xthemes article will guide you how to install Webmin on Ubuntu 20.04 quickly.


In this article, you will be guided to install and configure Webmin on your server and secure the application using an SSL certificate provided by Webmin. Let’s encrypt. Then add new user accounts and update packages on the server.

To follow the tutorial, you must meet the following requirements:

  • Ubuntu 20.04 server with user account not roots and authorized sudoenable the UFW firewall.
  • Apache is already installed on that server.
  • A registered domain name (Fully-Qualified Domain Name) that points to your server’s IP address.

If you have prepared the above requirements, you are ready to do the following steps in the tutorial.

In addition, if you think the setup process below is too complicated, you can refer to the VPS service at xthemes. When registering to rent a VPS with xthemes, you will be given a free license for the genuine Linux system administration software DirectAdmin during use.

At xthemes, you will be supported by a professional, enthusiastic, 24/7 technical team that will provide installation support or explain any issues related to DirectAdmin.

Buy a high-speed VPS get DirectAdmin for free
Buy a high-speed VPS get DirectAdmin for free

Currently, xthemes provides many high-speed VPS packages that support different operating systems with many different configurations and costs, making it easy for you to choose the right service package for your needs such as: Cheap VPS, VPS Standard, Premium VPS, GPU VPS and NVMe VPS.

Quickly contact xthemes today for a detailed VPS package consultation!

Step 1: Install Webmin

First, you need to update the packages manager on your machine using the following command, to make sure you always have the latest versions:

Then add the Webmin repository to your system’s package manager to install and update it. To do this, you need to add that archive to the file /etc/apt/sources.list.

Please open the above file with any text editor, it will be used here nano:

sudo nano /etc/apt/sources.list

Next, add the following command to the end of the file to add the Webmin repository:

. . . 
deb sarge contrib

When done, save and close the file. If you are using nanopress CTRL+Xthen press Y and press ENTER.

Next, the user needs to add a Webmin PGP key in order for your system to accept and trust the new repository. To do this, you need to install the package gnupg1 is a GNU tool to communicate and store data securely.

Next, download the Webmin PGP key to your computer using wget and add that key to the list of system keys as follows:

wget -q -O- | sudo apt-key add

Next, update the packages list again to get more trusted Webmin repositories:

Then you proceed to install Webmin as follows:

If the installation is successful, you will get 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.

Remember: If you have installed and turned on the firewall ufw In the condition section, you will need to run the following additional command to allow Webmin to pass through the firewall:

In addition, to be more secure, you can also configure the firewall to only allow access to this port from a specified range of IPs. In the next step, you will proceed with adding the SSL certificate to ensure secure access to the Webmin server.

VPS NVMe Single Post

NVME VPS high-speed service program launch

Step 2: Add a valid certificate using Let’s Encrypt

Although Webmin is configured to use HTTPS by default, this is only a self-signed certificate, which is not secure and you will have difficulty deploying your application using the certificate. it’s just self-grant. So you do that replacement with a valid certificate issued by Let’s encrypt.

First, go to in your browser, remember to change with a domain name pointing to the IP address of the machine you previously registered.

Remember: When you log in for the first time, you will see a warning line that says “Invalid SSL”. This message may vary depending on the browser you are using, but the message that appears is because the server is currently using a self-issued certificate. To allow access, select Allow exception.

After entering the website, you will see a login screen. Please enter with the user account not roots on your machine.

Once logged in, the first page you will see is the Webmin dashboard. Before setting up a new SSL certificate, you need to set up a name hostname for your server.

Please find the school system hostname and click on the correct path as shown below:

Webmin dashboard
Webmin dashboard

The link will take you to the page Hostname and DNS Client. Please find the school Hostname and enter your domain name there, then press . button Save in the lower left corner of the page to apply the change.

Once you have the hostname, click the Webmin dropdown menu on the left side of the navigation bar, then click Webmin configuration.

From the page Webmin configurationn, please choose SSL Encryption from the list of icons, and select the tab Let’s encrypt. At this point, you will arrive at a page like the one below:

Webmin SSL Encryption
Webmin SSL Encryption

This page is where you can obtain and renew the SSL certificate for your server. Certificate of Let’s encrypt will expire after 3 months, however, it allows you to specify Webmin to automatically refresh or obtain a new certificate every month. Let’s encrypt works by looking for the authentication file in the server directory, so you can configure Webmin to place that authentication file inside the server directory. /var/www/your_domain – is the directory where the Apache server is configured under the Requirements section.

Follow these steps to renew the SSL certificate for the server:

  1. First, enter your domain name Hostnames for the certificate.
  2. Then on Website root directory for the authentication fileplease press that button Other Directories and enter the root directory of your website, in this tutorial it is /var/www/your_domain.
  3. Next, the item is included Months between automatic renewalsplease uncheck Renew manually by entering 1 in the input box, and then select the radio button to the left of the input box.
  4. Finally, press the button Request a Certificate. After a few seconds, you will see a confirmation screen.

To use this new certificate, press . button Return to Webmin Configuration on the confirmation screen. From this page, please scroll down and press . button Restart Webmin. You need to wait about 30 seconds and then reload and login to your site again. If everything is configured successfully, your browser will indicate that this is a valid SSL certificate.

Step 3: Use Webmin

At this point, you have successfully set up the security step for your Webmin server. By taking advantage of that security layer, along with Webmin’s support modules for adding users to the system like BIND DNS Server, in the last step of this tutorial you will add new users to the system and update system packages.

Manage users and groups

First, click on the dropdown menu System in the sidebar on the left side and click the link Users and Groups. From here, you can add and manage users and groups on the server.

You start by adding a new user named deploy – the user you will use to host your website. During the user creation process, you can set options such as password duration, user shell, and whether to allow the user to have a home directory.

Please click Create a new user at the top of the users table. Then the screen Create User will appear, where you enter your username, password, group, and other options. To continue tracking, create a user with guided options as follows:

  1. Fill deploy go to Username.
  2. Choose Automatic give User ID.
  3. Enter a name with meaning Deployment user come in real name.
  4. Choose Automatic give Home Directory.
  5. Choose /bin/bash from the dropdown on shell.
  6. Choose Normal Password and enter your desired password for the item Password.
  7. LIVE Primary Groupyou choose New group with the same name as the user.
  8. LIVE Second Groupselect sudo from the list All groups. Then press the button -> to add if not automatically added to the list In groups.

After completing the above options, press Create to create a user.

At this point the user creation is complete. Next, you will go to update the package for the system.

Update packages

Webmin allows you to update all packages through its interface. To update, first press . button Dashboard at the top of the left sidebar, then find the field Package updates. You will see a link indicating the number of updates available here, if there are packages that need to be updated.

Click on the link above and hit Update the selected packages to start the update. You need to restart your server, this can be done through the Webmin interface.

After 10 years of operation, xthemes is ​​currently one of the top quality and reputable high-speed VPS service providers in US. With constant investment in infrastructure and personnel to quickly meet the strict standards of the hosting market, VPS, etc. xthemes is ​​now trusted by more than 50,000+ domestic and foreign customers here. such as:, GTV, USwork , UBGroup, KINGFOOD,…

Last year 2022, xthemes was honored to receive the “Excellent USese Brand 2022” award, the “Excellent products and services” category.

Quickly contact xthemes for detailed advice on high-speed VPS service today!

  • Address: 265 Hong Lac, Ward 10, Tan Binh District, Ho Chi Minh City.
  • Hotlines: 1800 1093 – 07 088 44444
  • Email: [email protected]


You’re now done with a secure Webmin installation that helps manage your server, create users, and update packages. Webmin will help you access many things you normally do through the console and organize them in a friendly and easy-to-use interface. If you found the article interesting and useful, please share it with everyone.

banner hosting gif

Related Posts

Leave a Comment