How to Install and Configure Webmin and Virtualmin: A Step-by-Step Guide
Webmin is a popular system administration tool for all Unix-like servers. It offers services with around 1,000,000 yearly installations worldwide. Anyone can configure operating system internals using Webmin. Examples include disk quotas and services or configuration files. It also enables you to modify and control open-source apps, like PHP, MySQL, BIND DNS Server, and Apache HTTP Server.
Whereas Virtualmin is a sophisticated web hosting control panel for Linux systems. It supports several Linux distributions, including Rocky Linux, AlmaLinux, Debian and Ubuntu, and RHEL. Virtualmin is available in an open-source GPL version and a Pro version rich in additional features. It is ideal for IT professionals, web developers, and hosting providers.
Hence, Webmin and Virtualmin are powerful web-based control panels that simplify server administration tasks. The panels allow users to easily manage their servers. This step-by-step guide will walk you through installing and configuring Webmin and Virtualmin on Ubuntu.
How to Install Webmin on Ubuntu?
Different admins use Webmin to manage Unix and Linux systems and servers. Its dashboard enables you to manage several user accounts, view system logs and emails, and update and configure your system.
Installing Webmin on Ubuntu is an easy process. Let's understand what the prerequisites are before moving on to how to install Webmin Ubuntu:
-
A system that supports Ubuntu 18.04 or Ubuntu 20.04
-
A user account with sudo privileges
-
Access to the terminal window
-
A working network connection
Now, let's understand how you can easily install Webmin on Ubuntu:
Step 1: Update Your Ubuntu Package List
Run the following command stating to update the package list in the terminal.
sudo apt update
Enter the administrator password to you and press Enter when prompted. Now, you have to install the update packages with the following command:
sudo apt upgrade
After entering the command, you will prompted a question, "Do you want to continue?" so you will have to type Y and click on Enter.
Now, you have to install dependency packages to manage software repositories by using the following command:
sudo apt install software-properties-common apt-transport-https
Again, you have to type Y and press the Enter button when asked to confirm the installation.
Step 2: Enable Webmin Repository
After confirming the installation of the dependency package, you will have to add the GPG key associated with the Webmin with the following command:
sudo wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
Then, you have to add the Webmin repository manually using the following command:
sudo add-apt-repository "deb [arch=amd64] http://download.webmin.com/download/repository sarge contrib"
Step 3: Install Webmin on Ubuntu
After fetching the Webmin repository, you have to start the installation Webmin by entering the following command:
sudo apt install webmin
Now, just like usual, you will have to type Y and press Enter when you are prompted with the question, "Do you want to continue?" Check the status of the Webmin service with the following prompt:
sudo systemctl status webmin
If it shows the status as Active, then the installation is successfully done.
Besides, there is an alternative method through which you can check the Webmin status. It is by checking the installed version of Webmin, and you can do that by the following prompt:
dpkg -l | grep webmin
If Webmin is installed on your system, the command will output information about the installed package, including the package name, version, and description. However, the command will not produce any output if the package is not installed.
Step 4: Configure Your Firewall
After successfully installing the Webmin, you will now have to configure the Firewall settings. Webmin uses the TCP Port 10000 by default, and you can use this port on your Firewall by following the command:
sudo ufw allow 10000/tcp
Reload the Firewall to implement all changes with the following command:
sudo ufw reload
It is essential to note that Firewall is disabled on Ubuntu by default. So, you might have to use the command "sudo ufw enable" to enable it. To check the status of your Firewall to ensure the changes are done, enter the following command:
sudo ufw status
Step 5: Access the Webmin on Your Ubuntu System.
Now, you will have to set a password using the Webmin root user by entering the following command:
sudo /usr/share/webmin/changepass.pl /etc/webmin root [new password]
Please take note of setting up a password. This way only works for existing users. You cannot use this method to set up new users.
After that, open your Internet Browser and enter the following as a web address using your server's IP, either local or remote server's IP address:
https://[your server's IP]:10000/
Now, Webmin usually generates its own SSL certificate, which is not recognized by the browser. So, it will cause a security page pop-up that says that there is a potential risk when you log in for the first time. Nonetheless, you can get through this by clicking on the Advanced button and then clicking on the Accept the Risk and Continue button.
Now, you can easily log in using the default username root and the newly set password. Utilize the Webmin dashboard to review your system information.
How to Install Virtualmin on Ubuntu?
Virtualmin is one of the most popular website control panels for Ubuntu users. It has several features and can be easily installed on Ubuntu servers. Let's look at the prerequisites required to install Virtualmin:
Here are the steps to install Virtualmin:
Step 1: Open a Terminal
Open the terminal, then enter the following command to update your system's package repository to ensure that you have the latest version working.
apt update
Step 2: Set the Hostname
Once all the updates are complete, you will have to execute the following command, which does not give any output. This command will set your server's hostname (set-hostname) to your fully qualified domain name (example.com).
hostnamectl set-hostname example.com
Ensure that your domain name is valid and aligns with your server’s IP address for the SSL certificate that you must generate later.
Step 3: Download the Installation Script.
Now, run the wget command to execute the Virtualmin installation script. The script, which is usually named install.sh, can be downloaded from the given URL.
wget http://software.virtualmin.com/gpl/scripts/install.sh
Step 4: Run the Script.
Execute the chmod command as shown below to set the script as executable. Doing so will enable you to run the script and then initiate the Virtualmin installation process.
chmod a+x install.sh
Step 5: Run the Installation
Run the installation script for Virtualmin with the following command.
./install.sh
Now, type Y and press the ‘enter’ option when asked to start the installation process. Remember that the process can be long, depending on the server speed and the number of packages to be installed. Do not interrupt this process, as doing so will lead to unexpected errors. You will be notified once the installation is successful.
Step 6: Access the Virtualmin WebUI
Now, since you have already configured UFW Firewall while installing webmin, it is not essential to configure it once again. You can review your UFW Firewall rules to ensure that they are running on your system efficiently by entering the following command:
sudo ufw status
The command will display the current status of UFW and a list of all the Firewall rules. Now, you can access the Virtualmin Web UI through your preferred browser, like Google Chrome.
If your fully qualified domain name is example.com and you have enabled access to port 10000, then you can access Virtualmin by entering the following URL in your browser:
http://example.com:10000
Again, the Not Secure warning will appear because a trusted certificate authority does not issue the default self-signed SSL certificate issued during Virtualmin installation. Nonetheless, you can install the SSL certificate for your domain later; for now, you can click on the Proceed option to access the Virtualmin Web UI.
Now, sign in with your Ubuntu credentials on the Webmin sign-in page. Your browser will redirect you to Virtualmin Web UI. Your screen will show the Post-Installation Wizard window; now, you need to configure the Virtualmin server.
Step 7: Configure the Virtualmin Server
On the Post Installation Wizard, click on the Next button to start Virtualmin installation. Then, fine-tune the interface performance and email processing by selecting the suitable options.
After that, you will have to choose to enable the service of scanning incoming emails for viruses. If your system will not be hosting email, then virus scanning can be turned off.
Now, you will have to choose between MariaDB or PostgreSQL. You can keep the database settings as they are and then click on Next.
After that, you will have to set the password for MariaDB if you have selected the MariaDB database server.
After setting the password, you will have to enter your FQDN in the primary nameserver field and click on the Next button two times.
Choose between storing plain-text passwords or only storing hashed passwords to select your preferred option for password storage mode. The better option is only store hashed passwords option and then click on Next.
Now, select your preferred MariaDB database size from the given options and click Next. The selection depends on your system’s available RAM and the database's anticipated usage.
Choose the per-domain directory under (path name) to ensure consistent management and mitigate the risk of accidental deletion, and then click on Next.
Now, click on the Create server with the domain option and provide your FQDN to create a default virtual server. Then, select Yes, with the Let’s Encrypt certificate option option to enable SSL on the default server using a certificate generated from Let’s Encrypt. Click on Next.
Click on Finish to wrap up the configuration. Then click on the re-check and refresh configuration option to apply the new settings.
Now, you can quickly create and manage multiple domains, websites, email accounts, and databases from a centralized control panel. To verify that your installation works, open a new tab on your web browser and navigate to your FQDN without entering the port number 10000. If you see the default webpage below, congratulations—the entire setup is done successfully.
How to Add Virtualmin to Webmin via Web Interface?
Virtualmin is an important web hosting control panel that helps you manage your server and websites through a web-based interface. By adding Virtualmin to Webmin, you can also manage both the server and the websites from a single control panel. Now, let us look at the detailed steps to add Virtualmin to Webmin through the web interface.
Step 1. Login to Webmin Panel.
Sign in to your Webmin panel using your admin credentials. This involves opening a web browser and entering the URL or IP address of your server. This is followed by the port number associated with the Webmin interface (usually 10000). Later, you will gain access to the Webmin dashboard upon successful authentication.
Step 2. Navigate to Webmin Configuration.
After you sign in to the system, navigate to the "Webmin Configuration" section within the Webmin menu. This section contains various configuration options for the Webmin control panel, enabling users to customize settings according to their respective requirements.
Step 3. Access Webmin Modules.
Locate and click on "Webmin Modules" within the Webmin Configuration menu. This option allows users to manage modules within the Webmin interface. Examples include adding, removing, and configuring modules to extend the functionality of Webmin.
Step 4. Select Virtualmin Module.
Scroll down to the section labeled "Unused Modules," where you will find a list of available modules that are not currently installed. Locate and select the "Virtualmin Virtual Server Management" module from the list.
Step 5. Install Virtualmin Module.
After you select the Virtualmin module, click on the "Install" button to initiate the installation process. Webmin will download and install the Virtualmin module, ultimately integrating this process into the Webmin interface.
Step 6. Access Virtualmin Interface.
Once the installation is complete, navigate back to the Webmin menu. Here, you should see a new option labeled "Virtualmin Virtual Servers." Click on this option to access the Virtualmin interface within the Webmin control panel.
Step 7. Explore Virtualmin Features.
After it is integrated into Webmin, you can now explore Virtualmin’s myriad features and functionalities. Virtualmin empowers users to create and manage virtual servers, configure email settings, and install web applications. You can also monitor server performance, manage user accounts, and enhance security settings—all from a centralized, intuitive interface.
Conclusion
Webmin and Virtualmin serve as powerful tools for simplifying server administration tasks. These web panels cater to the needs of Unix-like servers and Linux systems, respectively. It often offers different services to configure operating system internals and manage various system resources and applications.
The step-by-step guides presented in this content elucidate the installation and configuration processes for Webmin and Virtualmin on Ubuntu servers. By following these detailed instructions, you can set up and leverage the functionalities of these web-based control panels to streamline server management tasks and enhance productivity.