What is Webmin?
Since you have searched for the tutorial, i hope most of you know very well about webmin.
I am giving just a small introduction to people who dont know about webmin.
Most of the developers are the fan of the Unix Operating system. We all love it for it’s flexibility and being an open source.
However, the hard part is handling the interface with the command lines. Most people dont like to use commands to do some of the operations frequently.
Here comes the solution:
Webmin is the an interface created for you to handle the many of the task through the interactive user interface. You can do some of the operations on your linux system by login into the webmin interface.
You can operate your server remotely using webmin.
In this tutorial, let us see how to install webmin on ubuntu 16.04 (One of favorite and most widely used operating system).
Also, let us see how to secure the connection to the webmin. Let us dive into requirements.
- Configure your ubuntu root server according to this initial server setup guide. You will require a sudo non root user. It is recommend by us and we have shown how to create one in the above linked tutorial.
- You should also install LAMP stack on your server. We have written another tutorial for that also at here.
- A domain name pointing to your server IP address.
Install Webmin Ubuntu 16.04
Ubuntu has many software in their repository also they support adding additional software to their repository. To add the webmin to the Ubuntu repository, just do the following.
Open the source.list file using nano editor.
$ sudo nano /etc/apt/sources.list
The file will open and you have to scroll to the bottom of the file and this below line at the end.
deb http://download.webmin.com/download/repository sarge contrib
After that, save and exit the file.
Then, you have to get the PGP key to for further process. PGP stands for Pretty Good Privacy. It helps to encrypt the file so fast. Use the below command to get the PGP key
$ wget http://www.webmin.com/jcameron-key.asc
Then add the key using the following command.
$ sudo apt-key add jcameron-key.asc
Once you have done with the above process, now its time to update the package index.
$ sudo apt-get update
Now, install the webmin using the following command.
$ sudo apt-get install webmin
You should get the following output once you done with the process.
Webmin install complete. You can now login to
https://your_server_ip:10000 as root with your
root password, or as any user who can use `sudo`.
Here is the another thing you have to do.
You should allow the port 10000 in ufw in order for the webmin to work.
Install SSL for Webmin using Let’s Encrypt
Here our another step is to install the Valid SSL certificate using the webmin.
Webmin, by default has the Self signed ssl certificate.
But, the google will show it as unsafe since the certificate is not from the trusted source.
Inside the webmin, you have the option to generate the Let’s encrypt file. You have to just set the location for the certificate to be stored.
To login to the webmin panel, visit http://your_domain_name:10000. Remember, 10000 is the port used by Webmin.
The login dashboard will open and you can login using the sudo non root user account which you have created while following our above mentioned initial server setup tutorial.
Once you login to the webmin, your first step is to change the hostname to create valid SSL certificate. You can see the System Hostname field.
There, you can edit and enter your domain name.
Then go to webmin->webmin-webmin configuration->SSL Encryption->Let’s Encrypt.
We will configure the Let’s encrypt here. The validity of let’s encrypt certificate is 3 months.
We can instruct webmin to automatically renew the certificate every two months. Or else, you can make it thorugh cron job. But, using webmin for auto renewal is simple task.
The let’s encrypt looks for verification file and we will place the file in the web directory /var/www/html.
First, enter your domin name to generate certificate and then enter the /var/www/html file.
After that, you can choose between manual renewal and automatic renewal.
Then, request the certificate. it will be generated within few minutes and you can see the confirmation.
Restart the webmin button to make use of the new certificate.
Webmin is now Ready
There are a lot of options available on webmin. You can do the most of the task using webmin such as creating and managing user to manage the DNS. You can check them out individually.
To create new user, just follow the below setup.
Go to System->Users and Groups->Create a new user.
Here, the create user screen will appear.
Username – Your choice
User ID – Automatic
Real Name – Just give your own desciption
Home Directory – Automatic
Shell – /bin/bash
Password – Choose Normal Password
Primary Group – Choose New Group with Same name as user
Secondary Group – choose sudo from all the group
Then click on Create
You can also see a lot of other options in setting up a new user. You can use them or skip them as of now to reduce your complexity.
There is a separate section available in the webmin to update the packages. To see the availble update go to Dashboard->Package Updates.
If any update is available, you can see that in the section. Just click on the “Package updates are available” and Click on “Update selected Packages”.
Many of you might be programmers and many of you might be bloggers looking to host their wordpress site on cloud rather than hosting at third party hosting providers and paying them very high.
Hosting on the cloud will give you a lot of freedom and saves a lot of money for bloggers. Since you from the non technical background, you can use webmin to host wordpress directly.
It is very simple and i will publish an article on that very soon. Don’t forget to signup for the tutorial mails. I will send you mail once i publish a new tutorial.
If you are a new guy to cloud, then stay tuned with us to get the latest news.