# SSL Login to webmin

**URL:** <https://forum.virtualmin.com/t/ssl-login-to-webmin/131208>\
**Category:** Help! (Home for newbies)\
**Created:** [December 22, 2024, 9:52am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208 "2024-12-22T09:52:16Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 9:52am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/1 "2024-12-22T09:52:16Z")

</div>

Ubuntu 24, Apache server , Webmin 2.202

Hello.  
This is my first time installing webmin on my ubuntu 24 VPS system.  
I have a domain that I have used LetsEncrypt to add SSL , however, after that I decided to install Webmin. login into webmin using [https://domain:10000](https://domain:10000) is not secure … how can i use the existing SSL for domain to secure Webmin access ?

I looked at many tutorial but yet they seems to be very confusing as how this process works.

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 22, 2024, 10:15am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/2 "2024-12-22T10:15:53Z")

</div>

so which version of virtualmin are you using ? if not it would have been better to install that and use it’s features to achieve your goal but in webmin setup there is an option for setting up a certificate for the system hostname, if that’s what you are trying to do

---

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 10:27am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/3 "2024-12-22T10:27:57Z")

</div>

Thanks.  
I only install Webmin … not virtualmin .  
never used webmin before for managing servers before . version of webmin is 2.202 and is working , but login into the webmin is not picking up SSL that is installed for the domain …  
as per instruction I use port 10000, but I saw port 10001 for SSL ? Not sure … but I am working on live site … so I thought I ask before modifying the firewall .

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 22, 2024, 12:08pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/4 "2024-12-22T12:08:52Z")

</div>

Which domain ? have you already setup some virtual servers manually and added ssl certificates please explain more at the moment i don’t quite understand what you are doing

---

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 12:34pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/5 "2024-12-22T12:34:25Z")

</div>

Hello.  
initially , I setup my ubuntu vps server , I Have Apache with 2 domain running and both domain secured using LetsEncrypt.  
Decided for the first time to use webmin to administer the server. Followed the online instruction to install , which went great … however, login to webmin using [https://mydomain:10000](https://mydomain:10000), is not secure.  
I have SSL virtual host created by Certbot , listening on port 443 , so its obvious that port 10000 will not be secured using same certificate that is installed for my main domain .  
so at this stage , login into webmin is not secure … and have no idea how i can request Certificate for the domain that Already got SSL Certificate just so I can secure both domain and port 10000 for webmin …  
in virtual host i have added additional port \<virtualhost \*:443 \*:10000\> but that did not solve the problem . .  
hope that helps …

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 22, 2024, 1:27pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/6 "2024-12-22T13:27:17Z")

</div>

Just add the certificate to /etc/miniserv.conf, look for the existing entries in the conf file and replace the file locations with the path to your existing certificate note webmin is not served by apache so changes there will make no difference.

---

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 1:52pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/7 "2024-12-22T13:52:25Z")

</div>

Thanks.  
how i can go about doing this ?  
looking at the miniserv.conf I have 2 entries for the certificate …  
userfile=/etc/webmin/miniserv.users  
keyfile=/etc/webmin/miniserv.pem  
i did create a self signed certificate directly from webmin before. thuse the miniserv.pem  
replacing keyfile with LetsEncrypt file path , generates error and wont start webmin services. and no error info in journalctl that can tell me why webmin did not start .  
Any info would be appreciate.

Thanks.  
ps : LetsEncrypt created two file Fullchain.pem and privkey.pem…

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [December 22, 2024, 2:39pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/8 "2024-12-22T14:39:07Z")

</div>

