Add SSL and change port to your Virtualmin Hostname

Reading Time: 3 minutes

By default, Virtualmin uses HTTPS and port 10000. However, the SSL installed is just a self-signed certificate. This explains why you are getting the “Not Secure” message on your hostname URL as shown below:

image-25 Add SSL and change port to your Virtualmin Hostname
Not Secure message in Virtualmin hostname

To go about this, let us add Let’s Encrypt SSL and change the port number to your desired port. To do so, let us add the primary domain in Virtualmin Virtual Server.

Let us get started!

Add a domain name.

Click on Create Virtual Server, then complete the form as shown below, just ensure to enable the Setup SSL website too?, then Create Server.

image-26-1024x457 Add SSL and change port to your Virtualmin Hostname
Create Virtual Server in Virtualmin

Add your host name as a sub server for your main domain.

This time, let us add a sub domain from your main domain. The sub domain would be your host name. In our case, this will be panel.kurtobando.tk. Just ensure to enable the Setup SSL website too?, then Create Server.

image-27-1024x399 Add SSL and change port to your Virtualmin Hostname
Create Virtual Sub-Server

Add Let’s Encrypt SSL to your host name.

Let us add LE SSL to panel.kurtobando.tk. To do so, Click Virtualmin > Choose your hostname > Server Configuration > SSL certificate. You may refer to the screenshot below:

image-28 Add SSL and change port to your Virtualmin Hostname

Click on Stop SSL Certificate Sharing.

image-29-1024x237 Add SSL and change port to your Virtualmin Hostname

From here, choose Let’s Encrypt > Domain names listed here > Enter your host name in my case, this will be panel.kurtobando.tk. Click on Request Certificate.

image-30-1024x423 Add SSL and change port to your Virtualmin Hostname
image-31-1024x266 Add SSL and change port to your Virtualmin Hostname

From here, Click Virtualmin > Choose your hostname > Server Configuration > SSL certificate. Then let us use the hostname SSL for our Webmin, Usermin, Dovecot, Postfix, and ProFTPD.

image-32-1024x591 Add SSL and change port to your Virtualmin Hostname
image-33-1024x245 Add SSL and change port to your Virtualmin Hostname

From here, you may get the error message below:

image-34-1024x424 Add SSL and change port to your Virtualmin Hostname

Do not panic, just close your browser and re-open your panel URL. This time, this should work as expected, as shown below:

image-35-1024x473 Add SSL and change port to your Virtualmin Hostname
Webmin Login Page

If you reach to this stage. Congratulation. Next stop, let us change the port 10000 to our desired port. In my case, I will use port 2087.

Change Virtualmin Port.

By default port 10000 is Virtualmin go to port. In my case, I would like to change this to 2087, given the said port is also supported in Cloudflare. If you have hesitation, see the link below:

Which ports will Cloudflare work with?

Let us get this started! Click on Webmin > Webmin> Webmin Configuration > Port and Addresses.

image-39-1024x505 Add SSL and change port to your Virtualmin Hostname
Webmin Configuration

In my case, I use 2087 as shown below:

image-36-1024x417 Add SSL and change port to your Virtualmin Hostname
Webmin Ports and Addreses

Feel free to remove the port 10000 if you have successfully visit your working port as shown below:

image-40 Add SSL and change port to your Virtualmin Hostname
Working port in Virtualmin

At this point. You should be all set.

Was this post helpful?

Leave a Reply

Close Menu