{"id":7067,"date":"2025-01-05T10:22:04","date_gmt":"2025-01-05T10:22:04","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=7067"},"modified":"2025-05-15T15:28:00","modified_gmt":"2025-05-15T15:28:00","slug":"how-to-install-and-use-webmin-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/how-to-install-and-use-webmin-on-ubuntu-22-04\/","title":{"rendered":"Simple Guide &#8211; How to Install Webmin on Ubuntu 22.04 and How to Use it"},"content":{"rendered":"<p>Are you looking for a detailed tutorial on how to install Webmin on Ubuntu 22.04? You're in the right place!<\/p>\n<p>Webmin is a free and open-source <a href=\"https:\/\/www.ssdnodes.com\/blog\/tools-to-manage-multiple-linux-servers-free\/\">web-based control panel<\/a> that allows you to manage your Linux server from the browser. The web interface Webmin provides is a flexible modern dashboard with dozens of options to manage the internal configurations of your Linux server, such as user accounts, disk quotas, DNS, package settings, services, web servers, and much more. If you use a <a href=\"https:\/\/www.ssdnodes.com\/blog\/installing-lamp-on-ubuntu-22-04-lts-jammy-jellyfish\/\">LAMP stack<\/a> on your server, you can use Webmin to configure your Apache web server, MySQL server, PHP applications, as well as other technologies such as PostgreSQL database servers and Python. Webmin can be used to manage your server remotely from any browser.<\/p>\n<p>In this tutorial, we'll install Webmin on an Ubuntu 22.04 server, and use it to perform basic system administration tasks such as monitoring the system, adding new users with different permissions, installing, updating and upgrading packages, as well as running software on your server, in addition to executing commands.<\/p>\n<p><strong>Note:<\/strong> This tutorial is for Ubuntu 22.04, if you are working with Ubuntu 24.04, please check out our <a href=\"https:\/\/www.ssdnodes.com\/blog\/install-webmin-on-ubuntu-24-04-and-use-it\/\">How to Install Webmin on Ubuntu 24.04<\/a> guide.<\/p>\n<h2>Prerequisites for Installing Webmin on Ubuntu<\/h2>\n<ul>\n<li>An Ubuntu 22.04 server with root access or a <code>sudo<\/code> user. If you haven't noticed, we offer extremely powerful <a href=\"https:\/\/www.ssdnodes.com\/blog\/cheap-linux-vps-comparison-report\/\">Linux servers<\/a> at the globe's absolute lowest price. Take a look at our <a href=\"https:\/\/www.ssdnodes.com\" target=\"_blank\" rel=\"noopener\">offerings<\/a>\u00a0and prepare for your mind to be blown \ud83e\udd2f.<\/li>\n<li>Access your sever via SSH, check out\u00a0<a href=\"https:\/\/www.ssdnodes.com\/blog\/tutorial-setting-up-and-securing-ssh-based-authentication\/\">How to access your server using SSH<\/a> for instructions.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> If you want to skip all the technical steps of setting up Webmin and have it installed in minutes, you can use our tried and tested <strong>1-click<\/strong> Webmin application. Just choose a <a href=\"https:\/\/www.ssdnodes.com\/\">server<\/a>, click <strong>Customize Your Own Server<\/strong>, under <strong>Select Server Image <\/strong>go to the <strong>Apps<\/strong> tab, then choose <strong>Webmin<\/strong>. This will set up Webmin in minutes!<\/p>\n<h2>Step 1: Update the Package Cache<\/h2>\n<p>Start by updating the packages in the package manager cache to the latest available versions using the following command:<\/p>\n<pre><code>sudo apt update<\/code><\/pre>\n<h2>Step 2: Install Webmin on Ubuntu 22.04<\/h2>\n<p>To install the Webmin control panel on Ubuntu 22.04, you'll need to add the Webmin repository that will enable you to install the Webmin packages and update them with <code>apt<\/code>. To make sure this new repository is trusted and that it is indeed the one Webmin developers provide, you'll download a <em>PGP signature<\/em>\u2014a digital signature that is used to verify packages that are downloaded from the Internet.<\/p>\n<p>Use the following command to get the PGP key provided by the Webmin developers to verify the package's authenticity, and then use the <code>gpg<\/code> command line tool to convert it to a file that <code>apt<\/code> can use:<\/p>\n<pre><code>wget -qO- https:\/\/download.webmin.com\/jcameron-key.asc | sudo gpg --dearmor -o \/usr\/share\/keyrings\/webmin.gpg<\/code><\/pre>\n<p>Here, you use the <code>wget<\/code> tool to get Webmin\u2019s PGP key, and then you pass the output to the <code>gpg<\/code> command line tool to unpack the input and save it to the <code>\/usr\/share\/keyrings\/<\/code> path.<\/p>\n<p>You can now add the Webmin repository with this key. Open the <code>\/etc\/apt\/sources.list<\/code> file:<\/p>\n<pre><code>sudo nano \/etc\/apt\/sources.list<\/code><\/pre>\n<p>Add the Webmin repository at the end of the file:<\/p>\n<pre><code>deb [signed-by=\/usr\/share\/keyrings\/webmin.gpg] http:\/\/download.webmin.com\/download\/repository sarge contrib<\/code><\/pre>\n<p>Exit the file with <code>CTRL+X<\/code>, then press <code>Y<\/code> and <code>ENTER<\/code> to save the changes.<\/p>\n<p>Update your package index with the newly added Webmin repository:<\/p>\n<pre><code>sudo apt update<\/code><\/pre>\n<p>Once the update finishes, you can install Webmin using the following command:<\/p>\n<pre><code>sudo apt install webmin<\/code><\/pre>\n<p>Once the installation finishes, check that the <code>webmin<\/code> service is running properly using the following command:<\/p>\n<pre><code>sudo systemctl status webmin<\/code><\/pre>\n<p>You should receive an output similar to the following:<\/p>\n<pre><code>\u25cf webmin.service - Webmin server daemon\r\n     Loaded: loaded (\/lib\/systemd\/system\/webmin.service; enabled; vendor preset: enabled)\r\n     Active: active (running) since Sun 2025-01-28 17:23:29 UTC; 53s ago\r\n    Process: 7432 ExecStart=\/usr\/share\/webmin\/miniserv.pl \/etc\/webmin\/miniserv.conf (code=ex&gt;\r\n   Main PID: 7433 (miniserv.pl)\r\n      Tasks: 1 (limit: 19072)\r\n     Memory: 28.8M\r\n        CPU: 638ms\r\n     CGroup: \/system.slice\/webmin.service\r\n             \u2514\u25007433 \/usr\/bin\/perl \/usr\/share\/webmin\/miniserv.pl \/etc\/webmin\/miniserv.conf\r\n\r\nAug 28 17:23:27 lamptest systemd[1]: Starting Webmin server daemon...\r\nAug 28 17:23:27 lamptest perl[7432]: pam_unix(webmin:auth): authentication failure; logname=&gt;\r\nAug 28 17:23:29 lamptest webmin[7432]: Webmin starting\r\nAug 28 17:23:29 lamptest systemd[1]: Started Webmin server daemon.<\/code><\/pre>\n<p><strong>Note:<\/strong> Webmin is accessible via TCP port <code>10000<\/code>. If you have a firewall enabled on your system, you need to allow Webmin's port through the firewall, so that it can be accessed remotely:<\/p>\n<pre><code>sudo ufw allow 10000<\/code><\/pre>\n<p><strong><em>Warning:<\/em> You should be extremely careful with your security practices. It is best to allow only a few trusted IP addresses or IP ranges to access your Webmin control panel. Additionally, make sure to always assign strong passwords for your Unix users, and restrict their permissions. Webmin is a powerful tool, and anyone who gains access to it will have total control over your system.<\/strong><\/p>\n<h2>Step 3: Access Webmin<\/h2>\n<p>With the Webmin package installed, use your browser to visit the following URL, replacing <code>your_ip_address_or_domain<\/code> with your server's IP address or domain name:<\/p>\n<pre><code>https:\/\/<mark>your_ip_address_or_domain<\/mark>:10000<\/code><\/pre>\n<p>If you haven't set up an SSL certificate from a Certificate Authority like Let's Encrypt, you will receive a <strong>\"Not Secure\"<\/strong> or <strong>\"Connection is not private\"<\/strong> error depending on your browser. This informs you that the connection to your server is not secure. This error message is normal because Webmin is encrypted and secured with a self-signed certificate, and the browser does not recognize it since your server is not one of its known certificate authorities.<\/p>\n<p>Click the <strong>Advanced<\/strong> button or <strong>More information<\/strong> depending on the browser, and choose to proceed. The following is an example of the error in the Google Chrome browser:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/06\/Securing-your-site-with-Self-Signed-or-CA-certificates_03.png\" alt=\"install webmin on ubuntu 22.04: connection not private\" width=\"864\" height=\"475\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/06\/Securing-your-site-with-Self-Signed-or-CA-certificates_04.png\" alt=\"install webmin on ubuntu 22.04: Proceed\" width=\"933\" height=\"634\" \/><\/p>\n<p>Once you proceed, you'll receive a login page similar to the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/09\/Webmin-Login.png\" alt=\"Webmin Login Dashboard on Ubuntu 22.04\" width=\"1599\" height=\"771\" \/><\/p>\n<p>Login using the Unix username and password you've set up on the server. Or you can use your server's root account.<\/p>\n<p>You'll be taken to the Webmin dashboard, which looks like so:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/09\/Webmin-Dashboard.png\" alt=\"install webmin on ubuntu 22.04: Webmin Dashboard\" width=\"1597\" height=\"773\" \/><\/p>\n<p>In this dashboard, you have system information, such as CPU, memory, and disk usage. Additionally, you have a menu with a list of options on the left side of the screen, which you can use to control your system's functionalities, such as system tools, networking, hardware, etc.<\/p>\n<h2>Step 4: Using Webmin to Perform Basic Sysadmin Tasks<\/h2>\n<p>Webmin has many modules you can use to control and configure your system. In this step you'll learn about a few of these modules and how to use them. You'll use Webmin to install and update packages, manage system users and groups, and manage Webmin users.<\/p>\n<h3>Installing Packages<\/h3>\n<p>To install a software package using Webmin, follow these steps:<\/p>\n<ol>\n<li>On the left-hand Webmin menu click <strong>System<\/strong> then <strong>Software Packages<\/strong>.<\/li>\n<li>Select the <strong>Package from APT<\/strong> radio button.<\/li>\n<li>Type in the package name you want to install, for example <code>nginx<\/code>, then click <strong>Install<\/strong>. You'll be taken to a page that asks you to confirm installing the package and it's dependencies, which will be listed in a table.<\/li>\n<li>Click <strong>Install Now<\/strong>.<\/li>\n<\/ol>\n<p>Webmin will download the package and install it on your system. You'll get detailed information on the installation process, and below it you'll see an <code>install complete<\/code> text informing you that the package was successfully installed.<\/p>\n<h3>Updating Packages<\/h3>\n<p>To update all your packages to the latest version using Webmin, follow these steps:<\/p>\n<ol>\n<li>On the left-hand menu click <strong>System<\/strong> then <strong>Software Package Updates<\/strong>. This page lists all the packages that need to be updated. You can check and uncheck packages to decide which ones you want to be updated.<\/li>\n<li>To update all packages, make sure they are all checked, then click <strong>Update Selected Packages<\/strong>. You'll be taken to a page with the complete list of the packages that will be updated.<\/li>\n<li>Click <strong>Install Now<\/strong>.<\/li>\n<\/ol>\n<p>The update will start, and once it finishes, you may be asked to reboot the system if any of the updated packages requires a system reboot. You can reboot your server with Webmin by clicking <strong>Reboot Now<\/strong>.<\/p>\n<h3>Managing Unix Users and Groups<\/h3>\n<p>A Unix user is your typical user that connects to your server with SSH or FTP, they own files and folders on your system, and they have their own home directory. In this section we will use Webmin to create a user on your server with a dedicated home directory, and we will also add them to the <code>sudo<\/code> group, so they can have <code>sudo<\/code> privileges. We'll call our user <code>example_user<\/code>, but feel free to choose another name.<\/p>\n<p>To create a system user on your server using Webmin, follow these steps:<\/p>\n<ol>\n<li>On the left-hand menu, click on <strong>System<\/strong> then <strong>Users and Groups<\/strong>. You'll be taken to the <strong>Users and Groups<\/strong> Webmin module, where you have a table for all the current system users under <strong>Local Users<\/strong> and a table for the current system groups under <strong>Local Groups<\/strong>.<\/li>\n<li>In the <strong>Local Users<\/strong> table, click <strong>Create a new user<\/strong>. This will take you to the <strong>Create User<\/strong> page.<\/li>\n<li>Type in <code>example_user<\/code> in the <strong>Username<\/strong> field.<\/li>\n<li>Select <strong>Automatic<\/strong> for the <strong>User ID<\/strong> field.<\/li>\n<li>Set the <strong>Real Name<\/strong> to the full name of the user or use a descriptive name such as <strong>Monitoring User<\/strong> or <strong>Updates User<\/strong>.<\/li>\n<li>Select <strong>Automatic<\/strong> for the <strong>Home Directory<\/strong> field.<\/li>\n<li>Set <strong>Shell<\/strong> to <code>bin\/bash<\/code>.<\/li>\n<li>Set <strong>Password<\/strong> to <strong>Normal password<\/strong> and type in a strong password for your user.<\/li>\n<li>In the <strong>Group Membership<\/strong> menu, select <strong>New group with same name as user<\/strong> for the <strong>Primary group<\/strong>.<\/li>\n<li>For the <strong>Secondary groups<\/strong>, click on <strong>sudo<\/strong> in the <strong>All groups<\/strong> list. It should be added automatically to the <strong>In groups<\/strong> list.<\/li>\n<li>Click <strong>Create<\/strong>.<\/li>\n<\/ol>\n<p>With this, you now have a new user called <code>example_user<\/code> on your system with <code>sudo<\/code> privileges.<\/p>\n<h3>Managing Webmin Users<\/h3>\n<p>In addition to creating a Unix user on your system, you can also grant other people access to Webmin by creating a <em>Webmin user account<\/em> for them. To restrict what the user can do with their account, you can select which Webmin modules the user can use. For example, you can create a user account with access to the <strong>Software Package Updates<\/strong> as the only module they can use. Moreover, you can restrict what each user can do within each module. For example, you can create a user that can only see the list of packages that need to be updated, or a user that can see the list of packages and be able to update them.<\/p>\n<p>To create a Webmin account, click <strong>Webmin<\/strong> on the left-hand menu, then click <strong>Webmin Users<\/strong>. You'll see that <code>root<\/code> is the only Webmin user in the <code>Webmin Users<\/code> table. This default <code>root<\/code> user can use every module and has total control over the system.<\/p>\n<p>Webmin allows you to create two different kinds of users, a safe user, and a privileged user. A safe user can have access to only safe modules, and a privileged user can be granted all privileges on the system.<\/p>\n<p>Before creating a Webmin user, you need to enable a function that prompts users with expired passwords to enter a new one. To do so, open the <strong>Webmin<\/strong> lefthand menu, then go to <strong>Webmin Configuration<\/strong>, click <strong>Authentication<\/strong>. In the <strong>Password expiry policy<\/strong>, select <strong>Prompt users with expired passwords to enter a new one<\/strong> then click <strong>Save<\/strong>.<\/p>\n<p>To create a Webmin account for a privileged user, follow these steps:<\/p>\n<ol>\n<li>Go to the <strong>Webmin<\/strong> menu on the left, then click on the <strong>Webmin Users<\/strong> module, click <strong>Create a new privileged user<\/strong>. You'll be taken to a page titled <strong>Create Webmin User<\/strong>.<\/li>\n<li>Set a username in the <strong>Username<\/strong> input field, and set a strong password of your choice for the Webmin user you are creating.<\/li>\n<li>Check the <strong>Force change at next login<\/strong> box. So that the user changes their password when logging in for the first time.<\/li>\n<li>Set the <strong>Real Name<\/strong> to the full name of the user or use a descriptive name such as <strong>Monitoring User<\/strong> or <strong>Updates User<\/strong>.<\/li>\n<li>For extra security, open the <strong>Security and limits options<\/strong> section, and set <strong>Inactivity logout time<\/strong> to 30 minutes to logout users after 30 minutes of inactivity, and set the <strong>Minimum password length<\/strong> to 15 letters. It is recommended to also select the <strong>Only allow from listed addresses<\/strong> option and enter a list of IP addresses to restrict access and allow only the IP address(es) of your Webmin user. You can also restrict access to certain days of the week and times of the day.<\/li>\n<li>In the <strong>Available Webmin modules<\/strong>, you can either click <strong>select all<\/strong> to allow the user to use all Webmin modules, or select only a few modules that you would like your Webmin user to use.<\/li>\n<li>Click <strong>Create<\/strong>. You'll be taken to the <strong>Webmin Users<\/strong> page where you can find a list of the current Webmin users.<\/li>\n<\/ol>\n<p>Sign out from Webmin by clicking the red logout icon at the bottom of the left-hand menu, then login using your new Webmin user account. You'll be prompted to change your password, so change it and login again. You'll be redirected to your Webmin dashboard.<\/p>\n<p>If you\u2019ve limited access to your new user, you'll see that the options in the left-hand menu are limited to the modules you've checked when creating your Webmin user.<\/p>\n<h3>Creating a Safe Webmin User Based on a Unix User<\/h3>\n<p>To create a Webmin account for a safe user, make sure you have a Linux user on your server, such as the <code>example_user<\/code> we've created earlier. Open the <strong>Webmin<\/strong> left-hand menu, then go to the <strong>Webmin Users<\/strong> module, and then click on <strong>Create a new safe user<\/strong>.<\/p>\n<p>Follow the same steps required for creating a privileged user, with the exception that the username should be the same as a user you already have on your system such as the user <code>example_user<\/code>. In the <strong>Available Webmin modules<\/strong>, you'll notice that the modules you can select are limited.<\/p>\n<p>Select the Webmin modules you'd like your safe Webmin user to have access to, and click <strong>Create<\/strong>. This should create a new safe Webmin user.<\/p>\n<p><strong>Warning: You must be very careful when granting access to Webmin users, you may accidentally allow a user to edit an arbitrary configuration file that grants them root privileges.<\/strong><\/p>\n<h2>Step 5: Adding a Valid CA SSL Certificate with Let\u2019s Encrypt<\/h2>\n<p>Webmin uses SSL encryption and the HTTPS protocol by default, but the certificate it uses to validate the server's identity is self-signed and untrusted by browsers. To solve this issue using Webmin, you can install a valid SSL certificate issued by <a href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\" rel=\"noopener\">Let\u2019s Encrypt<\/a>, a nonprofit Certificate Authority that provides free of charge, valid SSL certificates that are trusted by browsers.<\/p>\n<p><strong>Note:<\/strong> Let's Encrypt does not issue certificates for IP addresses, so you need to have a Fully-Qualified Domain Name (FQDN), with a DNS <strong>A<\/strong> record pointing to your server's IP address. In this section, we will use <code>example.com<\/code> as an example domain name, but you must use your own domain name.<\/p>\n<p>To install a Let's Encrypt certificate with Webmin you first need to set up your domain name using the following steps:<\/p>\n<ol>\n<li>On the left-hand menu, click <strong>Networking<\/strong>, then <strong>Network Configuration<\/strong>.<\/li>\n<li>Click on <strong>Hostname and DNS Client<\/strong>.<\/li>\n<li>Fill in the <strong>Hostname<\/strong> field with your domain, such as <code>example.com<\/code> or <code>www.example.com<\/code>.<\/li>\n<li>Click <strong>Save<\/strong><\/li>\n<\/ol>\n<p>After setting up your domain name, install a Let's Encrypt certificate by following these steps:<\/p>\n<ol>\n<li>Click <strong>Webmin<\/strong> in the left-hand menu, then <strong>Webmin Configuration<\/strong>.<\/li>\n<li>Click on <strong>SSL Encryption<\/strong>.<\/li>\n<li>Go to the <strong>Let\u2019s Encrypt<\/strong> tab.<\/li>\n<li>Type in your domain name in the <strong>Hostnames for certificate<\/strong> field.<\/li>\n<li>In the <strong>Website root directory for validation file<\/strong> field, select <strong>Apache virtual host matching hostname<\/strong> if you are using Apache, or select <strong>Other directory<\/strong> and type in your web root directory. This root directory is typically located at <code>\/var\/www\/example.com<\/code>. With <code>example.com<\/code> representing your domain name. It can also be located at <code>\/var\/www\/html<\/code>, which is a typical default path for web root directories.<\/li>\n<li>To automate the Let's Encrypt certificate renewal process, deselect the <strong>Only renew manually<\/strong> and select the radio button next to it, then type in <code>1<\/code> in the field to its right. This automatically attempts to renew the Let's Encrypt certificate each month.<\/li>\n<li>Click <strong>Request Certificate<\/strong>. You'll be moved to a page that displays information on the certificate request and configuration process.<\/li>\n<\/ol>\n<p>Once the certificate request and configuration process finishes, click <strong>Return to Webmin configuration<\/strong>. You'll be redirected back to the <strong>Webmin Configuration<\/strong> module. Scroll down to the bottom of the page, then click on the <strong>Restart Webmin<\/strong> button and wait for a few seconds while Webmin reboots, then refresh the page, and you'll see that the Let's Encrypt certificate is enabled, and the URL bar of the browser now has a secured padlock on its left. If you click on the padlock icon, you'll receive a <strong>Connection is secure<\/strong> pop-up.<\/p>\n<p>With this you now have a valid SSL certificate issued by Let's Encrypt.<\/p>\n<h2>(Optional) Step 6: Setting up Your SSL Certificate and Using it With Nginx and Apache<\/h2>\n<p><strong>Note:<\/strong> This section will be a brief description of how to use your SSL certificate with Nginx and Apache, and it assumes you have a basic understanding of how SSL certificates work and that you know how to modify your web server's configuration.<\/p>\n<p>To configure your web server to use your Let's Encrypt certificate. You first need to locate the <em>private key file<\/em> for your SSL certificate and <em>the certificate file<\/em>. These two files were configured by Webmin. To do so, follow these steps:<\/p>\n<ol>\n<li>Click <strong>Webmin<\/strong> in the left-hand menu, then <strong>Webmin Configuration<\/strong>.<\/li>\n<li>Click on <strong>SSL Encryption<\/strong>.<\/li>\n<\/ol>\n<p>You should see information on your SSL certificate, including the path of your <em>private key file<\/em> and the path of your <em>certificate file<\/em>, as highlighted in the following image:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2022\/09\/Webmin-SSL.png\" alt=\"Webmin SSL.png\" \/><\/p>\n<p>Here, you have the following paths:<\/p>\n<ul>\n<li>The private key file's path: Under <strong>Private key file<\/strong>, in this case, the path is <code>\/etc\/webmin\/letsencrypt-key.pem<\/code>.<\/li>\n<li>The certificate file's path: Under <strong>Certificate file<\/strong>, in this case, the path is <code>\/etc\/webmin\/letsencrypt-cert.pem<\/code>.<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> In the following instructions, make sure to set your paths properly in your web server's configuration.<\/p>\n<h3>Configuring Nginx to Use the Let's Encrypt Certificate<\/h3>\n<p>First, open your Nginx configuration file in your <code>\/etc\/nginx\/sites-enabled<\/code> directory, this could be the default configuration file, in which case you can open it using the following command:<\/p>\n<pre><code>sudo nano \/etc\/nginx\/sites-available\/default<\/code><\/pre>\n<p>Otherwise, if you have disabled the default configuration and configured Nginx for your domain, the following command should be used instead. Remember to replace <code>your_domain<\/code> with your domain name:<\/p>\n<pre><code>sudo nano \/etc\/nginx\/sites-available\/<mark>your_domain<\/mark><\/code><\/pre>\n<p>Change the values of the <code>ssl_certificate<\/code> and <code>ssl_certificate_key<\/code> directives, by setting <code>ssl_certificate<\/code> to the path of your <em>certificate file<\/em>, and <code>ssl_certificate_key<\/code> to the path of your <em>private key file<\/em>, like so:<\/p>\n<pre><code>server {\r\n   listen 80;\r\n   listen [::]:80;\r\n   server_name <mark>your_domain<\/mark>;\r\n   access_log off;\r\n   location \/ {\r\n         rewrite ^ https:\/\/$host$request_uri? permanent;\r\n   }\r\n}\r\n\r\nserver {\r\n    listen 443 ssl;\r\n    listen [::]:443 ssl;\r\n    server_name <mark>your_domain<\/mark>;\r\n    root \/var\/www\/<mark>your_domain<\/mark>;\r\n    index index.php index.html index.htm index.nginx-debian.html;\r\n    autoindex off;\r\n    ssl_certificate <mark>\/etc\/webmin\/letsencrypt-cert.pem<\/mark>;\r\n    ssl_certificate_key <mark>\/etc\/webmin\/letsencrypt-key.pem<\/mark>;\r\n    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;\r\n    ssl_ciphers HIGH:!aNULL:!MD5;\r\n\r\n    location ~ \\.php$ {\r\n         include snippets\/fastcgi-php.conf;\r\n         fastcgi_pass unix:\/var\/run\/php\/php-fpm.sock;\r\n         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n         include fastcgi_params;\r\n    }\r\n}<\/code><\/pre>\n<p>Save and close the file.<\/p>\n<p>In addition to setting the <code>ssl_certificate<\/code> and <code>ssl_certificate_key<\/code> directives. Remember to also change <code>your_domain<\/code> in the preceding configuration with your domain name, and make sure to set the value of the <code>root<\/code> directive to your web root directory.<\/p>\n<p>If you are using a custom configuration file, link it to the configuration file from NGINX\u2019s <code>sites-enabled<\/code> directory, if you haven't already:<\/p>\n<pre><code>sudo ln -s \/etc\/nginx\/sites-available\/<mark>your_domain<\/mark> \/etc\/nginx\/sites-enabled<\/code><\/pre>\n<p>To check that your configuration file has been properly linked to NGINX\u2019s <code>sites-enabled<\/code> directory, run the following command:<\/p>\n<pre><code>sudo ls -l \/etc\/nginx\/sites-enabled<\/code><\/pre>\n<p>You should have a line similar to the following as part of the output:<\/p>\n<pre><code>lrwxrwxrwx 1 root root 33 Aug  4 10:07 <mark>your_domain<\/mark> -&gt; \/etc\/nginx\/sites-available\/<mark>your_domain<\/mark><\/code><\/pre>\n<p>Next, check for syntax errors in your configuration files using the following command:<\/p>\n<pre><code>sudo nginx -t<\/code><\/pre>\n<p>The output should let you know that the configuration file test is successful.<br \/>\nNow, restart NGINX:<\/p>\n<pre><code>sudo systemctl restart nginx<\/code><\/pre>\n<p>Now visit your website\u2019s domain name or IP address using <code>https:\/\/<\/code> at the beginning:<\/p>\n<pre><code>https:\/\/<mark>your_domain_name<\/mark><\/code><\/pre>\n<p>Reload your browser and you will notice a secured padlock with a valid certificate.<\/p>\n<h3>Configuring Apache to Use the Let's Encrypt Certificate<\/h3>\n<p>To configure Apache to use the Let's Encrypt certificate you obtained using Webmin, first open your Apache configuration file, which is located by default at <code>\/etc\/apache2\/sites-enabled\/000-default.conf<\/code>:<\/p>\n<pre><code>sudo nano \/etc\/apache2\/sites-available\/000-default.conf<\/code><\/pre>\n<p>Otherwise, you might have set up an Apache configuration file for your site at <code>\/etc\/apache2\/sites-available\/your_domain.conf<\/code>, with <code>your_domain<\/code> representing your domain name as usual, in which case you may use the following command:<\/p>\n<pre><code>sudo nano \/etc\/apache2\/sites-available\/<mark>your_domain.conf<\/mark><\/code><\/pre>\n<p>Change the values of the <code>SSLCertificateFile<\/code> and <code>SSLCertificateKeyFile<\/code> directives, by setting <code>SSLCertificateFile<\/code> to the path of your <em>certificate file<\/em>, and <code>SSLCertificateKeyFile<\/code> to the path of your <em>private key file<\/em>, like so:<\/p>\n<pre><code>&lt;VirtualHost *:80&gt;\r\n        Define servername <mark>your_domain<\/mark>\r\n        ServerName ${SERVERNAME}\r\n        RewriteEngine on\r\n        RewriteRule ^\/.*$ https:\/\/\\${SERVERNAME}%{SCRIPT_FILENAME}?%{QUERY_STRING} [R=301]\r\n        ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n&lt;\/VirtualHost&gt;\r\n&lt;VirtualHost *:443&gt;\r\n        SSLEngine On\r\n        SSLCertificateFile <mark>\/etc\/webmin\/letsencrypt-cert.pem<\/mark>\r\n        SSLCertificateKeyFile <mark>\/etc\/webmin\/letsencrypt-key.pem<\/mark>\r\n        ServerName ${SERVERNAME}\r\n        DocumentRoot \/var\/www\/<mark>your_domain<\/mark>\r\n        ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n        CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n<p>Again, make sure to replace <code>your_domain<\/code> with your domain name.<\/p>\n<p>Save and close the file.<\/p>\n<p>If you haven't already, you should enable your <code>your_domain.conf<\/code> file using the <code>a2ensite<\/code> command:<\/p>\n<pre><code>sudo a2ensite <mark>your_domain.conf<\/mark><\/code><\/pre>\n<p>You might also want to disable the default site in <code>000-default.conf<\/code>:<\/p>\n<pre><code>sudo a2dissite 000-default.conf<\/code><\/pre>\n<p>Next, test for configuration errors:<\/p>\n<pre><code>sudo apache2ctl configtest<\/code><\/pre>\n<p>You should receive an output that contains the text <code>Syntax OK<\/code>, which means you can safely reload Apache, otherwise, you will get a very specific description pointing out the error you have to fix.<\/p>\n<p>Next, restart Apache:<\/p>\n<pre><code>sudo systemctl restart apache2<\/code><\/pre>\n<p>Now, reload your website in the browser. You will notice a secured padlock with a message that informs you that your SSL certificate is valid.<\/p>\n<p>With this, you now have HTTPS enabled in your Apache web server using the Let's Encrypt certificate you obtained using Webmin.<\/p>\n<h2>Congrats!<\/h2>\n<p>At this point in the article, you should be proud of yourself! You have learned how to install Webmin on Ubuntu 22.04, and used it to perform many sysadmin tasks, such as installing and updating packages, managing Unix users and groups, and managing Webmin users. You've also used Webmin to add a Valid SSL Certificate with Let\u2019s Encrypt, and learned how to use it with Nginx and Apache.<\/p>\n<p>Webmin allows you to have total control over your system and give others the ability to manage your server. Check out <a href=\"http:\/\/doxfer.webmin.com\/Webmin\/Main_Page\" target=\"_blank\" rel=\"noopener\">Official Webmin wiki<\/a> for more on how to use Webmin to perform your sysadmin tasks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking for a detailed tutorial on how to install Webmin on Ubuntu 22.04? You&#8217;re in the right place! Webmin is a free and open-source web-based control panel that allows you to manage your Linux server from the browser. The web interface Webmin provides is a flexible modern dashboard with dozens of options to  &#8230;<\/p>\n","protected":false},"author":19,"featured_media":8834,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[185,195],"class_list":["post-7067","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials","tag-ubuntu","tag-webmin"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=7067"}],"version-history":[{"count":16,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7067\/revisions"}],"predecessor-version":[{"id":12916,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/7067\/revisions\/12916"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/8834"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=7067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=7067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=7067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}