> [@tonysar](#):
>
> login into webmin using [https://domain:10000](https://domain:10000) is not secure …

> [@tonysar](#):
>
> i did create a self signed certificate directly from webmin before. thuse the miniserv.pem

A self signed cert will give this error in most browsers. But, does this not work for you?

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/b/2/b2648f37dab3f87ded9b914767188b830a89e04c.png)

---

<div class="post-metadata">

**Author:** ![Stegan](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/stegan/32/6860_2.png) [@Stegan](https://forum.virtualmin.com/u/Stegan)\
**Post date:** [December 22, 2024, 2:43pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/9 "2024-12-22T14:43:18Z")

</div>

> [@tonysar](#):
>
> initially , I setup my ubuntu vps server , I Have Apache with 2 domain running and both domain secured using LetsEncrypt.

That sounds like you did not do an install on a clean OS! 💣 💥

---

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 3:02pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/10 "2024-12-22T15:02:21Z")

</div>

Thanks.  
I can not use LetsEncrypt in webmin to generate certificate as this certificate already exist and new cert , the operation fails in webmin …  
Yes. I did not install webmin on clean server, this vps was up and running with apache, mysql, ssh, elasticsearch and magento , although is not public ( maintenance mode ) I see no reason why I can not setup SSL properly for webmin.  
even though I get the message ( not secure ) on url … looking at Certificate detail , it shows that page has been encrypted and self signed certificate has been loaded. i added the certificate to the trusted certificate of my browser , but that didn’t work yet… I guess, i made the mistake on which pem file i should add.

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [December 22, 2024, 3:16pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/11 "2024-12-22T15:16:07Z")

</div>

> [@Stegan](#):
>
> That sounds like you did not do an install on a clean OS!

I think this is a Webmin install, not Virtualmin. I don’t believe clean install matters here.

---

<div class="post-metadata">

**Author:** ![ID10T](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/id10t/32/7895_2.png) [@ID10T](https://forum.virtualmin.com/u/ID10T)\
**Post date:** [December 22, 2024, 3:20pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/12 "2024-12-22T15:20:18Z")

</div>

> [@tonysar](#):
>
> I can not use LetsEncrypt in webmin to generate certificate as **this certificate already exist** and new cert , the operation fails in webmin

Have you tried the upload feature?

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 22, 2024, 3:48pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/13 "2024-12-22T15:48:59Z")

</div>

> [@Stegan](#):
>
> That sounds like you did not do an install on a clean OS!

Don’t forget this is a webmin install not a virtualmin install things are different with a webmin install

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 22, 2024, 3:52pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/14 "2024-12-22T15:52:04Z")

</div>

> [@tonysar](#):
>
> I can not use LetsEncrypt in webmin

That is there to install a certificate for the hostname and not a preexisting domain

---

<div class="post-metadata">

**Author:** ![tonysar](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/t/b3f665/32.png) [@tonysar](https://forum.virtualmin.com/u/tonysar)\
**Post date:** [December 22, 2024, 4:04pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/15 "2024-12-22T16:04:41Z")

</div>

Thanks.

I did upload of private and chain file , and that solved the problem . now i am using SSL that was issued by LetsEncrypt for a existing domain and secured the login

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [December 22, 2024, 7:03pm UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/16 "2024-12-22T19:03:21Z")

</div>

They installed Webmin, which does not require a freshly installed OS. (If they want to manage websites, Virtualmin is the right tool for the job, rather than Webmin alone. But, since they just installed Webmin, they don’t have the “freshly installed OS” requirement.)

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [December 23, 2024, 8:48am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/17 "2024-12-23T08:48:42Z")

</div>

> [@tonysar](#):
>
> now i am using SSL that was issued by LetsEncrypt for a existing domain and secured the login

don’t forget to update it when the lets encrypt certificate expires

---

<div class="post-metadata">

**Author:** ![ingram](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ingram/32/8932_2.png) [@ingram](https://forum.virtualmin.com/u/ingram)\
**Post date:** [December 24, 2024, 3:27am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/18 "2024-12-24T03:27:56Z")

</div>

I know you already have received several solutions. 👍

Just to let you know that I often spin up VPS systems without Webmin at first. Sometimes it’s just as easy to get a LAMP stack up and running, along with SSL via Apache certbot.

If you install Webmin afterwards, the following method has worked for me, at least with Debian based systems:  
Your Apache Let’s Encrypt SSL certificate and key are normally saved at:  
/etc/letsencrypt/live/your\_domain.com/fullchain.pem  
/etc/letsencrypt/live/your\_domain.com/privkey.pem

Now, merge the two files into one .pem file to make managing this certificate easier:

cat /etc/letsencrypt/live/your\_domain.com/fullchain.pem /etc/letsencrypt/live/your\_domain.com/privkey.pem | tee /etc/webmin/letsencrypt.pem \> /dev/null

Here, we’ve merged both the certificate file and the private key into one **letsencrypt.pem** file.

This file ( **letsencrypt.pem** ) should now be in the following webmin directory: /etc/webmin  
Open the following file: /etc/webmin/ **miniserv.conf**  
Replace the following line: _keyfile=/etc/webmin/miniserv.pem_  
With this: **keyfile=/etc/webmin/letsencrypt.pem**

Save and close the file. Restart Webmin: _systemctl restart webmin_  
Wait for a few seconds while Webmin reboots, then refresh the page.  
You’ll see that the Let’s Encrypt certificate is enabled and your connection is secured through HTTPS.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [January 1, 2025, 3:28am UTC](https://forum.virtualmin.com/t/ssl-login-to-webmin/131208/19 "2025-01-01T03:28:30Z")

</div>

Closed on January 1, 2025, 3:28am UTC

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.
