{"id":10786,"date":"2024-10-11T10:31:19","date_gmt":"2024-10-11T10:31:19","guid":{"rendered":"https:\/\/www.ssdnodes.com\/?p=10786"},"modified":"2025-05-15T15:47:30","modified_gmt":"2025-05-15T15:47:30","slug":"install-webmin-on-debian-12","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/install-webmin-on-debian-12\/","title":{"rendered":"Simple Guide \u2013 How to Install Webmin on Debian 12 and How to Use it"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>Are you searching for a step-by-step guide to install Webmin on Debian 12? This simple tutorial is for you!<\/p>\n<p><a href=\"https:\/\/webmin.com\/\" target=\"_blank\" rel=\"noopener\">Webmin<\/a> is a free, open-source <a href=\"https:\/\/www.ssdnodes.com\/blog\/tools-to-manage-multiple-linux-servers-free\/\">web-based control panel<\/a> that simplifies Linux server management right from your browser. Its intuitive dashboard lets you handle various configurations, including user accounts, disk quotas, DNS settings, services, web servers, and much more. If you're using a <a href=\"https:\/\/www.ssdnodes.com\/blog\/installing-lamp-on-ubuntu-22-04-lts-jammy-jellyfish\/\">LAMP stack<\/a>, Webmin makes it easy to manage your Apache web server, MySQL, PHP applications, and even technologies like PostgreSQL and Python. Plus, you can manage your server remotely from any browser.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10853 size-full\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/How-to-Install-Webmin-on-Debian-12-and-How-to-Use-it.jpg\" alt=\"Install Webmin on Debian 12\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/How-to-Install-Webmin-on-Debian-12-and-How-to-Use-it.jpg 600w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/How-to-Install-Webmin-on-Debian-12-and-How-to-Use-it-300x200.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>In this guide, we\u2019ll walk through installing Webmin on an Debian 12 server. We'll also cover basic system administration tasks like monitoring your system, adding users with custom permissions, managing packages, and running software or commands on your server.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<ul>\n<li>A Debian 12 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\/\">Debian Linux<\/a> servers at the globe's absolute lowest price. Take a look at our <a href=\"https:\/\/www.ssdnodes.com\/cheap-vps-hosting\/\">offerings<\/a> and prepare for your mind to be blown \ud83e\udd2f.<\/li>\n<li>Access your sever via SSH, check out <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<h3><strong>Note<\/strong><\/h3>\n<p>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 1-click 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><strong>Step 1: Updating the Package Cache<\/strong><\/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\r\n<\/code><\/pre>\n<h2><strong>Step 2: Install Webmin on Debian 12<\/strong><\/h2>\n<p>To install the Webmin control panel on Debian 12, you'll first add the Webmin repository that will enable you to install the Webmin packages and update them with <code>apt<\/code>, then you'll update the package cache, and finally you'll use the <code class=\"language-python\">apt install webmin<\/code> command.<\/p>\n<h3>Install the Required Packages<\/h3>\n<p>First, install <code>curl<\/code> to use it to download the Webmin repository setup script, and <code>gnupg2<\/code> to verify Webmin signatures:<\/p>\n<pre><code class=\"language-python\">sudo apt install gnupg2 curl -y<\/code><\/pre>\n<h3>Download and Run the Setup Script<\/h3>\n<p>Next, download the setup script:<\/p>\n<pre><code class=\"language-python\">curl -o setup-repos.sh https:\/\/raw.githubusercontent.com\/webmin\/webmin\/master\/setup-repos.sh\r\n<\/code><\/pre>\n<p>Run this script:<\/p>\n<pre><code class=\"language-python\">sh setup-repos.sh\r\n<\/code><\/pre>\n<p>Update the package cache:<\/p>\n<pre><code class=\"language-python\">sudo apt update\r\n<\/code><\/pre>\n<h3>Install Webmin<\/h3>\n<p>After the Webmin repositories setup, you can now install Webmin:<\/p>\n<pre><code class=\"language-python\">sudo apt install webmin --install-recommends<\/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 class=\"language-python\">sudo systemctl status webmin<\/code><\/pre>\n<pre><code class=\"language-python\">\u25cf webmin.service - Webmin server daemon\r\n     Loaded: loaded (\/lib\/systemd\/system\/webmin.service; enabled; preset: enabled)\r\n     Active: active (running) since Sun 2024-09-08 11:57:14 UTC; 1h 22min ago\r\n    Process: 6352 ExecStart=\/usr\/share\/webmin\/miniserv.pl \/etc\/webmin\/miniserv.conf (code=exited, status=&gt;\r\n   Main PID: 6353 (miniserv.pl)\r\n      Tasks: 5 (limit: 9476)\r\n     Memory: 106.4M\r\n        CPU: 2min 39.979s\r\n     CGroup: \/system.slice\/webmin.service\r\n             \u251c\u2500 6353 \/usr\/bin\/perl \/usr\/share\/webmin\/miniserv.pl \/etc\/webmin\/miniserv.conf\r\n             \u251c\u2500 6833 \/usr\/bin\/perl \/usr\/share\/webmin\/authentic-theme\/stats.pl 555\r\n             \u251c\u2500 6910 \/usr\/bin\/perl \/usr\/share\/webmin\/miniserv.pl \/etc\/webmin\/miniserv.conf\r\n             \u251c\u250018708 sh -c \"(vmstat 1 2 2&gt;\/dev\/null)\"\r\n             \u2514\u250018709 vmstat 1 2<\/code><\/pre>\n<p><strong>Note:<\/strong> Webmin is accessible via port <code>10000<\/code>. If you have a firewall, you need to allow Webmin's port through the firewall:<\/p>\n<pre><code class=\"language-python\">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.<\/strong><\/p>\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 class=\"language-python\">https:\/\/your_ip_address_or_domain:10000<\/code><\/pre>\n<p>If you haven't set up an SSL certificate from a trusted Certificate Authority like Let's Encrypt, your browser will show a \"Not Secure\" or \"Connection is not private\" error. This happens because the connection to your server isn't recognized as secure. Don't worry though\u2014this is expected. Webmin uses a self-signed certificate for encryption, but since your server isn't a known certificate authority, the browser flags it as untrusted.<\/p>\n<p>The following is an example of the error in the Google Chrome browser. Don't worry, we'll fix this later.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10818\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Privacy-Error.webp\" alt=\"Webmin Server Initial Connection on Debian\" width=\"500\" height=\"309\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Privacy-Error.webp 708w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Privacy-Error-300x186.webp 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Click the <strong>Advanced<\/strong> button or <strong>More information<\/strong> depending on the browser, and choose to proceed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10791\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Login.webp\" alt=\"Webmin on Debian 12 Login Page\" width=\"650\" height=\"315\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Login.webp 874w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Login-300x146.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Login-768x373.webp 768w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/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\u2019ll be moved to the dashboard:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10792\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard-1024x490.webp\" alt=\"Webmin Dashboard on a Debian 12 System\" width=\"800\" height=\"383\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard-1024x490.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard-300x144.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard-768x368.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard-1536x735.webp 1536w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Webmin-Dashboard.webp 1569w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>With this, you have Webmin installed on your Debian 12 server and ready to be used.<\/p>\n<h3><strong>Reader Alert!<\/strong><\/h3>\n<p>To avoid all these steps and install Webmin in minutes, you can use our tried and tested 1-click <strong>Webmin<\/strong> application. Just choose a <a href=\"https:\/\/www.ssdnodes.com\/\">server<\/a>, click <strong>Customize Your Own Server<\/strong>, under <strong>Select Server<\/strong> <strong>Image<\/strong> go to the <strong>Apps<\/strong> tab, then choose <strong>Webmin<\/strong>. This will set up Webmin in minutes!<\/p>\n<h2><strong>Step 3: Using Webmin to Perform Basic Sysadmin Tasks<\/strong><\/h2>\n<p>Webmin comes with a variety of modules that help you control and configure different aspects of your system. In this step, you'll get familiar with some of these modules and how to use them effectively. You'll learn how to install and update packages, manage system users and groups, and handle Webmin user accounts directly from the Webmin interface.<\/p>\n<h3><strong>Installing Packages<\/strong><\/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>Click <strong>Install a new package<\/strong>, then 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><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10820\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install-1024x305.webp\" alt=\"Installing Packages on Webmin\" width=\"800\" height=\"238\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install-1024x305.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install-300x89.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install-768x229.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install-1536x457.webp 1536w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Install.webp 1599w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>This way you can install any package using Webmin directly.<\/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>. You\u2019ll get a list of all the packages that need to be updated. You can check and uncheck packages 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><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10821\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update-1024x365.webp\" alt=\"Updating Packages on Webmin\" width=\"800\" height=\"285\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update-1024x365.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update-300x107.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update-768x274.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update-1536x548.webp 1536w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Update.webp 1587w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><br \/>\nThe update process will begin, and once it\u2019s complete, you might be prompted to reboot the system if any of the updated packages require it. To reboot your server through Webmin, simply click on the \"<strong>Reboot Now<\/strong>\" button.<\/p>\n<h3>Managing Unix Users and Groups<\/h3>\n<p>A Unix user is a regular user who connects to your server via SSH or FTP, owns files and folders, and has a personal home directory. In this section, we'll use Webmin to create a new user with a dedicated home directory. We'll also add the user to the <code>sudo<\/code> group to grant them administrative privileges. In this tutorial, we\u2019ll name the user <code>example_user<\/code> but you can use any name you prefer.<\/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>In the <strong>Secondary groups<\/strong>, click on <strong>sudo<\/strong> in the <strong>All groups<\/strong> list then click the right arrow. This adds <code>sudo<\/code> 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><strong>Managing Webmin Users<\/strong><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10793\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User-1024x388.webp\" alt=\"Creating Webmin Users on Debian 12\" width=\"800\" height=\"303\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User-1024x388.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User-300x114.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User-768x291.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User-1536x581.webp 1536w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/Create-Webmin-User.webp 1593w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Besides creating Unix users, you can also grant others access to Webmin by creating Webmin user accounts. You can control what they can do by selecting specific modules for them to use. For instance, you could allow a user access only to the <strong>Software Package Updates<\/strong> module. You can also fine-tune permissions within modules\u2014like creating a user who can only view the list of updates, or one who can both view and apply them.<\/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>To create a Webmin account:<\/p>\n<ol>\n<li>Click <strong>Webmin<\/strong> in the left menu, then <strong>Webmin Users<\/strong>. You'll see <code>root<\/code> as the default user with full control.<\/li>\n<li>Enable password expiry prompts: Go to <strong>Webmin Configuration<\/strong> &gt; <strong>Authentication<\/strong>, check <strong>Prompt users with expired passwords to enter a new one<\/strong>, then click <strong>Save<\/strong>.<\/li>\n<li>To create a privileged user:\n<ul>\n<li>Go to <strong>Webmin Users<\/strong>, click <strong>Create a new privileged user<\/strong>.<\/li>\n<li>Enter a <strong>Username<\/strong> and set a strong password.<\/li>\n<li>Check <strong>Force change at next login<\/strong>.<\/li>\n<li>Set a <strong>Real Name<\/strong> or a descriptive name like \"Monitoring User.\"<\/li>\n<li>Under <strong>Security and limits options<\/strong>, set <strong>Inactivity logout time<\/strong> to 30 minutes, <strong>Minimum password length<\/strong> to 15, and optionally restrict access by IP and time.<\/li>\n<li>In <strong>Available Webmin modules<\/strong>, either select all or choose specific ones.<\/li>\n<li>Click <strong>Create<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Log out from Webmin by clicking the red logout icon at the bottom of the left-hand menu, and log in with the new user. Change the password if prompted. If access is limited, the left menu will show only the selected modules.<\/p>\n<h2>Step 4: Adding a Let\u2019s Encrypt SSL Certificate to Webmin<\/h2>\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>Click <strong>Install Now<\/strong> to install the Let\u2019s Encrypt Certbot client.<\/li>\n<li>Once the installation is complete, click <strong>Return to SSL Encryption<\/strong>.<\/li>\n<li>Type in your domain name in the <strong>Hostnames for certificate<\/strong> field.<\/li>\n<li>Under <strong>Let's Encrypt validation method<\/strong>, select <strong>Certbot built-in webserver<\/strong>.<\/li>\n<li>In the <strong>Months between automatic renewal<\/strong> field, type in <code>1<\/code>. This attempts to renew the Let's Encrypt certificate each month.<\/li>\n<li>Click <strong>Request Certificate<\/strong>.<\/li>\n<\/ol>\n<pre><code class=\"language-python\">Requesting a new certificate for webmin.example.com, using the Certbot webserver ..\r\n.. request succeeded!\r\n\r\nConfiguring Webmin to use new cert and key ..\r\n.. done!\r\n<\/code><\/pre>\n<p>Restart Webmin 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.<\/p>\n<h2><strong>(Optional) Step 5: Using Webmin\u2019s Let\u2019s Encrypt Certificate With Nginx and Apache on Debian<\/strong><\/h2>\n<p><strong>Note:<\/strong> This section will be a brief description of how to use your SSL certificate with Nginx and Apache, for more on SSL certificates and Let\u2019s Encrypt, check out <a href=\"https:\/\/www.ssdnodes.com\/blog\/create-a-self-signed-certificate-on-ubuntu-for-apache-and-nginx\/\">How to Create a Self-Signed Certificate on Ubuntu 24.04 for Apache and Nginx<\/a> and <a href=\"https:\/\/www.ssdnodes.com\/blog\/install-lets-encrypt-on-ubuntu-certbot-apache-and-nginx\/\">How To Install Let's Encrypt on Ubuntu 24.04 With Certbot for Apache and Nginx<\/a>.<\/p>\n<p>To configure your web server with your Let's Encrypt certificate:<\/p>\n<ol>\n<li>Click <strong>Webmin<\/strong> in the left menu, then <strong>Webmin Configuration<\/strong>.<\/li>\n<li>Click <strong>SSL Encryption<\/strong>.<\/li>\n<\/ol>\n<p>Here, you'll find details about your SSL certificate, including the paths to the <em>private key file<\/em> and <em>certificate file<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10794\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/SSL-Certificate-Details--1024x457.webp\" alt=\"Webmin Let's Encrypt Certificate\" width=\"800\" height=\"357\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/SSL-Certificate-Details--1024x457.webp 1024w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/SSL-Certificate-Details--300x134.webp 300w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/SSL-Certificate-Details--768x343.webp 768w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2024\/09\/SSL-Certificate-Details-.webp 1321w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Here, you have the following:<\/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> Make sure to set these paths properly in your web server's configuration in the next steps.<\/p>\n<h3>Configuring Nginx to Use the Let's Encrypt Certificate<\/h3>\n<p>First, open your Nginx configuration file in your\u00a0<code>\/etc\/nginx\/sites-enabled<\/code>\u00a0directory, 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\u00a0<code>your_domain<\/code>\u00a0with 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\u00a0<code>ssl_certificate<\/code>\u00a0and\u00a0<code>ssl_certificate_key<\/code>\u00a0directives, by setting\u00a0<code>ssl_certificate<\/code>\u00a0to the path of your\u00a0<em>certificate file<\/em>, and\u00a0<code>ssl_certificate_key<\/code>\u00a0to the path of your\u00a0<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\u00a0<code>ssl_certificate<\/code>\u00a0and\u00a0<code>ssl_certificate_key<\/code>\u00a0directives. Remember to also change\u00a0<code>your_domain<\/code>\u00a0in the preceding configuration with your domain name, and make sure to set the value of the\u00a0<code>root<\/code>\u00a0directive 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\u00a0<code>sites-enabled<\/code>\u00a0directory, 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\u00a0<code>sites-enabled<\/code>\u00a0directory, 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\u00a0<code>https:\/\/<\/code>\u00a0at 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\u00a0<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\u00a0<code>\/etc\/apache2\/sites-available\/your_domain.conf<\/code>, with\u00a0<code>your_domain<\/code>\u00a0representing 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\u00a0<code>SSLCertificateFile<\/code>\u00a0and\u00a0<code>SSLCertificateKeyFile<\/code>\u00a0directives, by setting\u00a0<code>SSLCertificateFile<\/code>\u00a0to the path of your\u00a0<em>certificate file<\/em>, and\u00a0<code>SSLCertificateKeyFile<\/code>\u00a0to the path of your\u00a0<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\u00a0<code>your_domain<\/code>\u00a0with your domain name.<\/p>\n<p>Save and close the file.<\/p>\n<p>If you haven't already, you should enable your\u00a0<code>your_domain.conf<\/code>\u00a0file using the\u00a0<code>a2ensite<\/code>\u00a0command:<\/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\u00a0<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\u00a0<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>Conclusion<\/h2>\n<p>You've installed Webmin on Debian 12, and used it to perform many sysadmin tasks, such as installing and updating packages, managing Unix users and groups, and managing Webmin users. Additionally, you used it to set up Let\u2019s Encrypt with both Nginx and Apache. For more on Webmin, check out the official <a href=\"https:\/\/webmin.com\/docs\/\" target=\"_blank\" rel=\"noopener\">documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ready to take control of your Debian 12 server? Our easy-to-follow guide shows you how to install Webmin and start managing your system like a pro!<\/p>\n","protected":false},"author":19,"featured_media":10850,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[],"class_list":["post-10786","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/10786","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=10786"}],"version-history":[{"count":19,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/10786\/revisions"}],"predecessor-version":[{"id":12941,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/10786\/revisions\/12941"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/10850"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=10786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=10786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=10786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}